Anatomy of a simulation

To create an xftsim simulation, we need to specify six components to the sim.Simulation() constructor.

Anatomy of a simulation

Briefly, these components serve the following purposes:

  • Founder haplotypes are the initial haplotypes we seed our simulation with. These can be synthetic or derived from real world data.

  • Mating regimes determine mate assignments and the number of offspring per mating pair

  • Recombination maps determine the probability of recombination events during meiosis. These can be synthetic or derived from empirical maps

  • Phenogenetic archtectures dictate the creation of phenotypic components. These are the most complex objects of the bunch.

  • Statistics include any information we’d like to record or estimate each generation of simulation. These aren’t necessary but are often useful.

  • Post-processors specify any non-statistical procedures we’d like to perform each generation such as writing data to disk and limiting memory. Like statistics, these too are optional.

We’ll go through all of these in detail in the following sections.