This simulation builds off the work in Vittadello et al. 2019: **Mathematical models incorporating a multi-stage cell cycle replicate normally-hidden inherent synchronization in cell proliferation**. Th paper creates a mathematical model to replicate experimental results. This simulation instead uses an agent-based approach to model the same phenomenon. It makes use of the optimization engine to calibrate the model to the experimental results.

Many cell microbiology studies use samples that have been prepared asynchronous, meaning that cells are distributed randomly among the cell phases. This is meant to ensure that growth due to replication is a smooth exponential, as opposed to a discrete step function where all cells divide on the same time step. However, experimental data appear to confirm that many samples actually replicate with partial synchronicity. This simulation demonstrates how an asynchronously distributed sample still behaves with partial synchronicity.

## Initialization

The initial population of cells is distributed according to the data in the current `dataset`

in globals. The number of Red, Yellow, and Green cells is matched, and cells are randomly assigned a `counter`

value that places them in the correct phase. This initialization produces a relatively asynchronous population in our model.

## Cell Cycle Model

Cells progress between a number of stages as they replicate. The `counter`

value tracks how far into the cell cycle an agent is, and they are colored based on which phase of the cycle they are in. The global `cycle`

object captures the number of timesteps in each phase.

When cells replicate, the new cell begins at the start of the cell cycle. This key modeling decision is what leads to the model behaving with partial synchronicity.

## Visualization

Colors of agents represent what stage a cell is in, corresponding to the phosphorescing colors in the paper.

- Red - G1 (gap 1 phase)
- Yellow - eS (early Synthesis phase)
- Green - S, G2, and M (Synthesis, gap 2, and Mitosis phases)

### Plots

The first plot counts the total number of cells in the sample, and compares it to the experimental data. The exponential growth typically associated with cell division is clearly visible.

The second plot counts the number of cells in each stage grouping, labeling them by the color that they phosphoresce in the sample. This plot is the one which clearly shows the synchronicity between cells.

The third plot graphs the experimental and modeled ratio Q:

*Q(t) = R(t) / (Y(t) + G(t))*

R, Y, and G correspond to the number of red, yellow, and green agents.

## Calibration

Using HASH's optimization engine, and an agent which calculates the error between the experimental and modeled data, it is possible to calibrate our model to figure out the correct cell cycle times. Creating an optimization experiment which reduces the total error effectively fits our simulation to the existing data. The global parameters that this optimization produces are the number of time steps that each of the cell cycle stages lasts.

For the cell type in the "C8161_data_Figure1" dataset, the optimal configuration is:

- G1 - 25
- eS - 27
- S/G2/M" - 20

Since each time step corresponds to a quarter of an hour, the full cycle takes approximately 18 hours.

You can read more about calibrating using complex metrics in the HASH docs.