Description Usage Arguments Details Value Warning Note Author(s) See Also Examples
This function calculates the LD measures ($r^2$, D', LOD) of specific SNPs against other SNPs.
1 | ld.with(data, snps, include.itself = as.logical(length(snps) - 1), signed.r = NULL)
|
data |
either a |
snps |
A list of snps, some of which are found in |
include.itself |
Whether to include LD measures of SNPs against itself - it is FALSE for one SNP, since in that case, the result is known and trivial; but otherwise TRUE |
signed.r |
Logical, whether to output signed r or $r^2$ |
Not all combinations of the include.itself
and signed.r
make sense, nor fully operational.
The returned value is somewhat similiar to a
snp.dprime
object, but not the same. It is a list of 3 named
matrices dprime
, rsq2
(or r
depending
on the input), lod
.
Because this is really two functions rolled into one, depending on the
class of data
, not all combinations of the
include.itself
and signed.r
make sense, nor fully operational.
Also, the two versions have slightly different idea about invalid values, e.g. the LOD value for a SNPs against itself, or $r^2$ for two monomorphic snps (such as one against itself).
The ld.with
function started its life as an extractor
function to take the output of ld.snp
, a
snp.dprime-class
object, to rearrange it
in a more convenient form to focus on the LD's against specific SNPs,
but then evolved to take a snp.matrix-class
object
alternatively and perform the same task directly and more efficiently.
Hin-Tak Leung htl10@users.sourceforge.net
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.