Hi,


Does anybody know how to obtain the imputed SNP genotype probabilities from the 
snpStats package?



I am interested in using an imputation method implemented in R to be further 
used in a simulation study context.

I have found the snpStats package that seems to contain suitable functions to 
do so.

As far as I could find out from the package vignette examples and its help, it 
gives the 'dosage' as the output which is the expected number of risk alleles 
as a single value. However I need the 3 genotype probabilities (the probability 
of having 0, 1 and 2 risk allele copies) and not the 'dosage'. I couldn't find 
out how to obtain these probabilities.



To illustrate this, here is the code from the snpStats vignette:



##### snpStats vignette example ###



library(snpStats)

library(hexbin)

data(for.exercise)



training <- sample(1000, 200)

select <- seq(1, ncol(snps.10), 2)

missing <- snps.10[training, select]

present <- snps.10[training, -select]



target <- snps.10[-training, -select]



lost <- snps.10[-training, select]



pos.miss <- snp.support$position[select]

pos.pres <- snp.support$position[-select]



rules <- snp.imputation(present, missing, pos.pres, pos.miss)



imputed <- impute.snps(rules, target, as.numeric = FALSE)



########



The 'imputed' object stores the imputed SNP, but it contains the dosage or the 
genotypes but under 'raw' class, and I don't know how to extract the genotype 
probabilities from this object.





Thanks in advance.



Isaac Subirana.




        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to