Skip to contents

Uses 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.

Usage

gsim_simulate_cohort(parents, offspring, seed, output)

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 of gsim_mate().

seed

Nonnegative integer-valued meiosis seed.

output

New directory for the cohort's phase and dosage triplets. 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.