Simulator#

Our simulators for cassiopeia are split up into those that simulate topologies and those that simulate data on top of the topologies.

Tree Simulators#

We have several frameworks available for simulating topologies:

sim.BirthDeathFitnessSimulator(...[, ...])

Simulator class for a general forward birth-death process with fitness.

sim.ecDNABirthDeathSimulator(...[, ...])

Simulator class for a forward birth-death process with fitness in a population with ecDNA.

sim.CompleteBinarySimulator([num_cells, depth])

Simulate a complete binary tree.

sim.SimpleFitSubcloneSimulator(...)

Simulates a clonal population which develops one fit subclone.

Data Simulators#

These simulators are subclasses of the DataSimulator class and implement the overlay_data method which simulates data according to a given topology.

sim.Cas9LineageTracingDataSimulator([...])

Simulates Cas9-based lineage tracing data.

Spatial Simulators#

These simulators are subclasses of the SpatialSimulator class and implement the overlay_data method which adds spatial coordinates to a given topology. SpatialSimulator`s are a special sublcass of `DataSimulator and can be used in addition to other `DataSimulator`s that simulate lineage tracing data.

sim.BrownianSpatialDataSimulator(dim, ...[, ...])

Simulate spatial data with a Brownian motion process.

sim.ClonalSpatialDataSimulator([shape, ...])

Simulate spatial data with a clonal spatial autocorrelation constraint.

Leaf SubSamplers#

These are utilities for subsampling lineages for benchmarking purposes. For example, sampling a random proportion of leaves or grouping together cells into clades to model spatial data.

sim.SupercellularSampler([ratio, ...])

sim.SpatialLeafSubsampler([bounding_box, ...])

sim.UniformLeafSubsampler([ratio, ...])