recomb_init_founders {simfam} | R Documentation |
Initialize chromosome structures for founders
Description
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).
Usage
recomb_init_founders(ids, lengs)
Arguments
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 |
Value
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.
See Also
recomb_fam()
to simulate recombination across a pedigree using the founders initialized here.
Examples
# 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