get_traits | R Documentation |
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'
.
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
)
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 |
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
.
A traits object.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.