LDpair: Fetches LD (r2) between two SNPs

View source: R/LDlink_query.R

LDpairR Documentation

Fetches LD (r2) between two SNPs

Description

Uses LDlink Programmatic Access via API (https://ldlink.nci.nih.gov/?tab=ldpair). LDlink allows extracting LD between two given SNPs in a given population. According to the LDLink CoC, this script should be run sequentially.

Usage

LDpair(rs1, rs2, pop = "GBR", LDlinktoken)

Arguments

rs1

reference SNP IDs for the first variant

rs2

reference SNP IDs for the second variant

pop

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

LDlinktoken

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

Value

LD between the two given SNPs in the given population, or NA if one or both of the SNPs is not found

Author(s)

Alessia Visconti

Examples

LDpair("rs123", "rs456", "GBR", "n0tw0rk1ng")

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