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
character
vector of GWAS Catalog study accession identifiers.- association_id
A
character
vector of GWAS Catalog association identifiers.- efo_id
A character vector of EFO identifiers.
- pubmed_id
An
integer
vector of PubMed identifiers.- efo_uri
A
character
vector of EFO URIs.- efo_trait
A
character
vector of EFO trait descriptions, e.g.,'uric acid measurement'
.- set_operation
Either
'union'
or'intersection'
. This tells how traits retrieved by different criteria should be combined:'union'
binds together all results removing duplicates and'intersection'
only keeps same traits found with different criteria.- verbose
A
logical
indicating whether the function should be verbose about the different queries or not.- warnings
A
logical
indicating whether to print warnings, if any.
Value
A traits object.