LDmeasure: Linkage Disequilibrium (LD) Measures

LDmeasureR Documentation

Linkage Disequilibrium (LD) Measures

Description

Functions for computing LD measures for predefined (or estimated) allele frequency values and a predefined (or estimated) disequilibrium coefficient value.

Usage

Dcoef(pA1, pA2, D)

Dprime(pA1, pA2, D)

r2(pA1, pA2, D)

Arguments

pA1

Allele frequency for the first SNP

pA2

Allele frequency for the second SNP

D

Disequilibrium coefficient

Details

The LD measures available in GUSLD are:

Dcoef

The disequilibrium coefficient \insertCitelewontin1960evolutionGUSLD defined as D=p_{A_1A_2}-p_{A_1}p_{A_2}

Dprime

The normalized disequilibrium coefficient \insertCitelewontin1964geneticsGUSLD defined as D'=D/D_{max} where D_{max} = min(p_{A_1}p_{A_2},(1-p_{A_1})(1-p_{A_2})) if D>0 and D_{max} = min(p_{A_1}(1-p_{A_2}),(1-p_{A_1})p_{A_2})

r2

The squared correlation coefficient \insertCitehill1968TAGGUSLD defined as r^2=D^2/\sqrt{p_{A_1}p_{A_2}(1-p_{A_1})(1-p_{A_2})}

where p_{A_1A_2} is the probability of observing a haplotype containing the reference allele at both loci, p_{A_1} is the major allele frequency at the first SNP and p_{A_2} is the allele frequency at the second SNP. One can also specify their own LD measure (see examples below).

Value

A numeric value giving the value of the LD measure

Author(s)

Timothy P. Bilton

References

\insertAllCited

Examples

Dcoef(0.25,0.25,0.1)
Dprime(0.25,0.25,0.1)
r2(0.25,0.25,0.1)

## One can also define there own LD measure which GUSLD can use
## e.g., the correlation coefficient
LD_r <- function(pA1,pA2,D){
return( D/sqrt((prod(c(pA1,pA2,1-c(pA1,pA2))))) )
}

AgResearch/GUS-LD documentation built on Feb. 24, 2025, 5:45 p.m.