Ford Fishman
What is the interaction between dormancy and the establishment and maintaining of mutualisms in microbes? While crossfeeding might be strongly beneficial to two bacterial species, there are costs associated with producing resources that are only indirectly useful. These costs may inhibit the generation of these mutualisms or perhaps lead to cheating, where some individuals receive the benefits of the mutualism without producing any costly resources themselves.
Dormancy may help to stabilize these relationships. For instance, while the costs of mutualism may lead to a fitness disadvantage when a shared resource is abundant, it may be beneficial when there are low levels of the shared resource. A seed bank of dormant cells may allow mutualistic cells to persist when selection favors cheaters. Additionally, environmental stochasticity can lead to the fixation of one of the two partners drifting to extinction. A seed bank can drastically reduce the probability of stochastic fixation of mutualistic partners.
To address these questions, we have developed two individual-based models (IBMs): one non-spatial, and one spatial. Both implement cells as the primary individuals, or agents, and these cells can be of two types existing in a single population. They both share a common resource and produce secondary metabolites that can be used by the other cell type.
This object-oriented model adapts code from https://acerbialberto.com/IBM-cultevo/, as well as https://github.com/LennonLab/residence-time into a Python-based IBM to study a well-mixed mutualistic system. This model contains several Python scripts, primarily Cell.py, Population.py, and main.py. This repository also contains the bash script run.sh.
In the simulations presented here, cells can be type A or B. Both types utilize resource C (
Cell.py contains the Cell() class, which when instantiated is representative of an individual bacterium. Several optional arguments can be passed into the class constructor to specify certain properties, namely cell type (ty), mutualistic trait value (trait), internal resource concentration (R), cost of maintenence (mt), cost of cell growth (g), and initial cell size (size). If any of these are left unspecified, they are randomly initialized such that cell type is either A or B (Cell.init_ty()) and all numerical parameters are taken from a uniform distribution on the interval Cell.init_traits()).
The Cell() class also contains functions that can change its attributes. Cell.depleted() checks if the cell has any remaining resources. Cell.maintenance() reduces Cell.R to simulate the cost of upkeep. Cell.growth() uses Cell.R to increase cell size according to growth constant Cell.g. Cell.division() determines whether the cell will or will not divide based upon Cell.R and cell size. The probability of divided is calculated as:
Cell.divide() reduces Cell.size and Cell.R by 50%. Cell.produce() determines the metabolite production of the cell according to the mutualistic trait value. Finally, Cell.dorm() calculates the probability of going dormant, which decreases with Cell.R.
The Population() class is defined in Population.py. It takes 5 arguments: cells (a list of Cell() objects), resources (a dictionary of resource names and concentrations), N (initial pop. density), responsive (whether dormancy is responsive to resource concentration or stochastic), and dorm (whether or not population has dormancy).
Population() includes methods for tracking various properties, such as mean cell resource concentration, mutualistic trait values and more. However, the primary method in the Population() class is timestep(), where the various processes that occur each timestep in set order: (1) resuscitation of dormant cells, (2) internal cell processes, including maintenance, growth, metabolite production, division decisions, and resource uptake, (3) cell death and division, and (4) cell dormancy. Resuscitation occurs via Population.resc(), where dormant cells are chose with a constant probability timestep() iterates through all cells in the population in a random order that changes each timestep. Cell death occurs deterministically when Cell.R reaches 0.
The primary simulation action occurs in main.py. This script reads in parameters from the command line and contains many functions that initialize simulations with these parameters. Execution of the main script can occur in two modes: single simulation or multi-simulation mode, which takes advantage of parallel processing, and creates output in the form of plots and raw data files. Alternatively, main.ipynb can be used to run a single simulation and examine the output graphically. run.sh can also be used to quickly specify parameters for simulations and create output directories for plots and data.
The spatial model was construced using the CompuCell3D platform, which has been previously used in biomedical research for explicitely modeling the complex behaviors of human body tissues. This platform allows 2D or 3D modeling of cells made up of several pixels that can grow, divide, interact with each other, and perform many biologically relevant behaviors.
Like the non-spatial model described above, cells of type A and B are generated with certain properties, including volume, resource concentration, and also coordinate locations in a 2D environment. Cells of type A produce
CompuCell3D uses an XML script (MutualDorm.xml) to establish the base parameters of the simulation. Various plugins are coded into this file to establish constraints and behaviors, including defining cell types and declaring which cells will initialized and where. The background medium is declared as its own cell type, and it will be initialized as a single cell. The dimensions of the 2D plane of the simulation are defined here, and the boundaries of this plane are defined as "periodic", meaning that the top of the plane is connected to the bottom, as are the left and right boundaries, as opposed to boundaries with solid edges. Resources are also declared, including the speed of their diffusion, and strength of chemotaxis. Here, A cells have chemotaxis towards
Importantly, this script contains information about the contact energies, which essentially define preferences in boundary contact. The low contact energy of cells with the medium relative to cells with other cells means that cells have a slight preference to being in contact compared to other cells. The magnitude of these energies relative to the temperature parameter determine the extent of the preferences.
Python is used to interface with CompuCell3D and give it customizability and flexibility. In this script, "steppable" classes are initialized, and these classes are used to interact with the simulation at the start, at each timestep, and at the end of each run. This includes plotting, as well as managing the behavior and properties of individual cells.
The logic of the code is laid out in a similar manner to the non-spatial model, with some key exceptions. Cells possess a target volume, which is increased as they uptake resources. Cells can uptake the resources around them to increase their internal resource reserves. Like the non-spatial model, cells use resources to perform maintenance, produce metabolites, and grow. Presently, this model uses a hard cell division decision, where cells divide once they reach a certain volume. When cells divide, the pixels corresponding to a single cell are split into two separate but adjacent cells. Cell death is implemented by setting cell target volume to zero, which simulates non-instantaneous death.
Responsive dormancy is implemented in this model in a similar manner to the non-spatial model, where it is based on the internal resource concentration. Here, the target volume of cells is also decreased, to simulate a spore. Similarly, resuscitation occurs as in the non-spatial model except that here there is a corresponding increase in target volume.
Each simulation was initialized with 100 total cells randomly set to be A or B cells. 100 units of
Regardless of dormancy mode, when cells are initialized with mutualism enabled, both cell types stably coexist the majority of the time (Fig.1, 3). The combined densities of the two cell types grows agter an initial reaches a saturation point most often below 1000 total cells. Despite this, the concencentrations of
Fig.1: Densities of A and B cells for the duration of a single simulation with mutualism and responsive dormancy enabled.
Fig.2: Total densities of A and B cells at the final timestep for 1000 simulations. Mutualism is enabled (trait=0.1), and dormancy is disabled.
Fig.3: Frequency of A cells at the final timestep for 1000 simulations. Mutualism is enabled (trait=0.1), and dormancy is disabled.
Within a simulation, the mutualistic trait can be allowed to evolve. This is achieved by initializing population with variation in this trait value. Consistently, the average trait value of these populations was approximately
Fig.4: Evolution of the average mutualistic trait value of a simulation where A becomes dominant.
The cost of mutualism is the limiting factor in the total population density. When mutualism is disabled, final total population density can reach much higher levels (Fig.5). A similar result occurs when mutualism is enabled but with no associated cost (Fig.6).
Fig.5: Total densities of A and B cells at the final timestep for 1000 simulations where both mutualism and dormancy are turned off.
Fig.6: Densities of A and B cells for the duration of a single simulation without a cost of mutualism.
Dormancy appears to have little effect on simulation outcome. However, this may be because there is insufficent environmental stochasticity in the program. While there is a setting in the model to allow for fluctuations in
Initially, A and B cells are placed in the middle of the simulation plane within a certain radius surrounded by medium, which actively secretes
Once the cells cover the medium across the whole simulation plane and temporary dynamics subside, the medium can no longer secrete
Fig.7: CompuCell3D animation of the spatial model showing dynamics over 1000 timesteps of A (blue) and B (green) cells, as well as dormant A (red) and B (yellow) cells, on a 2-dimensional plane. Black edges are present to distinguish between cells.
Let the densities of A and B cells be
Fig.8: Densities of all cell types of the animated simulation above. The colors of the curves match the colors of the cells.
In its present form, this non-spatial model contains several unanticipated behaviors. Namely, dormancy should have some effect on the model's behavior. While environmental stochasticity is implemented, it does not change simulation dynamics in an appreciable manner. More testing will be necessary to incorporate this vital feature of the model. Additionally, parameter tuning will be necessary to find a reasonable cost of mutualism to find realistic values that allow for stable mutualisms to form. Discovering if dormancy can alter how feasible mutualism is with varying costs will be essential moving forward.
While the base CompuCell3D model is in place, the spatial model requires much tweaking and modification to produce desired behavior, including changing the initial location of cell initialization, the decision function for cell division, the size of dormant cells relative to active cells, the cost of producing metabolites, the strength of chemotaxis, and the rate of production of






