ld.snp3 {Relate} | R Documentation |
ld.snp3
takes an genotype matrix and a suitable depth LOD and returns a list of
r-square, lods and pba's.
ld.snp3(snpdata, back = 100)
snpdata |
An genotype matrix with M samples of N snps |
back |
The depth or lag of pair-wise calculation. Should be between 1 and N-1; default 100. |
This function was used during development and is quite borrowed from the snpMatrix function called ld.snp(). The cubic equation and quadratic equation solver code is borrowed from GSL (GNU Scientific Library).
dprime |
D' |
rsq2 |
$r^2$ |
r |
signed $r$ |
lod |
Log of Odd's |
All the matrices are defined such that the ($n, m$)th entry is the
pair-wise value between the ($n$)th snp and the $(n+m)$th snp. Hence
the lower right triangles are always filled with zeros. (See example
section for the actual layout)
Invalid values are represented by an out-of-range value - currently we
use -1 for D', $r^2$ (both of which are between 0 and 1), and -2 for
$r$ (valid values are between -1 and +1). lod is set to zero in
most of these invalid cases. (lod can be any value so it is not indicative).
Thorfinn Sand thorfinn@binf.ku.dk
Anders albrechtsen, Thorfinn Sand Korneliussen
Clayton, D.G. and Leung, Hin-Tak (2007) An R package for analysis of
whole-genome association studies.
Human Heredity 64:45-51.
GSL (GNU Scientific Library) http://www.gnu.org/software/gsl/