View source: R/recomb_init_founders.R
recomb_init_founders | R Documentation |
This function initializes what is otherwise a tedious structure for founders, to be used for simulating recombination in a pedigree. The genetic structure is trivial, in that these "founder" chromosomes are each of a single ancestral individual (none are recombined).
recomb_init_founders(ids, lengs)
ids |
The list of IDs to use for each individual |
lengs |
The lengths of each chromosome in centiMorgans (cM).
If this vector is named, the output inherits these chromosome names.
If it is a list, it is assumed to be a recombination map (see |
A named list of diploid individuals, each of which is a list with two haploid individuals named pat
and mat
, each of which is a list of chromosomes (inherits names of lengs
if present), each of which is a tibble with a single row and two columns: posg
equals the chromosome length, and anc
equals the ID of the individual (from ids
) concatenated with either _pat
or _mat
depending on which parent it is.
recomb_fam()
to simulate recombination across a pedigree using the founders initialized here.
# version with explicit recombination lengths ancs <- recomb_init_founders( c('a', 'b'), c(100, 200) ) ancs # version using genetic map (uses provided human map) from which lengths are extracted ancs <- recomb_init_founders( c('a', 'b'), recomb_map_hg38 ) ancs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.