brapi_post_scales: post /scales

View source: R/brapi_post_scales.R

brapi_post_scalesR Documentation

post /scales

Description

Add a new Scale

Usage

brapi_post_scales(
  con = NULL,
  dataType = "",
  decimalPlaces = 0,
  ontologyReference = list(),
  scaleName = "",
  validValues = list(),
  xref = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

dataType

character; required: FALSE; Class of the scale, entries can be:

  • "Code" - This scale class is exceptionally used to express complex traits. Code is a nominal scale that combines the expressions of the different traits composing the complex trait. For exemple a severity trait might be expressed by a 2 digit and 2 character code. The first 2 digits are the percentage of the plant covered by a fungus and the 2 characters refer to the delay in development, e.g. "75VD" means "75%" of the plant is Crop Ontology & Integrated Breeding Platform | Curation Guidelines | 5/6/2016 9 infected and the plant is very delayed.

  • "Date" - The date class is for events expressed in a time format, e.g. yyyymmddThh:mm:ssZ or dd/mm/yy

  • "Duration" - The Duration class is for time elapsed between two events expressed in a time format, e.g. days, hours, months

  • "Nominal" - Categorical scale that can take one of a limited and fixed number of categories. There is no intrinsic ordering to the categories

  • "Numerical" - Numerical scales express the trait with real numbers. The numerical scale defines the unit e.g. centimeter, ton per hectare, branches

  • "Ordinal" - Ordinal scales are scales composed of ordered categories

  • "Text" - A free text is used to express the trait.

; default: "".

decimalPlaces

integer; required: FALSE; For numerical, number of decimal places to be reported; default: 0.

ontologyReference

list; required: FALSE; The ontologyReference list should contain links to various ontology documentation (URL and type) supplied as a dataframe, an unique ontology database identifier, an ontology name and an ontology version (no specific format). In the Examples section an example on how to specify this list is provided; default: list()

scaleName

character; required: FALSE; Name of the scale; default: "".

validValues

list; required: FALSE; The validValues list should contain a character vector of values when specificing a nominal or ordinal scale, in this case max and min will be specified as 0. When specifying a numerical or date scale the categories need to specified as "", max specifies the maximum value and min specifies the minimum value used for data capture control. In the Examples section an example on how to specify this list is provided; default: list()

xref

character; required: FALSE; Cross reference to the scale, for example to a unit ontology such as UO or to a unit of an external major database; default: "".

Details

Create a new scale object in the database

Value

data.frame

Author(s)

brapir generator package

References

BrAPI SwaggerHub

See Also

Other brapi_1.3: brapi_get_allelematrices_search(), brapi_get_allelematrices(), brapi_get_attributes_categories(), brapi_get_attributes(), brapi_get_breedingmethods_breedingMethodDbId(), brapi_get_breedingmethods(), brapi_get_calls(), brapi_get_commoncropnames(), brapi_get_germplasm_germplasmDbId_attributes(), brapi_get_germplasm_germplasmDbId_markerprofiles(), brapi_get_germplasm_germplasmDbId_mcpd(), brapi_get_germplasm_germplasmDbId_pedigree(), brapi_get_germplasm_germplasmDbId_progeny(), brapi_get_germplasm_germplasmDbId(), brapi_get_germplasm(), brapi_get_images_imageDbId(), brapi_get_images(), brapi_get_lists_listDbId(), brapi_get_lists(), brapi_get_locations_locationDbId(), brapi_get_locations(), brapi_get_maps_mapDbId_positions_linkageGroupName(), brapi_get_maps_mapDbId_positions(), brapi_get_maps_mapDbId(), brapi_get_maps(), brapi_get_markerprofiles_markerProfileDbId(), brapi_get_markerprofiles(), brapi_get_markers_markerDbId(), brapi_get_markers(), brapi_get_methods_methodDbId(), brapi_get_methods(), brapi_get_observationlevels(), brapi_get_observationunits(), brapi_get_ontologies(), brapi_get_people_personDbId(), brapi_get_people(), brapi_get_programs(), brapi_get_samples_sampleDbId(), brapi_get_samples(), brapi_get_scales_scaleDbId(), brapi_get_scales(), brapi_get_search_germplasm_searchResultsDbId(), brapi_get_search_images_searchResultsDbId(), brapi_get_search_markers_searchResultsDbId(), brapi_get_search_observationtables_searchResultsDbId(), brapi_get_search_observationunits_searchResultsDbId(), brapi_get_search_programs_searchResultsDbId(), brapi_get_search_samples_searchResultsDbId(), brapi_get_search_studies_searchResultsDbId(), brapi_get_search_variables_searchResultsDbId(), brapi_get_seasons(), brapi_get_studies_studyDbId_germplasm(), brapi_get_studies_studyDbId_layouts(), brapi_get_studies_studyDbId_observations(), brapi_get_studies_studyDbId_observationunits(), brapi_get_studies_studyDbId_observationvariables(), brapi_get_studies_studyDbId_table(), brapi_get_studies_studyDbId(), brapi_get_studies(), brapi_get_studytypes(), brapi_get_traits_traitDbId(), brapi_get_traits(), brapi_get_trials_trialDbId(), brapi_get_trials(), brapi_get_variables_observationVariableDbId(), brapi_get_variables(), brapi_get_vendor_orders_orderId_plates(), brapi_get_vendor_orders_orderId_results(), brapi_get_vendor_orders_orderId_status(), brapi_get_vendor_orders(), brapi_get_vendor_plates_submissionId(), brapi_get_vendor_specifications(), brapi_post_allelematrices_search(), brapi_post_images(), brapi_post_lists_listDbId_items(), brapi_post_lists(), brapi_post_methods(), brapi_post_people(), brapi_post_phenotypes(), brapi_post_search_germplasm(), brapi_post_search_images(), brapi_post_search_markers(), brapi_post_search_observationtables(), brapi_post_search_observationunits(), brapi_post_search_programs(), brapi_post_search_samples(), brapi_post_search_studies(), brapi_post_search_variables(), brapi_post_studies_studyDbId_table(), brapi_post_traits(), brapi_post_vendor_orders(), brapi_post_vendor_plates(), brapi_put_images_imageDbId_imagecontent(), brapi_put_images_imageDbId(), brapi_put_lists_listDbId(), brapi_put_methods_methodDbId(), brapi_put_people_personDbId(), brapi_put_samples(), brapi_put_scales_scaleDbId(), brapi_put_studies_studyDbId_layouts(), brapi_put_studies_studyDbId_observations(), brapi_put_studies_studyDbId_observationunits(), brapi_put_traits_traitDbId()

Other Observation Variables: brapi_get_methods_methodDbId(), brapi_get_methods(), brapi_get_ontologies(), brapi_get_scales_scaleDbId(), brapi_get_scales(), brapi_get_search_variables_searchResultsDbId(), brapi_get_studies_studyDbId_observationvariables(), brapi_get_traits_traitDbId(), brapi_get_traits(), brapi_get_variables_observationVariableDbId(), brapi_get_variables(), brapi_post_methods(), brapi_post_search_variables(), brapi_post_traits(), brapi_put_methods_methodDbId(), brapi_put_scales_scaleDbId(), brapi_put_traits_traitDbId()

Examples

## Not run: 

# Create a connection object
con <- brapi_db()$testserver

# Create an ontologyReference example list object
# ontologyDbId should be specified as an existing one (see get /ontologies) or
# left empty (some servers might generate a new ontologyDbId).
ontologyReference <- list(
  documentationLinks = data.frame(URL = "https://Ontology.org/s5",
                                  type = "RDF"),
  ontologyDbId = "MO_123",
  ontologyName = "Ontology.org",
  version = "17")

# Create an validValues example list object
# If categories is used max and min have to be 0, vice versa when specifying
# max and min for a numerical or date scale the categories should specified
# as "".
validValues <- list(
  categories = c("xs", "s", "m", "l", "xl", "xxl"),
  max = 0,
  min = 0)

# Make post /scales call
brapi_post_scales(con = con,
                  dataType = "Ordinal",
                  decimalPlaces = 0,
                  ontologyReference = ontologyReference,
                  scaleName = 'clothing sizes',
                  validValues = validValues,
                  xref = "xref")

## End(Not run)


mverouden/brapir documentation built on April 10, 2022, 5:36 p.m.