We can use StochPy's cell division module to simulate explicit cell division in stochastic simulations. Due to cell division the numbers of cells increases with 2^n which makes it (nearly) impossible to track all cells over many generations. Within StochPy we therefore simulate the time evolution of one particular cell, i.e. we follow a cell lineage. Written by TR Maarleveld, Amsterdam, The Netherlands E-mail: tmd200@users.sourceforge.net Last Change: August 10, 2015We start the simulation with a initial (daughter) cell. For this set, we set e.g. the fixed growth rate and an initial volume. This allows StochPy to calculate the cell volume at the first division time. We use StochPy to do a stochastic simulation until the cell divides into two daughter cells. The mother volume and species are partioned over both daughter cells. Next, we select one of the two daughters and continue the simulation until the number of generations or the number of time steps or the specific end time is reached. The figure further illustrates this approach.Now we understand the basic principles, we can start doing our first stochastic simulation with growth and division. Let's start by importing StochPy: import stochpy # required for iPython Notebook inline plotting %matplotlib inline In our first example, we use just start the cell division module and do a stochastic simulation with cell growth and division. This means that we use all the default settings within StochPy (model, non-dividing species, growth rate, initial volume, # generations, etc.) We use the high-level function "DoCellDivisionStochSim* to perform our first simulation and generate two plots: (i) a species copy number and volume plot and (ii) a species concentrations and volume plot. cmod = stochpy.CellDivision() cmod.DoCellDivisionStochSim() cmod.PlotSpeciesVolumeTimeSeries() cmod.PlotSpeciesVolumeTimeSeries(plottype = 'concentrations') Now, we use the "ImmigrationDeath.psc" model to illustrate some more functionalities of the cell division module. First, we select the model and modify it interactively. cmod.Model('ImmigrationDeath.psc') cmod.ChangeInitialSpeciesCopyNumber("mRNA",11) cmod.ChangeParameter("Ksyn",2) cmod.ChangeParameter("Kdeg",0.1) Second, we set volume and growth statistics, and perform a stochastic simulation with growth and cell division. cmod.SetVolumeDistributions(Phi=("beta",5,5), K=("fixed",0.5),Phi_beta_mean=2) cmod.SetGrowthFunction(growth_rate=0.2, growth_type="exponential") cmod.DoCellDivisionStochSim(end=4000, mode="generations") We generated 4000 generations to get relatively accurate statistical properties (we recommend using 10000 generations). The cell division module offers the analysis of both species and volume statistics. Here, we start with volume statistics. Here, we plot the volume distributions at birth and division for a sample of extant cells (left top panel), the volume time series (center top panel), the volume distribution for a sample of extant cells (right top panel), and the interdivision times for a sample of extant cells (center bottom panel). cmod.PlotVolumeOverview() Binning and numerical integration is used to relate the sample of mother cells to different samples. StochPy prints a warning if the numerical integration was not accurate enough. Using *AnalyzeExtantCells()* with a different number of bins for both age and interdivision times should solve this issue. cmod.AnalyzeExtantCells(n_bins_age=20,n_bins_IDT=20,n_bins_volume=20) For species, a similar high-level function exists. Here, we plot the species distribution at birth and division for a sample of extant cells (left panel), the species time series (center panel), and the species distribution for a sample of extant cells (right panel). Again, by specifying a different sample, the same plot is generated whereas for a different sample. cmod.PlotSpeciesOverview()