rankProfiles | R Documentation |
Identify and rank the most likely DNA profiles of a pedigree member. For each marker, the possible genotypes of the indicated person are ranked by likelihood.
rankProfiles(x, id, markers = NULL, maxPerMarker = Inf, verbose = FALSE)
x |
A |
id |
The name of a single (typically untyped) pedigree member. |
markers |
Names or indices of the markers to be included. Default: all. |
maxPerMarker |
A single number, limiting the number of top genotypes
considered for each marker. Default: |
verbose |
A logical, by default FALSE. |
Note that this function assumes that all markers are independent.
If the marker data includes mutation models, it may be wise to try first with
maxPerMarker = 1
to limit computation time.
A list with the following components (N
denotes the number of
markers):
profiles
: A data frame with N+1
columns, containing the possible
profiles, ranked by likelihood.
marginal1
: A numeric of length N
, giving the marginal
probability of the most likely genotype for each marker.
marginal2
: A numeric of length N
, with marginals for the second most
likely genotype for each marker, or NA
if there is no second.
best
: A character of length N
containing the most likely profile.
This is the same as names(marginal1)
, and also as profiles[1, 1:N]
.
x = nuclearPed(nch = 4) |>
markerSim(N = 4, alleles = c("a", "b", "c"), seed = 1, verbose = FALSE)
x
# Remove data for father
y = setAlleles(x, ids = 1, alleles = 0)
# Most likely profiles of father
rankProfiles(y, id = 1)
# Compare with truth
getGenotypes(x, ids = 1)
# Same example with mutations allowed
z = setMutmod(y, model = "equal", rate = 0.01)
rankProfiles(z, id = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.