Skip to content
Prev 65436 / 398525 Next

calculating of linkage-disequilibrium measures?

Taking a lead from Brian, the answer is "yes".  :-)

But just in case you were seeking a somewhat more detailed answer:
If phase is known, it is not only possible to compute all these LD 
measures in R, it is much simpler.

For example, if you have alleles A and a at locus 1, and B and b at 
locus 2, and you let p(i) = relative frequency of gamete genotype i, 
then D = p(AB) - p(A)p(B).  If you have these relative frequencies 
stored e.g. in a matrix, you don't really need a special function to 
compute D.  D' is marginally more complicated, and worth a function. 
(Unfortunately, I am not at present at liberty to send you mine.  But 
I'm working on that.)  The R^2 statistic typically used in this context 
is, for 2-allele loci, simply X2/N, where X2 is the Pearson X2 statistic 
to test for association in the 2x2 table, and N is the number of 
gametes.  You might find function chisq.test of interest.  Although, if 
you want to do this for 100,000s of locus pairs, there are MUCH faster ways.

Cheers,
Scott
Bettina Kulle wrote: