Get traits measured from a single trial via BrAPI
getTraitsFromSingleTrial.RdQueries the BrAPI /search/variables endpoint for a given trial and
returns a data frame of traits and their DbIds measured in that trial
Arguments
- study_id
A single studyDbId to query germplasm for.
- brapiConnection
A BrAPI connection object, typically from
BrAPI::createBrAPIConnection(), with a$search()method.- verbose
Logical; if
TRUE, print messages about the retrieval process.
Value
A data frame of traits for the given trial, with one row per trait
Columns include observationVariableDbId and
observationVariableName. If no result is found, not sure what
happens...
Examples
if (FALSE) { # \dontrun{
brapiConn <- BrAPI::createBrAPIConnection("wheat-sandbox.triticeaetoolbox.org", is_breedbase = TRUE)
traits_df <- getTraitsFromSingleTrial("8128", brapiConn)
traits_df
} # }