| Title: | NHGRI-EBI GWAS Catalog of Summary Statistics |
|---|---|
| Description: | Tools for connecting to the NHGRI-EBI API for GWAS summary statistics. |
| Authors: | Karl W Broman [aut, cre]
|
| Maintainer: | Karl W Broman <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1-4 |
| Built: | 2026-06-07 21:08:24 UTC |
| Source: | https://github.com/rqtl/GWASapi |
Check if the GWAS Catalog is live
check_gwasapi()check_gwasapi()
Character string.
check_gwasapi()check_gwasapi()
Get GWAS associations for a given region
get_asso( chr, bp_lower = NULL, bp_upper = NULL, study = NULL, p_lower = NULL, p_upper = NULL, start = NULL, size = NULL )get_asso( chr, bp_lower = NULL, bp_upper = NULL, study = NULL, p_lower = NULL, p_upper = NULL, start = NULL, size = NULL )
chr |
chromosome number |
bp_lower |
Lower endpoint of basepairs initerval |
bp_upper |
Upper endpoint of basepairs initerval |
study |
Restrict to a particular study |
p_lower |
Lower bound on p-values |
p_upper |
Upper bound of p-values |
start |
First record to retrieve (starting at 0) |
size |
Maximum number of results to retrieve |
Data frame of associations
get_variant(), get_trait_asso()
result <- get_asso(chr=19, bp_lower=19200000, bp_upper=19300000)result <- get_asso(chr=19, bp_lower=19200000, bp_upper=19300000)
Get GWAS associations for a particular trait
get_trait_asso( trait = NULL, study = NULL, p_lower = NULL, p_upper = NULL, start = NULL, size = NULL )get_trait_asso( trait = NULL, study = NULL, p_lower = NULL, p_upper = NULL, start = NULL, size = NULL )
trait |
Restrict to a particular study |
study |
Restrict to a particular study |
p_lower |
Lower bound on p-values |
p_upper |
Upper bound of p-values |
start |
First record to retrieve (starting at 0) |
size |
Maximum number of results to retrieve |
Data frame of associations
## Not run: result <- get_trait_asso("EFO_0001360", p_upper=1e-10)## Not run: result <- get_trait_asso("EFO_0001360", p_upper=1e-10)
Get all associations for a given variant
get_variant( rsnum, chr = NULL, p_lower = NULL, p_upper = NULL, study = NULL, start = NULL, size = NULL )get_variant( rsnum, chr = NULL, p_lower = NULL, p_upper = NULL, study = NULL, start = NULL, size = NULL )
rsnum |
RS number for a variant |
chr |
chromosome number if known |
p_lower |
Lower bound on p-values |
p_upper |
Upper bound of p-values |
study |
Restrict to a particular study |
start |
First record to retrieve (starting at 0) |
size |
Maximum number of results to retrieve |
Data frame with associations as rows
# get associations for a given variant results <- get_variant("rs2228603") # use information about the chromosome it's on results <- get_variant("rs2228603", 19) # get the next 20 results next20 <- get_variant("rs2228603", 19, start=20) # get 100 results rather than just 20 first100 <- get_variant("rs2228603", 19, size=100) # return just the associations with P < 1e-8 top_results <- get_variant("rs2228603", 19, p_upper=1e-8)# get associations for a given variant results <- get_variant("rs2228603") # use information about the chromosome it's on results <- get_variant("rs2228603", 19) # get the next 20 results next20 <- get_variant("rs2228603", 19, start=20) # get 100 results rather than just 20 first100 <- get_variant("rs2228603", 19, size=100) # return just the associations with P < 1e-8 top_results <- get_variant("rs2228603", 19, p_upper=1e-8)
Information about a particular study
info_study(study)info_study(study)
study |
Study identifieer |
List of meta-data
List chromosomes
list_chr()list_chr()
Vector of chromosome numbers (as integers)
chr <- list_chr()chr <- list_chr()
List studies
list_studies(trait = NULL, start = NULL, size = NULL)list_studies(trait = NULL, start = NULL, size = NULL)
trait |
If provided, restrict search to studies that included the specified trait. |
start |
First record to retrieve (starting at 0) |
size |
Maximum number of results to retrieve |
Vector of study accessions
first20 <- list_studies() # returns 20 studies next20 <- list_studies(start=20) # returns the next 20 studies first100 <- list_studies(size=100) # returns 100 studies with_trait <- list_studies(trait="EFO_0001360")first20 <- list_studies() # returns 20 studies next20 <- list_studies(start=20) # returns the next 20 studies first100 <- list_studies(size=100) # returns 100 studies with_trait <- list_studies(trait="EFO_0001360")
List traits
list_traits(start = NULL, size = NULL)list_traits(start = NULL, size = NULL)
start |
First record to retrieve (starting at 0) |
size |
Maximum number of results to retrieve |
Vector of trait IDs
first20 <- list_traits() # first 20 traits next20 <- list_traits(start=20) # the next 20 traits first100 <- list_traits(size=100) # returns 100 traitsfirst20 <- list_traits() # first 20 traits next20 <- list_traits(start=20) # the next 20 traits first100 <- list_traits(size=100) # returns 100 traits