We use the phrase “post-processors” to auxilliary actions you want to perform each generation that aren’t statistics. This includes actions such as writing phenotypes or haplotypes to disk and erasing data from previous generations to limit memory use. We go through these features below

Limiting memory use

We can use xft.proc.LimitMemory to delete data that we no longer require at the end of each generation. Usage is straightforward following the docstring:

import xftsim as xft

Init signature:
    n_haplotype_generations: int = -1,
    n_phenotype_generations: int = -1,
Class to limit the amount of memory used by the simulation by deleting old haplotype and/or phenotype data.
n_haplotype_generations: int, optional
    The number of haplotype generations to keep. If -1, keep all generations. Default is -1.
n_phenotype_generations: int, optional
    The number of phenotype generations to keep. If -1, keep all generations. Default is -1.

processor(sim: xft.sim.Simulation) -> None:
    Deletes old haplotype and/or phenotype data from the simulation.
File:           ~/Dropbox/ftsim/xftsim/xftsim/
Type:           type

Saving output to disk

This feature is coming soon. For now, we recommend running simulations one generation at a time and saving when desired. For information on writing data to disk, see the founder data tutorial.