pedigrees_all_populate_haplotypes {malan} | R Documentation |
Populate haplotypes in pedigrees (0-founder/unbounded).
Description
Populate haplotypes from founder and down in all pedigrees.
Note, that haplotypes are unbounded and
that all founders get haplotype rep(0L, loci)
.
Usage
pedigrees_all_populate_haplotypes(
pedigrees,
loci,
mutation_rates,
prob_two_step = 0,
prob_genealogical_error = 0,
progress = TRUE
)
Arguments
pedigrees |
Pedigree list in which to populate haplotypes |
loci |
Number of loci |
mutation_rates |
Vector with mutation rates, length |
prob_two_step |
Given a mutation happens, this is the probability that the mutation is a two-step mutation |
prob_genealogical_error |
Probability that a genealogical error happens: if so, give individual haplotype |
progress |
Show progress |
Details
Note, that pedigrees must first have been inferred by build_pedigrees()
.
See Also
pedigrees_all_populate_haplotypes_custom_founders()
and
pedigrees_all_populate_haplotypes_ladder_bounded()
.
Examples
sim <- sample_geneology(100, 10)
peds <- build_pedigrees(sim$population)
pedigrees_all_populate_haplotypes(peds, 2, c(1, 1))
get_haplotype(sim$end_generation_individuals[[1]])
[Package malan version 1.0.3 Index]