# NOT RUN {
# likelihoods underlying parent LLR in pedigree:
data(LH_HSg5, SimGeno_example)
Seq.HSg5 <- sequoia(SimGeno_example, LH_HSg5, Module="par")
tail(Seq.HSg5$PedigreePar)
# take bottom 3 individuals:
Pairs <- data.frame(ID1 = c("a01190", "b01191", "a01192"),
ID2 = rep(c("a00012", "b00007"), each=3),
AgeDif = 1, focal = "PO")
# LLRdam & LLRsire:
CalcPairLL(Pairs, SimGeno_example)
# LLRpair is min. of dam & sire LLR, conditional on co-parent:
CalcPairLL(cbind(Pairs, dropPar1=rep(c("dam", "sire"), each=3)),
SimGeno_example, SeqList = Seq.HSg5)
# }
# NOT RUN {
# likelihoods underlying LLR in getMaybeRel output:
data(Ped_griffin, SeqOUT_griffin, package="sequoia")
Geno.griffin <- SimGeno(Ped_griffin, nSnp=200, SnpError = 0.01, ParMis=0.4)
MR <- GetMaybeRel(GenoM = Geno.griffin,
LifeHistData = SeqOUT_griffin$LifeHist,
Module = "par", Err = 0.001)
FivePairs <- MR$MaybePar[1:5, c("ID1", "ID2", "Sex1", "Sex2")]
FivePairs$AgeDif <- NA # pretend unknown age differences
PairLL <- CalcPairLL(Pairs = rbind( cbind(FivePairs, focal = "PO"),
cbind(FivePairs, focal = "HS"),
cbind(FivePairs, focal = "GP")),
GenoM = Geno.griffin,
Err = 0.005, Plot=FALSE)
PairLL[c(1, 6, 11), ]
# LL(FS)==222 : HSHA, HSGP, FAHA more likely than FS
# LL(GP) higher when focal=HS: GP via 'other' parent also considered
# LL(FA) higher when focal=PO: FAHA, or FS of 'other' parent
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab