| MPPsims | R Documentation |
Estimate the exclusion/inclusion power for various selections of available individuals.
MPPsims(
reference,
missing = "MP",
selections,
ep = TRUE,
ip = TRUE,
addBaseline = TRUE,
nProfiles = 1,
lrSims = 1,
thresholdIP = NULL,
disableMutations = NA,
seed = NULL,
numCores = 1,
verbose = TRUE
)
reference |
A connected |
missing |
The ID label of the missing pedigree member. |
selections |
A list of pedigree member subsets. In the special case that all
subsets consist of a single individual, |
ep |
A logical: Estimate the exclusion power? (Default: TRUE) |
ip |
A logical: Estimate the inclusion power? (Default: TRUE) |
addBaseline |
A logical. If TRUE (default) an empty selection, named "Baseline",
is added as the first element of |
nProfiles |
The number of profile simulations for each selection. |
lrSims, thresholdIP |
Parameters passed onto |
disableMutations |
This parameter determines how mutation models are treated. Possible values are as follows:
|
seed |
An integer seed for the random number generator (optional). |
numCores |
Deprecated and ignored. |
verbose |
A logical. |
An object of class "MPPsim", which is basically a list with one entry for each
element of selections. Each entry has elements ep and ip, each of which is a
list of length nProfiles.
The output object has various attributes reflecting the input. Note that reference
and selection may differ slightly from the original input, since they may be
modified during the function run. (For instance, a "Baseline" entry is added to
selection if addBaseline is TRUE.) The crucial point is that the output
attributes correspond exactly to the output data.
reference (always a list, of the same length as the selections attribute)
selections
nProfiles,lrSims,thresholdIP,seed (as in the input)
totalTime (the total time used)
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
MPpowerPlot(simData, type = 3)
### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.