# NOT RUN {
x = nuclearPed(fa = "Gf", mo = "Gm", children = c("Uncle", "Mother"), sex = 1:2)
x = addChildren(x, fa = "Father", mo = "Mother", nch = 3, sex = c(1,2,1),
id = c("S1", "S2", "MP"))
x = addSon(x, "Father", id = "HS")
# Brother S1 is already genotyped with a marker with 4 alleles
m = marker(x, S1 = 1:2, alleles = 1:4)
x = setMarkers(x, m)
# Alternatives for additional genotyping
sel = list("Father", "S2", "HS", c("Gm", "Uncle"))
plot(x, marker = 1, hatched = sel)
# Simulate
simData = MPPsims(x, selections = sel, nProfiles = 2, lrSims = 2)
# Power plot
powerPlot(simData, type = 3)
# }
# NOT RUN {
### With mutations
# Create inconsistent marker
m2 = m
genotype(m2, "Father") = 3
x = setMarkers(x, list(m, m2))
# Set mutation models for both
mutmod(x, 1:2) = list("equal", rate = 0.1)
# By default mutations are disabled for consistent markers
# MPPsims(x, selections = "Father", addBaseline = FALSE)
# Don't disable anything
# MPPsims(x, selections = "Father", addBaseline = FALSE,
# disableMutations = FALSE)
# Disable all mutation models. SHOULD GIVE ERROR FOR SECOND MARKER
# MPPsims(x, selections = "Father", addBaseline = FALSE,
# disableMutations = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab