# NOT RUN {
data(SimGeno_example, LH_HSg5, package="sequoia")
conf.A <- EstConf(Ped = Ped_HSg5, LifeHistData = LH_HSg5,
args.sim = list(nSnp = 100, SnpError = 5e-3, ParMis=c(0.2, 0.5)),
args.seq = list(MaxSibIter = 0, Err=1e-4, Tassign=0.5),
nSim = 3, return.PC = TRUE)
# effect of tweaking AgePriors
# (only some effect due to low no. SNPs & high error rate,
# effect of increasing no. SNPs is much larger)
AP <- MakeAgePrior(Ped = Ped_HSg5, LifeHistData = LH_HSg5,
Flatten = FALSE, Smooth = FALSE)
conf.B <- EstConf(Ped = Ped_HSg5, LifeHistData = LH_HSg5,
args.sim = list(nSnp = 100, SnpError = 5e-3, ParMis=c(0.2, 0.5)),
args.seq = list(MaxSibIter = 0, Err=1e-4, Tassign=0.5,
SeqList = list(AgePriors = AP)),
nSim = 3, return.PC = TRUE)
# with sibship clustering
conf.C <- EstConf(Ped = Ped_HSg5, LifeHistData = LH_HSg5,
args.sim = list(nSnp = 200, SnpError = 5e-3, ParMis=c(0.2, 0.5)),
args.seq = list(MaxSibIter = 10, Err=1e-4, Tassign=0.5),
nSim = 3, return.PC = TRUE)
conf.C$ConfProb[,"GG",] # Genotyped individuals, Genotyped parent
conf.C$ConfProb[,"GD",] # Genotyped individuals, Dummy parent
AR <- apply(conf.C$SimCounts, 1, function(M) M["TT","Match", ]/M["TT","Total", ])
ER <- apply(conf.C$SimCounts, 1,
function(M) (M["TT","Mismatch", ] + M["TT","P2only", ])/M["TT","Total", ])
apply(ER, 1, mean) # separate error rate dams & sires
mean(ER) # overall error rate
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab