link_LD: Obtain LD at a locus from LDlink

View source: R/link_LD.R

link_LDR Documentation

Description

Adds LD information to a 'locus' class object. It queries LDlink (https://ldlink.nci.nih.gov/) via the LDlinkR package to retrieve linkage disequilibrium (LD) information on a reference SNP.

Usage

link_LD(
  loc,
  pop = "CEU",
  r2d = "r2",
  token = "",
  method = c("proxy", "matrix"),
  ...
)

Arguments

loc

Object of class 'locus' generated by locus()

pop

A 1000 Genomes Project population, (e.g. YRI or CEU), multiple allowed, default = "CEU". Passed to LDlinkR::LDmatrix().

r2d

Either "r2" for LD r^2 or "d" for LD D', default = "r2". Passed to LDlinkR::LDmatrix() or LDproxy().

token

Personal access token for accessing 1000 Genomes LD data via LDlink API. See LDlinkR package documentation.

method

Either "proxy" or "matrix". Controls whether to use LDproxy() or LDmatrix() to obtain LD data.

...

Optional arguments such as genome_build which are passed on to LDlinkR::LDmatrix() or LDlinkR::LDproxy()

Details

The argument method controls which LDlinkR function is used to retrieve LD data. LDmatrix() is slower but usually more complete for small queries (<1000 SNPs). However, it has a limit of 1000 SNPs which can be queried. LDproxy() is faster but data on some SNPs may be absent.

Note SNPs have to be correctly formatted as required by LDlinkR, either as rsID or chromosome coordinate e.g. "chr7:24966446". Default genome build is grch37, see LDproxy() or LDmatrix().

Value

Returns a list object of class 'locus'. LD information is added as a column ld in list element data.

See Also

locus()


myles-lewis/locuszoomr documentation built on April 16, 2024, 11:13 p.m.