require(GenABEL.data)
data(srdta)
# select 10 first SNPs
df <- srdta[,1:10]
# compute effect allele freq
EAF <- summary(gtdata(df))$"Q.2"
# get genotypes of first 2 people
g1 <- as.numeric(df[1:2,])
# blur all genotypes of person 1; use HWE to infer missing
bg1 <- blurGenotype(g1[1,],q=EAF)
# blur all genotypes of person 2; use HWE to infer missing
bg2 <- blurGenotype(g1[2,],q=EAF)
# generate sib-sib transision matrices
trss <- makeTransitionMatrix(EAF,nmei=c(2,2))
getLogLikelihoodGivenRelation(bg1,bg2,trss,EAF)
Run the code above in your browser using DataLab