LD | R Documentation |
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)
x |
an object of class |
locus |
a vector of two integers giving the loci to analyse. |
details |
a logical value indicating whether to print the correlation matrix among alleles. |
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).
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 |
For LD2
: if details = TRUE
, a named list with two
elements:
Delta |
the correlations among alleles (denoted |
T2 |
the |
Emmanuel Paradis
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.