Skip to contents

Extends an existing phased founder population through chromosome-wise, no-interference meiosis. Founder-model parameters are deliberately absent: historical founder copying and future biological meiosis are separate models.

Usage

gsim_simulate_pedigree(
  founders,
  pedigree,
  seed,
  output,
  format = c("hap", "bed"),
  overwrite = FALSE
)

Arguments

founders

A phased base-population descriptor or HAP/BIM/FAM prefix. Its FAM IDs must exactly equal the pedigree founder IDs.

pedigree

A gsim_pedigree() object with parent-before-offspring order.

seed

Pedigree-meiosis seed; it cannot alter the stored founders.

output

Extension-free output prefix.

format

"hap" for reusable phased HAP/BIM/FAM or "bed" for unphased dosage BED/BIM/FAM.

overwrite

Whether to replace an existing complete triplet.

Value

A compact output manifest; no dense biological matrix is returned.

Details

Stored founder H1/H2 labels are preserved. In descendants H1 is the paternal gamete and H2 is the maternal gamete. BIM cumulative cM is divided by 100 for biological meiosis in Morgans. Bit 1 remains ALT/BIM A1 and BED dosage remains H1 + H2. Pedigree execution is currently single-threaded because dependency-safe generations can still share mutable packed words with their parents.