ld.snp
takes an object of snp.matrix
class and suitable
range and depth and calculation the pairwise D', $r^2$, LOD and return
the result as a snp.dprime
object.ld.snp(snpdata, depth = 100, start = 1, end = dim(snpdata)[2], signed.r=FALSE)
snp.matrix
class with M samples of
N snpssnp.dprime
object, which is a list of 3 named
matrices dprime
, rsq2
(or r
depending on the input), lod
, and an attribute
snp.names
for the list of snps involved. (Note that if $x$ snps
are involved, the row numbers of the 3 matrices are $(x-1)$).
Only one of rsq2
or r
is present.snp.dprime-class
,
plot.snp.dprime
, ld.with
# LD stats between 500 SNPs at a depth of 50
data(testdata)
ldinfo <- ld.snp(Autosomes, start=1, end=500, depth=50)
Run the code above in your browser using DataLab