hlaLDMatrix: Composite Linkage Disequilibrium in a Region

View source: R/HIBAG.R

hlaLDMatrixR Documentation

Composite Linkage Disequilibrium in a Region

Description

To calculate composite linkage disequilibrium (r2) among SNPs within a region.

Usage

hlaLDMatrix(geno, loci=NULL, maf=0.01, assembly="auto", draw=TRUE,
    verbose=TRUE)

Arguments

geno

an object of hlaSNPGenoClass

maf

MAF filter >= maf

loci

NULL or a character vector, e.g., "A", "B"

assembly

the human genome reference: "hg18", "hg19" (default), "hg38"; "auto" refers to "hg19"; "auto-silent" refers to "hg19" without any warning

draw

if TRUE, return a ggplot2 object

verbose

if TRUE, show information

Value

Return a ggplot2 object if draw=TRUE or a matrix correlation.

Author(s)

Xiuwen Zheng

References

Weir BS, Cockerham CC: Complete characterization of disequilibrium at two loci; in Feldman MW (ed): Mathematical Evolutionary Theory. Princeton, NJ: Princeton University Press, 1989.

Examples

region <- 500*1000   # basepair
geno <- hlaGenoSubsetFlank(HapMap_CEU_Geno, "A", region)
summary(geno)

hlaLDMatrix(geno, "A")

zhengxwen/HIBAG documentation built on Nov. 24, 2024, 5:24 a.m.