Learn R Programming

LDlinkR (version 1.4.0)

LDhap: Calculates population specific haplotype frequencies of all haplotypes observed for a list of query variants.

Description

Calculates population specific haplotype frequencies of all haplotypes observed for a list of query variants.

Usage

LDhap(
  snps,
  pop = "CEU",
  token = NULL,
  file = FALSE,
  table_type = "haplotype",
  genome_build = "grch37",
  api_root = "https://ldlink.nih.gov/LDlinkRest"
)

Value

a data frame or list

Arguments

snps

list of between 1 - 30 variants, using an rsID or chromosome coordinate (e.g. "chr7:24966446")

pop

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

token

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

file

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

table_type

Choose from one of four options available to determine output format type...`haplotype`, `variant`, `both` and `merged`. Default = "haplotype".

genome_build

Choose between one of the three options...`grch37` for genome build GRCh37 (hg19), `grch38` for GRCh38 (hg38), or `grch38_high_coverage` for GRCh38 High Coverage (hg38) 1000 Genome Project data sets. Default is GRCh37 (hg19).

api_root

Optional alternative root url for API.

Examples

Run this code
if (FALSE) LDhap(c("rs3", "rs4", "rs148890987"), "CEU", token = Sys.getenv("LDLINK_TOKEN"))
if (FALSE) LDhap("rs148890987", c("YRI", "CEU"), token = Sys.getenv("LDLINK_TOKEN"))

Run the code above in your browser using DataLab