Hi , is it possible to calculate ld-measures D, D', r and perhaps corresponding p-values with r IF THE PHASE IS KNOWN? The genetics - package provides the LD function only for ambigious phase. Thank you very much Bettina Kulle
Scott D Chasalow
2005-Mar-04 16:03 UTC
[R] 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:> Hi , > is it possible to calculate ld-measures D, D', r and > perhaps corresponding p-values with r IF THE > PHASE IS KNOWN? > The genetics - package provides the LD function > only for ambigious phase. > > Thank you very much > > Bettina Kulle > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
Reasonably Related Threads
- extracting p-values from the Manova function (car library)
- *** caught segfault *** when using impute.knn (impute package)
- linkage disequilibrium
- create data frame(s) from a list with different numbers of rows
- Calculating Linkage Disequilibrium for Microsatellite Markers?