| snp.imputation {snpMatrix} | R Documentation |
Given two set of SNPs typed in the same subjects, this function calculates regression equations which can be used to impute one set from the other in a subsequent sample.
snp.imputation(X, Y, pos.X, pos.Y, phase=FALSE, try = 50, r2.stop = 0.9, max.X = 4)
X |
An object of class "snpMatrix" or
"X.snp.matrix" containing observations
of the SNPs to be used for imputation ("regressor SNPs") |
Y |
An object of same class as X containing observations
of the SNPs to be imputed in a future sample ("target SNPs") |
pos.X |
The positions of the regressor SNPs |
pos.Y |
The positions of the target SNPs |
phase |
See "Details" below |
try |
The number of potential regressor SNPs to be
considered in the stepwise regression procedure around each target
SNP . The nearest try regressor SNPs to each target SNP
will be considered |
r2.stop |
The value of R^2 at which to stop entering new variables in the step-wise regression. If set to 1.0 or greater, the AIC will be used |
max.X |
The maximum number of regressor SNPs to be used for each imputation |
The routine carries out a series of step-wise regression analyses in
which each Y SNP is regressed on the nearest try regressor SNPs. If
phase is TRUE, the regressions are calculated at the
chromosome (haplotype) level, variances being simply p(1-p) and
covariances estimated
using the same algorithm used in ld.snp. Otherwise, the
analysis is carried out at the diplotype level based on
conventional variance and covariance estimates using the
"all.obs" missing value treatment (see cov).
An object of class
"snp.reg.imputation".
The phase=TRUE option is not yet implemented
David Clayton david.clayton@cimr.cam.ac.uk
Chapman J.M., Cooper J.D., Todd J.A. and Clayton D.G. (2003) Human Heredity, 56:18-31.
snp.reg.imputation-class, ld.snp
# Remove 5 SNPs from a datset and derive imputation rules for them library(snpMatrix) 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)