get_associations {gwasrapidd} | R Documentation |
Get GWAS Catalog associations
Description
Retrieves associations 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 associations 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
associations that match simultaneously all criteria provided, then set
set_operation
to 'intersection'
.
Usage
get_associations(
study_id = NULL,
association_id = NULL,
variant_id = NULL,
efo_id = NULL,
pubmed_id = NULL,
efo_trait = NULL,
set_operation = "union",
interactive = TRUE,
verbose = FALSE,
warnings = TRUE
)
Arguments
study_id |
A |
association_id |
A |
variant_id |
A |
efo_id |
A character vector of EFO identifiers. |
pubmed_id |
An |
efo_trait |
A |
set_operation |
Either |
interactive |
A logical. If all associations are requested, whether to ask interactively if we really want to proceed. |
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 variant identifiers at once by
passing a vector of identifiers to variant_id
.
Value
An associations object.
Examples
## Not run:
# Get an association by study identifier
get_associations(study_id = 'GCST001085', warnings = FALSE)
# Get an association by association identifier
get_associations(association_id = '25389945', warnings = FALSE)
# Get associations by variant identifier
get_associations(variant_id = 'rs3798440', warnings = FALSE)
# Get associations by EFO trait identifier
get_associations(efo_id = 'EFO_0005537', warnings = FALSE)
## End(Not run)