Learn R Programming

LDlinkR (version 1.1.2)

LDpair: Investigates potentially correlated alleles for a pair of variants.

Description

Investigates potentially correlated alleles for a pair of variants.

Usage

LDpair(var1, var2, pop = "CEU", token = NULL, output = "table", file = FALSE)

Arguments

var1

the first RS number or genomic coordinate (e.g. "chr7:24966446")

var2

the second RS number or genomic coordinate (e.g. "ch7:24966446")

pop

a 1000 Genomes Project population(s), (e.g. YRI or CEU), multiple allowed, default = "CEU"

token

LDlink provided user token, default = NULL, register for token at https://ldlink.nci.nih.gov/?tab=apiaccess

output

two output options available, "text", which displays a two-by-two matrix displaying haplotype counts and allele frequencies along with other statistics, or "table", which displays the same data in rows and columns, default = "table"

file

Optional character string naming a path and file for saving results. If file = FALSE, no file will be generated, default = FALSE.

Value

text or data frame, depending on the output option

Examples

Run this code
# NOT RUN {
LDpair(var1 = "rs3", var2 = "rs4", pop = "YRI", token = Sys.getenv("LDLINK_TOKEN"))
# }
# NOT RUN {
LDpair("rs3", "rs4", "YRI", token = Sys.getenv("LDLINK_TOKEN"), "text")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab