Description Usage Arguments Details Value Warning Note Author(s) Examples
Given a snp.matrix-class or a X.snp.matrix-class object with $N$ samples, calculates some statistics about the relatedness of every pair of samples within.
1 | ibs.stats(x)
|
x |
a snp.matrix-class or a X.snp.matrix-class object containing $N$ samples |
No-calls are excluded from consideration here.
A data.frame containing $N (N-1)/2$ rows, where the row names are the sample name pairs separated by a comma, and the columns are:
Count |
count of identical calls, exclusing no-calls |
Fraction |
fraction of identical calls comparied to actual calls being made in both samples |
In some applications, it may be preferable to subset a (random) selection of SNPs first - the calculation time increases as $N (N-1) M /2$ . Typically for N = 800 samples and M = 3000 SNPs, the calculation time is about 1 minute. A full GWA scan could take hours, and quite unnecessary for simple applications such as checking for duplicate or related samples.
This is mostly written to find mislabelled and/or duplicate samples.
Illumina indexes their SNPs in alphabetical order so the mitochondria SNPs comes first - for most purpose it is undesirable to use these SNPs for IBS purposes.
TODO: Worst-case S4 subsetting seems to make 2 copies of a large object, so one might want to subset before rbind(), etc; a future version of this routine may contain a built-in subsetting facility to work around that limitation.
Hin-Tak Leung htl10@users.sourceforge.net
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.