These two functions analyse linkage disequilibrium in the case of
phased (LD
) or unphased (LD2
) genotypes.
LD(x, locus = c(1, 2), details = TRUE)
LD2(x, locus = c(1, 2), details = TRUE)
For both functions, if details = FALSE
, only the T2 test is
returned.
For LD
: if details = TRUE
, a named list with the
following elements:
the counts of haplotypes in the data.
the expected frequencies of haplotypes computed from the observed proportions of alleles under the assumption of no linkage disequilibrium.
the observed correlations among alleles from both loci.
the likelihood-ratio test of the null hypothesis of no linkage disequilibrium.
the chi-squared test based on haplotypes counts.
the \(T_2\) test with its number of degrees of freedom (df).
For LD2
: if details = TRUE
, a named list with two
elements:
the correlations among alleles (denoted \(Delta\) in Schaid 2004).
the \(T_2\) test with its number of degrees of freedom (df).
an object of class "loci"
.
a vector of two integers giving the loci to analyse.
a logical value indicating whether to print the correlation matrix among alleles.
Emmanuel Paradis
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).
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.
haplotype.loci
, is.phased
,
LDscan
data(jaguar)
LD2(jaguar, details = FALSE)
LD2(jaguar, locus = 8:9, details = FALSE)
Run the code above in your browser using DataLab