Description Usage Arguments Value Author(s) References See Also Examples
Given SNPs stored in an object of class "SnpMatrix"
or
"XSnpMatrix"
and a set of imputation rules in an object of
class "ImputationRules"
, this function calculates imputed values.
1 | impute.snps(rules, snps, subset = NULL, as.numeric = TRUE)
|
rules |
The imputation rules; an object of class
|
snps |
The object of class |
subset |
A vector describing the subset of subjects
to be used. If |
as.numeric |
If |
A matrix with imputed SNPs as columns. The imputed values are the estimated expected values of each SNP when coded 0, 1 or 2.
David Clayton dc208@cam.ac.uk
Wallace, C. et al. (2010) Nature Genetics, 42:68-71
1 2 3 4 5 6 7 8 9 10 | # Remove 5 SNPs from a datset and derive imputation rules for them
data(for.exercise)
sel <- c(20, 1000, 2000, 3000, 5000)
to.impute <- snps.10[,sel]
impute.from <- snps.10[,-sel]
pos.to <- snp.support$position[sel]
pos.fr <- snp.support$position[-sel]
imp <- snp.imputation(impute.from, to.impute, pos.fr, pos.to)
# Now calculate the imputed values
imputed <- impute.snps(imp, impute.from)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.