pegas (version 0.14)

LD: Linkage Disequilibrium

Description

These two functions analyse linkage disequilibrium in the case of phased (LD) or unphased (LD2) genotypes.

Usage

LD(x, locus = c(1, 2), details = TRUE)
LD2(x, locus = c(1, 2), details = TRUE)

Arguments

x

an object of class "loci".

locus

a vector of two integers giving the loci to analyse.

details

a logical value indicating whether to print the correlation matrix among alleles.

Value

For both functions, if details = FALSE, only the T2 test is returned.

For LD: if details = TRUE, a named list with the following elements:

Observed frequencies

the counts of haplotypes in the data.

Expected frequencies

the expected frequencies of haplotypes computed from the observed proportions of alleles under the assumption of no linkage disequilibrium.

Correlations among alleles

the observed correlations among alleles from both loci.

LRT (G-squared)

the likelihood-ratio test of the null hypothesis of no linkage disequilibrium.

Pearson's test (chi-squared)

the chi-squared test based on haplotypes counts.

T2

the \(T_2\) test with its number of degrees of freedom (df).

For LD2: if details = TRUE, a named list with two elements:

Delta

the correlations among alleles (denoted \(Delta\) in Schaid 2004).

T2

the \(T_2\) test with its number of degrees of freedom (df).

Details

These functions consider a pair of loci and compute the correlations among pairs of alleles.

LD first scans the data for unphased genotypes: all individuals with at least one unphased genotype are dropped with a warning. It is based on the observed frequencies of haplotypes (Zaykin et al. 2008). LD2 is based on the observed frequencies of different genotypes (Schaid 2004).

Both functions accept any number of alleles. LD can work with any level of ploidy; LD2 works with diploid data.

The present version does not test the significance of the \(T_2\) test (Zaykin et al. 2008) with permutations. These authors present simulation results suggesting that the chi-squared approximation has similar type I error rates and power than the test based on permutations even for small sample sizes. Furthermore, this test has better statistical properties than alternatives such as those reported here (LRT and Pearson's test).

References

Schaid, D. J. (2004) Linkage disequilibrium testing when linkage phase is unknown. Genetics, 166, 505--512.

Zaykin, D. V., Pudovkin, A. and Weir, B. S. (2008) Correlation-based inference for linkage disequilibrium with multiple alleles. Genetics, 180, 533--545.

See Also

haplotype.loci, is.phased, LDscan

Examples

Run this code
# NOT RUN {
data(jaguar)
LD2(jaguar, details = FALSE)
LD2(jaguar, locus = 8:9, details = FALSE)
# }

Run the code above in your browser using DataLab