# NOT RUN {
data(Ped_HSg5, LH_HSg5, package="sequoia")
## Example A: parentage assignment only
conf.A <- EstConf(Pedigree = 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-3, Tassign=0.5),
nSim = 2)
# parent-pair confidence, per category:
conf.A$ConfProb
# calculate (correct) assignment rates (ignores co-parent)
1 - apply(conf.A$PedErrors, c(1,3), sum, na.rm=TRUE)
## Example B: with sibship clustering, based on sequoia inferred pedigree
RealGenotypes <- SimGeno(Ped = Ped_HSg5, nSnp = 100,
ParMis=c(0.19,0.53), SnpError = 6e-3)
SeqOUT <- sequoia(GenoM = RealGenotypes,
LifeHistData = LH_HSg5,
Err=5e-3, MaxSibIter=10)
conf.B <- EstConf(Pedigree = SeqOUT$Pedigree,
LifeHistData = LH_HSg5,
args.sim = list(nSnp = 100, SnpError = 5e-3,
ParMis=c(0.2, 0.5)),
args.seq = list(Err=5e-3, MaxSibIter = 10),
nSim = 3)
Ped.withConf <- getAssignCat(Pedigree = SeqOUT$Pedigree,
Genotyped = rownames(RealGenotypes))
Ped.withConf <- merge(Ped.withConf, conf.B$ConfProb, all.x=TRUE)
Ped.withConf <- Ped.withConf[, c("id","dam","sire", "dam.conf", "sire.conf",
"id.cat", "dam.cat", "sire.cat")]
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab