LDproxy: Fetches all SNPs in LD with a given SNP

View source: R/LDlink_query.R

LDproxyR Documentation

Fetches all SNPs in LD with a given SNP

Description

Uses LDproxy Programmatic Access via API (https://ldlink.nci.nih.gov/?tab=ldproxy). LDproxy allows extracting all SNPs in LD with an r2 of at least min.r2 and at a maximun distance of max.distance. It processes one SNP at a time. According to the LDLink CoC, this script should be run sequentially.

Usage

LDproxy(
  rs,
  r2 = c("r2", "d"),
  pop = "GBR",
  LDlinktoken,
  min.r2 = 0.01,
  max.distance = 5e+05
)

Arguments

rs

reference SNP ID

r2

whether use r2 or D' (use "r2" and "d", respectively)

pop

population (multiple populations should be formatted as pop1%2pop2%2pop3)

LDlinktoken

personal token (request via https://ldlink.nci.nih.gov/?tab=apiaccess)

min.r2

minum LD (r2) to return

max.distance

maximun distance (in bp) to return

Value

SNPs that are proxies for the given SNP. If no SNPs is identified a data frame populated by NA is returned instead

Author(s)

Alessia Visconti

Examples

LDproxy("rs123", "r2", "GBR", "n0tw0rk1ng", min.r2=0.8, max.distance=500000)

alesssia/timesaveR documentation built on Jan. 26, 2024, 5:21 p.m.