See the API documentation as well as Pjotr Prins's documentation at github.
You can install GWASapi from GitHub.
You first need to install the devtools.
install.packages("devtools")
Then use devtools::install_github()
to install GWASapi.
library(devtools)
install_github("rqtl/GWASapi")
For an understanding of the NHGRI-EBI GWAS Catalog of Summary Statistics API, see its documentation, as well as Pjotr Prins's documentation at github
The GWASapi package has a set of functions for connecting to the GWAS Catalog:
check_gwasapi()
- Check connection.list_chr()
- List chromosomeslist_studies()
- List of studieslist_traits()
- List of traitsinfo_study()
- Metadata about a particular studyget_variant()
- Get data frame of associations for a particular variantget_asso()
- Get associations for a particular chromosome regionget_trait_asso()
- Get associations for a particular traitFor examples, see the online vignette, which is also available from within R:
vignette("GWASapi")
Note that we enforce a delay between calls to the API, to slow
repeated calls within a loop. The default is 1 sec; it can be
controlled with the option GWASapi_delay
. For example, to make the
delay 0.5 seconds, use:
options(GWASapi_delay=0.5)
GWASapi is released under the MIT license.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.