Re: [R] calculating of linkage-disequilibrium measures?

From: Scott D Chasalow <>
Date: Sat 05 Mar 2005 - 03:03:46 EST

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.


Bettina Kulle wrote:

> Hi ,
> is it possible to calculate ld-measures D, D', r and
> perhaps corresponding p-values with r IF THE
> The genetics - package provides the LD function
> only for ambigious phase.
> Thank you very much
> Bettina Kulle
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!
> mailing list PLEASE do read the posting guide! Received on Sat Mar 05 04:13:19 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:40 EST