get_LD_pairs: Gets the LD between all the pairs of snps (that are in the...

Description Usage Arguments Value Examples

View source: R/proxy_search.R

Description

Gets the LD between all the pairs of snps (that are in the same contig) from the set provided by the input dataframe

Usage

1
get_LD_pairs(rsids_and_chr, pop, token)

Arguments

rsids_and_chr

is a dataframe that contains (at least) the following two columns: CHR, rsid

pop

the population codes (or vector thereof) in which the LD is calculated e.g. c("CEU"), c("CEU","YRI")

token

is an access token to the nci API. if you don't have a token go here: https://ldlink.nci.nih.gov/?tab=apiaccess

Value

a dataframe containing the following columns: CHR, RS_number, variable, value where CHR is the contig on which the snps are RS_number and variable are the two snps being compared and value is the R^2 value between them

Examples

1
2
3
4
5
6
7
8
## Not run: 
   # returns DF with 4 rows
   get_LD_pairs(data.frame(CHR="chr9", 
                           rsid=c("rs10760259","rs635634")),
                           pop=c("CEU"), 
                           token=Sys.getenv("LDLINK_TOKEN"))

## End(Not run)

richardslab/MRutils documentation built on Dec. 22, 2021, 4 p.m.