Generate one cohort from already simulated phased parents
Source:R/breeding_cohort.R
gsim_simulate_cohort.RdUses existing packed chromosome meiosis and writes only new offspring. Parent genotypes are reused, with no ancestor regeneration or dense genotype matrix. HAP and BED outputs have separate metadata prefixes.
Arguments
- parents
Phased dataset prefix, phased manifest, or
gsim_cohort. All used parents must be present in this one dataset.- offspring
Data frame containing
animal,sire,dam, optionally sex and cohort labels; alternatively the result ofgsim_mate().- seed
Nonnegative integer-valued meiosis seed.
- output
New directory for the cohort's
phaseanddosagetriplets. Existing directories are refused, including after a partial publication.
Value
gsim_cohort with HAP/BED manifests, offspring metadata, actual
parent IDs and simulation settings. Meiosis is single threaded. Memory
holds one packed source chromosome, used parents, and the new cohort;
previous cohorts are not accumulated. Parent datasets can be consolidated
externally when mating across several historical cohorts.