pedigrees_all_populate_haplotypes_custom_founders: Populate haplotypes in pedigrees (custom founder/unbounded).

Description Usage Arguments Details See Also Examples

View source: R/RcppExports.R

Description

Populate haplotypes from founder and down in all pedigrees. Note, that haplotypes are unbounded. All founders get a haplotype from calling the user provided function get_founder_haplotype().

Usage

1
2
3
4
5
6
7
8
pedigrees_all_populate_haplotypes_custom_founders(
  pedigrees,
  mutation_rates,
  get_founder_haplotype = NULL,
  prob_two_step = 0,
  prob_genealogical_error = 0,
  progress = TRUE
)

Arguments

pedigrees

Pedigree list in which to populate haplotypes

mutation_rates

Vector with mutation rates

get_founder_haplotype

Function taking no arguments returning a haplotype of length(mutation_rates)

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 get_founder_haplotype() instead of father's

progress

Show progress

Details

Note, that pedigrees must first have been inferred by build_pedigrees().

See Also

pedigrees_all_populate_haplotypes() and pedigrees_all_populate_haplotypes_ladder_bounded().

Examples

1
2
3
4
5
sim <- sample_geneology(100, 10)
peds <- build_pedigrees(sim$population)
pedigrees_all_populate_haplotypes_custom_founders(
  peds, c(1, 1), function(x) c(10, 10))
get_haplotype(sim$end_generation_individuals[[1]])

malan documentation built on July 2, 2020, 3:01 a.m.