Example 5: plasmid segregation - cellmodeller/CellModeller GitHub Wiki
Overview
The model we will use in this example is 'ex5_colonySector.py'. This model simulates the system in which an initial cell has two types of incompatible plasmids. As the colony grows, each cell ends up with only one type of plasmid or the other, creating sectoring pattern as presented in Rudge et al 2013 paper.
Explanation
Below, we will show you how to create this file by modifying from our first example (ex1_simpleGrowth.py) and introduce you along the way to additional CellModeller functionalities. Note that we do not need differential equation solver and diffusion grid from example 2-4 here.
1. Specify initial plasmid population
Here, we have two plasmid types, 'a' and 'b'. The initial cell has 3 plasmids of each type. To implement this, add the following under 'init(cell)' section
cell.n_a = 3
cell.n_b = 3
2. Specify display rule for plasmid
To visualise plasmids inside each cell, we setup color display of each cell to represent plasmid number. Plasmid type 'a' and 'b' are displayed in green and blue, respectively. To implement this add the following inside the for loop of 'update(cells)':
cell.color = [0.1, cell.n_a/3.0, cell.n_b/3.0]
3. Specify plasmid segregation rule
Before a cell divides, each plasmid inside is duplicated. The total plasmid number before cell division goes up from 6 plasmids to 12 plasmids. Then each plasmid is randomly assigned to each daughter cell so that each daughter cell has 6 plasmids. To implement this, we add the following inside 'divide(parent, d1, d2):
plasmids = [0]*parent.n_a*2 + [1]*parent.n_b*2
random.shuffle(plasmids)
d1.n_a = 0
d1.n_b = 0
d2.n_a = 0
d2.n_b = 0
for p in plasmids[:6]:
if p == 0: d1.n_a +=1
else: d1.n_b +=1
for p in plasmids[6:12]:
if p == 0: d2.n_a +=1
else: d2.n_b +=1
4. Save, load and run.
You should see fractal/sectoring patterns emerge as the colony grows.