get_traits {gwasrapidd} | R Documentation |
Get GWAS Catalog EFO traits
Description
Retrieves traits via the NHGRI-EBI GWAS Catalog REST API. The REST
API is queried multiple times with the criteria passed as arguments (see
below). By default all traits that match the criteria supplied in the
arguments are retrieved: this corresponds to the default option
set_operation
set to 'union'
. If you rather have only the
traits that match simultaneously all criteria provided, then set
set_operation
to 'intersection'
.
Usage
get_traits(
study_id = NULL,
association_id = NULL,
efo_id = NULL,
pubmed_id = NULL,
efo_uri = NULL,
efo_trait = NULL,
set_operation = "union",
verbose = FALSE,
warnings = TRUE
)
Arguments
study_id |
A |
association_id |
A |
efo_id |
A character vector of EFO identifiers. |
pubmed_id |
An |
efo_uri |
A |
efo_trait |
A |
set_operation |
Either |
verbose |
A |
warnings |
A |
Details
Please note that all search criteria are vectorised, thus allowing for batch
mode search, e.g., one can search by multiple trait identifiers at once by
passing a vector of identifiers to efo_id
.
Value
A traits object.
Examples
## Not run:
# Get traits by study identifier
get_traits(study_id = 'GCST001085', warnings = FALSE)
# Get traits by association identifier
get_traits(association_id = '25389945', warnings = FALSE)
# Get a trait by its EFO identifier
get_traits(efo_id = 'EFO_0005537', warnings = FALSE)
## End(Not run)