Skip to content

rqtl/GWASapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GWASapi - R package to connect to the NHGRI-EBI GWAS Catalog of Summary Statistics

R-CMD-check r-universe badge zenodo DOI


See the API documentation as well as Pjotr Prins's documentation at github.


Installation

Install GWASapi from R universe:

install.packages("GWASapi", repos="https://kbroman.r-universe.dev")

Alternatively, install it from GitHub with the remotes package:

#install.packages("remotes")
library(remotes)
install_github("rqtl/GWASapi")

Usage

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 chromosomes
  • list_studies() - List of studies
  • list_traits() - List of traits
  • info_study() - Metadata about a particular study
  • get_variant() - Get data frame of associations for a particular variant
  • get_asso() - Get associations for a particular chromosome region
  • get_trait_asso() - Get associations for a particular trait

For 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 2 sec because we were getting a lot of "too many requests" errors. It can be controlled with the option GWASapi_delay. For example, to make the delay 2 seconds, use:

options(GWASapi_delay=2)

License

GWASapi is released under the MIT license.

About

R package to connect to the NHGRI-EBI catalog of GWAS summary statistics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

 
 
 

Contributors