LDtrait: Fetches all SNPs in LD with a given SNP

View source: R/LDlink_query.R

LDtraitR 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

LDtrait(rs, r2 = c("r2", "d"), pop = "GBR", LDlinktoken, min.r2 = 0.1)

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

Value

known variants in GWAS Catalog (including those in LD), If no variant is identified a data frame populated by NA is returned instead

Author(s)

Alessia Visconti

Examples

LDtrait("rs123", "r2", "GBR", "n0tw0rk1ng", min.r2=0.1)

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