require(GenABEL.data)
data(srdta)
# select 10 first SNPs
df <- srdta[,1:10]
# compute effect allele freq
EAF <- summary(gtdata(df))$"Q.2"
EAF
# get genotypes of first 5 people
g1 <- as.numeric(df[1:5,])
g1
# blur the genotype of person 1, snp 1
blurGenotype(g1[1,1])
# blur all genotypes of person 2; assume no info for missing
blurGenotype(g1[2,])
# blur all genotypes of person 2; use HWE to infer missing
blurGenotype(g1[2,],q=EAF)
Run the code above in your browser using DataLab