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
x = addMarker(x, S1 = "1/2", alleles = 1:4)
# 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)
# \donttest{
### With mutations
# Add inconsistent marker
x = addMarker(x, S1 = "1/2", Father = "3/3", alleles = 1:4)
# 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)
# }
Run the code above in your browser using DataLab