lumpAlleles | R Documentation |
Perform allele lumping (i.e., merging unobserved alleles) for all markers attached to the input pedigree.
lumpAlleles(
x,
markers = NULL,
always = FALSE,
special = TRUE,
alleleLimit = Inf,
verbose = FALSE
)
x |
A |
markers |
A vector of names or indices referring to markers attached to
|
always |
A logical. If TRUE, lumping is always attempted. By default (FALSE) lumping is skipped for markers where no individuals, or all individuals, are genotyped. |
special |
A logical. If TRUE, special lumping procedures (depending on the pedigree) will be attempted if the marker has a mutation model that is not generally lumpable (in the Kemeny-Snell sense). |
alleleLimit |
A positive number or |
verbose |
A logical. |
An object similar to x
, but whose attached markers have reduced
allele set.
x = nuclearPed() |> addMarker(geno = c(NA, NA, "1/1"), alleles = 1:5)
# Before lumping
afreq(x, 1)
# Lump
y = lumpAlleles(x, verbose = TRUE)
afreq(y, 1)
# With lumpable mutation model
x2 = setMutmod(x, model = "equal", rate = 0.1)
mutmod(x2, 1)
y2 = lumpAlleles(x2, verbose = TRUE)
mutmod(y2, 1)
# Mutation model requiring special lumping
x3 = setMutmod(x, model = "random", rate = 0.1, seed = 1)
mutmod(x3, 1)
# Lump
y3 = lumpAlleles(x3, verbose = TRUE)
mutmod(y3, 1)
stopifnot(all.equal(likelihood(x), likelihood(y)),
all.equal(likelihood(x2), likelihood(y2)),
all.equal(likelihood(x3), likelihood(y3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.