Difference between revisions of "Team:Paris Bettencourt/Modeling"

m
Line 143: Line 143:
 
<br />
 
<br />
 
<img src="https://static.igem.org/mediawiki/2015/4/45/OptimizeK1.png" title="Vitamin optimization" alt="Vitamin optimization" style="align:center;">  
 
<img src="https://static.igem.org/mediawiki/2015/4/45/OptimizeK1.png" title="Vitamin optimization" alt="Vitamin optimization" style="align:center;">  
 +
<br />
 
As you can see, we are able to find the best \(k_{1}\) to optimize the vitamin production.
 
As you can see, we are able to find the best \(k_{1}\) to optimize the vitamin production.
 
<br />
 
<br />
Line 160: Line 161:
 
<img src="https://static.igem.org/mediawiki/2015/f/f7/DeterministicEvolution.png" title="Deterministic evolution of the system" alt="Deterministic evolution of the  
 
<img src="https://static.igem.org/mediawiki/2015/f/f7/DeterministicEvolution.png" title="Deterministic evolution of the system" alt="Deterministic evolution of the  
 
system" style="align:center;">
 
system" style="align:center;">
 +
<br />
 
As you can see, the mother cell, differentiated cell and vitamin concentrations follow an exponential law of time.
 
As you can see, the mother cell, differentiated cell and vitamin concentrations follow an exponential law of time.
 
<br />
 
<br />
Line 259: Line 261:
 
To do the choice, we compare \(T_{1}\) and \(T_{2}\). The smallest time is the next event time.
 
To do the choice, we compare \(T_{1}\) and \(T_{2}\). The smallest time is the next event time.
 
<br />
 
<br />
 +
 +
 +
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" height="500"
 +
viewBox="-250 -142.5 340.2 878.7" style="enable-background:new -250 -142.5 340.2 878.7; float:right;" xml:space="preserve">
 +
<style type="text/css">
 +
.st0{fill:#FFFFFF;}
 +
.st1{fill:none;stroke:#000000;stroke-width:2;}
 +
.st2{font-family:'ArialMT';}
 +
.st3{font-size:18.3489px;}
 +
</style>
 +
<g>
 +
<path class="st0" d="M-165.8-139.9H24.1c26.2,0,47.5,8.1,47.5,18.1c0,10-21.2,18.1-47.5,18.1h-189.8c-26.2,0-47.5-8.1-47.5-18.1
 +
C-213.2-131.8-192-139.9-165.8-139.9z"/>
 +
<path class="st1" d="M-165.8-139.9H24.1c26.2,0,47.5,8.1,47.5,18.1c0,10-21.2,18.1-47.5,18.1h-189.8c-26.2,0-47.5-8.1-47.5-18.1
 +
C-213.2-131.8-192-139.9-165.8-139.9"/>
 +
<text transform="matrix(1 0 0 1 -90.2185 -116.0798)" class="st2 st3">Start</text>
 +
</g>
 +
<g>
 +
<rect x="-216.8" y="-56.3" class="st0" width="292.7" height="54.5"/>
 +
<rect x="-216.8" y="-56.3" class="st1" width="292.7" height="54.5"/>
 +
<text transform="matrix(1 0 0 1 -139.8518 -23.4435)" class="st2 st3">Initialize the cells</text>
 +
</g>
 +
<g>
 +
<line class="st1" x1="-70.8" y1="-103.8" x2="-70.6" y2="-70.2"/>
 +
<polygon points="-70.5,-59.5 -77.8,-73.8 -70.6,-70.2 -63.5,-73.9 "/>
 +
<polygon class="st1" points="-70.5,-59.5 -77.8,-73.8 -70.6,-70.2 -63.5,-73.9 "/>
 +
</g>
 +
<g>
 +
<rect x="-217" y="36.3" class="st0" width="292.8" height="77.4"/>
 +
<rect x="-217" y="36.3" class="st1" width="292.8" height="77.4"/>
 +
<text transform="matrix(1 0 0 1 -164.9406 69.0957)" class="st2 st3">Choose the next event</text>
 +
<text transform="matrix(1 0 0 1 18.6736 69.0957)" class="st2 st3"> </text>
 +
<text transform="matrix(1 0 0 1 -131.2668 92.0317)" class="st2 st3">among all cells</text>
 +
</g>
 +
<g>
 +
<line class="st1" x1="-70.5" y1="-1.8" x2="-70.6" y2="22.3"/>
 +
<polygon points="-70.6,33.1 -77.7,18.7 -70.6,22.3 -63.4,18.7 "/>
 +
<polygon class="st1" points="-70.6,33.1 -77.7,18.7 -70.6,22.3 -63.4,18.7 "/>
 +
</g>
 +
<g>
 +
<rect x="-216.1" y="145.6" class="st0" width="291.6" height="54.5"/>
 +
<rect x="-216.1" y="145.6" class="st1" width="291.6" height="54.5"/>
 +
<text transform="matrix(1 0 0 1 -142.2335 178.4026)" class="st2 st3">Do the next event</text>
 +
</g>
 +
<g>
 +
<line class="st1" x1="-70.6" y1="113.7" x2="-70.4" y2="131.6"/>
 +
<polygon points="-70.3,142.4 -77.6,128.1 -70.4,131.6 -63.3,128 "/>
 +
<polygon class="st1" points="-70.3,142.4 -77.6,128.1 -70.4,131.6 -63.3,128 "/>
 +
</g>
 +
<g>
 +
<rect x="-216.1" y="231.1" class="st0" width="291.9" height="54.5"/>
 +
<rect x="-216.1" y="231.1" class="st1" width="291.9" height="54.5"/>
 +
<text transform="matrix(1 0 0 1 -178.7657 263.9192)" class="st2 st3">Update the simulation time</text>
 +
</g>
 +
<g>
 +
<line class="st1" x1="-70.3" y1="200" x2="-70.2" y2="217.1"/>
 +
<polygon points="-70.2,227.9 -77.4,213.6 -70.2,217.1 -63.1,213.5 "/>
 +
<polygon class="st1" points="-70.2,227.9 -77.4,213.6 -70.2,217.1 -63.1,213.5 "/>
 +
</g>
 +
<g>
 +
<polygon class="st0" points="-69.6,316.3 78,477.9 -69.6,639.6 -217.2,477.9 "/>
 +
<polygon class="st1" points="-69.6,316.3 78,477.9 -69.6,639.6 -217.2,477.9 "/>
 +
<text transform="matrix(1 0 0 1 -134.8742 460.5949)" class="st2 st3">Simulation time</text>
 +
<text transform="matrix(1 0 0 1 -9.4426 460.5949)" class="st2 st3"> </text>
 +
<text transform="matrix(1 0 0 1 -77.5163 483.5308)" class="st2 st3">&lt;</text>
 +
<text transform="matrix(1 0 0 1 -66.801 483.5308)" class="st2 st3"> </text>
 +
<text transform="matrix(1 0 0 1 -151.7139 506.4672)" class="st2 st3">Fermentation period</text>
 +
</g>
 +
<g>
 +
<line class="st1" x1="-70.1" y1="285.6" x2="-69.9" y2="302.3"/>
 +
<polygon points="-69.7,313.1 -77.1,298.8 -69.9,302.3 -62.7,298.6 "/>
 +
<polygon class="st1" points="-69.7,313.1 -77.1,298.8 -69.9,302.3 -62.7,298.6 "/>
 +
</g>
 +
<line class="st1" x1="-245.7" y1="17" x2="-70.5" y2="17.2"/>
 +
<polyline class="st1" points="-69.6,639.6 -69.6,659.2 -244.3,659.2 -244.3,16.7 "/>
 +
<g>
 +
<polyline class="st1" points="76.8,484.8 76.8,669.2 -68.4,669.2 -68.4,693.4 "/>
 +
<path class="st0" d="M76.8,470.4c3.6,0,7.2,3.6,7.2,7.2s-3.6,7.2-7.2,7.2s-7.2-3.6-7.2-7.2S73.2,470.4,76.8,470.4z"/>
 +
<path class="st1" d="M76.8,470.4c3.6,0,7.2,3.6,7.2,7.2s-3.6,7.2-7.2,7.2s-7.2-3.6-7.2-7.2S73.2,470.4,76.8,470.4"/>
 +
<polyline class="st1" points="-75.6,682.2 -68.4,696.6 -61.2,682.2 "/>
 +
</g>
 +
<g>
 +
<path class="st0" d="M-163.3,699.8H26.5c26.2,0,47.5,8.1,47.5,18.1c0,10-21.2,18.1-47.5,18.1h-189.8c-26.2,0-47.5-8.1-47.5-18.1
 +
C-210.8,707.9-189.5,699.8-163.3,699.8z"/>
 +
<path class="st1" d="M-163.3,699.8H26.5c26.2,0,47.5,8.1,47.5,18.1c0,10-21.2,18.1-47.5,18.1h-189.8c-26.2,0-47.5-8.1-47.5-18.1
 +
C-210.8,707.9-189.5,699.8-163.3,699.8"/>
 +
<text transform="matrix(1 0 0 1 -87.2828 723.5618)" class="st2 st3">Stop</text>
 +
</g>
 +
</svg>
  
 
<h5>Step 1 : Initialize the cells</h5>
 
<h5>Step 1 : Initialize the cells</h5>
Line 265: Line 356:
 
For each cell we set the cell type, the next event and the time before the next event.
 
For each cell we set the cell type, the next event and the time before the next event.
  
<h5>Step 2 : Choose the next event among all cell</h5>
+
<h5>Step 2 : Choose the next event among all cells</h5>
 
We have an array containing all the cells. Each cell contain the time before his next event (duplicate or differentiate).
 
We have an array containing all the cells. Each cell contain the time before his next event (duplicate or differentiate).
 
<br />
 
<br />
Line 324: Line 415:
 
<br />
 
<br />
 
<img src="https://static.igem.org/mediawiki/2015/9/97/StochasticEventTimeProbabilityDistribution.png" title="Distribution of event time probability" alt="Distribution of event time probability" style="align:center;">  
 
<img src="https://static.igem.org/mediawiki/2015/9/97/StochasticEventTimeProbabilityDistribution.png" title="Distribution of event time probability" alt="Distribution of event time probability" style="align:center;">  
 +
  
 
<h3>Conclusion</h3>
 
<h3>Conclusion</h3>
Line 329: Line 421:
 
<h3>Bibliography</h3>
 
<h3>Bibliography</h3>
 
<ul>
 
<ul>
<li>Gillespie, D. T. (1976). A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. Journal of Computational Physics, 22(4), 403–434. http://doi.org/10.1016/0021-9991(76)90041-3</li>
+
<li>Gillespie, D.T. A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. <i>Journal of Computational Physics</i> <b>22</b>, 403-434 (1976).</li>
<li>Gillespie, D. T. (1977). Exact Stochastic Simulation Of Coupled Chemical-Reactions. Journal of Physical Chemistry, 81, 2340–2361. http://doi.org/10.1021/j100540a008</li>4
+
<li>Gillespie, D.T. Exact Stochastic Simulation Of Coupled Chemical-Reactions. <i>Journal of Physical Chemistry</i> <b>81</b>, 2340-2361 (1977).</li>
<li>Gillespie, D. T. (1992). A rigorous derivation of the chemical master equation. Physica A: Statistical Mechanics and Its Applications, 188(1-3), 404–425. http://doi.org/10.1016/0378-4371(92)90283-V</li>
+
<li>Gillespie, D.T. A rigorous derivation of the chemical master equation. <i>Physica A: Statistical Mechanics and its Applications</i> <b>188</b>, 404-425 (1992).</li>
<li>Cao, Y., Gillespie, D. T., & Petzold, L. R. (2005). The slow-scale stochastic simulation algorithm. The Journal of Chemical Physics, 122(1), 14116. http://doi.org/10.1063/1.1824902</li>
+
<li>Cao, Y., Gillespie, D.T. & Petzold, L.R. The slow-scale stochastic simulation algorithm. <i>The Journal of Chemical Physics</i> <b>122</b>, 14116 (2005).</li>
<li>Gillespie, D. T., Hellander, A., & Petzold, L. R. (2013). Perspective: Stochastic algorithms for chemical kinetics. Journal of Chemical Physics, 138(17). http://doi.org/10.1063/1.4801941</li>
+
<li>Gillespie, D.T., Hellander, A. & Petzold, L.R. Perspective: Stochastic algorithms for chemical kinetics. <i>The Journal of Chemical Physics</i> <b>138</b>, (2013).</li>
 
 
 
</ul>
 
</ul>

Revision as of 16:47, 19 August 2015

Introduction

Based on a set of ordinary differential equations (ODE) describing the kinetics of the cells differentiation, we designed a model to find the best differentiation rate.
First we developed a deterministic algorithm based on the ordinary differential equations solutions.
Then we find out that a stochastic algorithm could be an other solution to solve our problem.

For system involving large cell counts, the ordinary differential equations model give an accurate representation of the behavior. But with small cell counts, the stochastic and discrete method has a significant influence on the observed behaviour.
These reasons led us to write both a deterministic programm based on the mass action law and a stochastic programm based on the Gillespie’s stochastic simulation algorithm (SSA). With these two programms we obtain an accurate analysis of the vitamin production.

Deterministic model

Parameters

We conceived a simple model with the minimum number of parameters.
We find seven significant parameters for our model.
  • \(t\) : fermentation period.
  • \(k_{1}\) : rate constant of the mother cell differentiation.
  • \(k_{2}\) : rate constant of the mother cell doubling time.
  • \(k_{3}\) : rate constant of the differentiated cell doubling time.
  • \(k_{4}\) : rate constant of the differentiated cell vitamin production.
  • \([MC]_0\) : initial concentration of mother cells in the medium.
  • \([DC]_0\) : initial concentration of differentiated cells in the medium.

Kinetic equations

We wrote four simple kinetic equations.
\[ \begin{align} MC \xrightarrow[]{k_{1}} DC \\ MC \xrightarrow[]{k_{2}} 2.MC \\ DC \xrightarrow[]{k_{3}} 2.DC \\ DC \xrightarrow[]{k_{4}} DC + Vitamin \end{align} \]

Formal mathematical solution

Translation in ordinary differential equations
We used the law of mass action to write the ordinary differential equations based on kinetic equations \((1)\), \((2)\), \((3)\) and \((4)\).
We found the following equations.
\[ \begin{align} \frac{d[MC]}{dt}(t) = (k_{2} - k_{1}).[MC](t) \end{align} \] \[ \begin{align} \frac{d[DC]}{dt}(t) = k_{1}.[MC](t) + k_{3}.[DC](t) \end{align} \] \[ \begin{align} \frac{d[Vitamin]}{dt}(t) = k_{4}.[DC](t) \Rightarrow [Vitamin](t) = k_{4}.\int_{0}^{t}{[DC](t').dt'} \end{align} \]
Mathematical resolution
Simple ordinary differential equations resolution methods are used to find the solutions of the previous equations \((5)\), \((6)\), and \((7)\).
We expressed the time evolution of the mother cell, differentiated cell and vitamin concentrations.
\[ \begin{align} [MC](t) = [MC]_{0}.e^{(k_{2} - k_{1}).t} \end{align} \]
\[ \begin{align} [DC](t) = \begin{cases} [DC]_{0}.e^{k_{3}.t} + [MC]_{0}.\frac{k_{1}}{k_{2}-k_{1}-k_{3}}.(e^{(k_{2} - k_{1}).t} - e^{k_{3}.t}) & \mbox{if } k_{1} \ne k_{3} - k_{2} \\ \\ ([MC]_{0}.(k_{2} - k_{3}).t + [DC]_{0}).e^{k_{3}.t} & \mbox{if } k_{1} = k_{3} - k_{2} \end{cases} \end{align} \]
\[ \begin{align} [Vitamin](t) = \begin{cases} [DC]_{0}.\frac{k_{4}}{k_{3}}.(e^{k_{3}.t} - 1) + [MC]_{0}.\frac{k_{4}.k_{1}}{(k_{2}-k_{1}-k_{3}).(k_{2} - k_{1})}.(e^{(k_{2} - k_{1}).t} - 1) + [MC]_{0}.\frac{k_{4}.k_{1}}{(k_{2}-k_{1}-k_{3}).k_{3}}.(1 - e^{k_{3}.t}) & \mbox{if } k_{1} \ne k_{3} - k_{2} \\ \\ [DC]_{0}.\frac{k_{4}}{k_{3}}.(e^{k_{3}.t} - 1) + [MC]_{0}.\frac{k_{4}}{k_{3}}.(k_{3}.t - 1).(\frac{k_{2}}{k_{3}} - 1).(e^{k_{3}.t} - 1) + [MC]_{0}.\frac{k_{4}}{k_{3}}.(\frac{k_{2}}{k_{3}} - 1) & \mbox{if } k_{1} = k_{3} - k_{2} \end{cases} \end{align} \]

Vitamin optimization

Our goal is to optimize the vitamin production. We can only change three parameters : \(k_{1}\), \([MC]_0\) and \([DC]_0\).
\(t\), \(k_{2}\), \(k_{3}\) and \(k_{4}\) are constants. \([MC]_0\) and \([DC]_0\) are not relevant parameters. It seems logical that the more cells are in the medium, the more vitamin are producted.
However, it could be interesting to compare different \(\frac{[MC]_0}{[DC]_0}\) ratios but we prefer to focus on the rate constant \(k_{1}\).
We try to find the best \(k_{1}\). To this end we maximize the vitamin function numerically with MATLAB.
As an example, lets consider the following parameters.
  • \(t = 10\)
  • \(k_{2} = 0.66\)
  • \(k_{3} = 0.33\)
  • \(k_{4} = 1\)
  • \([MC]_0 = 5\)
  • \([DC]_0 = 0\)
We obtain the following graph with a simple MATLAB programm available here.

Vitamin optimization
As you can see, we are able to find the best \(k_{1}\) to optimize the vitamin production.
We noticed that two differents \(k_{1}\) exists to optimize the maximum concentration of differentiated cell \([DC]\) or the maximum concentration of vitamin \([Vitamin]\).
In our case, we chose of course the \(k_{1}\) that optimize the vitamin production ie \(k_{1} = 0.207\).

Deterministic evolution of mother cell, differentiated cell and vitamin concentrations

We wrote a deterministic algorithm with MATLAB using the previous solutions \((8)\), \((9)\) and \((10)\). For those interested, the source code is available here.
In order to optimize the vitamin production, we use the same parameters as previously and set \(k_{1}\) with the previous resulting value ie \(k_{1} = 0.207\).
We obtained the following graph.

Deterministic evolution of the 
system
As you can see, the mother cell, differentiated cell and vitamin concentrations follow an exponential law of time.
This result seems relevant. The model does not take into account the cells death and the nutrients present in the medium.

Stochastic model

Parameters

We used more parameters than the deterministic model. Indeed, because of the nature of the algorithm, we need a constant rate probability distribution.
In order to do a simulation with laboratory data, we modelize the time probability distribution with a normalized gaussian distribution using the normrnd MATLAB function.
For each time distribution \(i\), we use the following time probability distribution : \[ \begin{align} \mathcal P_{i}(t) = \frac{1}{\sigma_{i}.\sqrt{2\pi}}.e^{\frac{-(t - \mu_{i})^2}{2.\sigma_{i}^2}} \end{align} \] where
  • \(\mathcal P_{i}(t)\) : time \(t\) probability.
  • \(\mu_{i}\) : time mean.
  • \(\sigma_{i}\) : time standard deviation.

Rate constants for the time distribution \(i\) is calculated using this formula : \[ \begin{align} k_{i} = \frac{ln(2)}{t} \end{align} \] The time \(t\) is a random variable with a probability \(\mathcal P_{i}(t)\) as explained above.
The vitamin concentration is computed by numerical integration using the rate constant \(k_{4}\).
We have ten parameters for this model.
  • \(t\) : fermentation period.
  • \(\mu_{1}\) : mother cell differentiation time mean.
  • \(\sigma_{1}\) : mother cell differentiation time standard deviation.
  • \(\mu_{2}\) : mother cell doubling time mean.
  • \(\sigma_{2}\) : mother cell doubling time standard deviation.
  • \(\mu_{3}\) : differentiated cell doubling time mean.
  • \(\sigma_{3}\) : differentiated cell doubling time standard deviation.
  • \(k_{4}\) : rate constant of the differentiated cell vitamin production.
  • \(MC_0\) : initial number of mother cells in the medium.
  • \(DC_0\) : initial number of differentiated cells in the medium.

Algorithm

Introduction
In the programm, each cell is a structure containing three elements :
  • the cell type :
    • 1 : mother cell.
    • 2 : differentiated cell.
  • the next event type :
    • 1 : a mother cell become a differentiated cell.
    • 2 : a mother cell divide into two mother cells.
    • 3 : a differentiated cell divide into two differentiated cells.
  • the time before the next event.

The time \(T_{i}\) for an event is chosen thanks to the following formula \[ \begin{align} T_{i} = \frac{r}{k_{i}} \end{align} \] where
  • \(r \in [0,1]\) : random number generated with the rand MATLAB function.
  • \(k_{i}\) : rate constant found in equation \((12)\).

There is a competition between the first two events concerning the mother cell.
Either the mother cell differentiate, or it divide into two differentiated cells.
To do the choice, we compare \(T_{1}\) and \(T_{2}\). The smallest time is the next event time.
Start Initialize the cells Choose the next event among all cells Do the next event Update the simulation time Simulation time < Fermentation period Stop
Step 1 : Initialize the cells
First of all we have to generate the first cells in accordance with \(MC_0\) and \(DC_0\).
For each cell we set the cell type, the next event and the time before the next event.
Step 2 : Choose the next event among all cells
We have an array containing all the cells. Each cell contain the time before his next event (duplicate or differentiate).
The next event time processed by the algorithm is the smallest cell next event time.
Step 3 : Do the next event
Now that we know the next event type and the concerned cell (only one cell is involved here), we compute this event.
As explained above, we have three choices. If the cell is a mother cell, the cell can duplicate or differentiate.
If the cell is a differentiate cell, the cell can only duplicate.

We define a new event and time event for the cell and for the new cell in case of duplication.
We also performed the number of vitamin calculus by numerically integrating the number of \(DC\). We use the following formula. \[ \begin{align} Vitamin(t) = Vitamin(t-T_{i}) + k_{4}.DC(t).T_{i} \end{align} \] where
  • \(Vitamin(t)\) : number of vitamin at the instant \(t\)
  • \(DC(t)\) : number of differentiated cells in the medium at the instant \(t\).
  • \(T_{i}\) : time of the next event being performed.
  • \(k_{4}\) : rate constant of the differentiated cell vitamin production.
Step 4 : Update the simulation time
For each cell except the concerned cell, define the cell next event time with the following formula : \[ \begin{align} T_{event cell} = T_{event cell} - T_{i} \end{align} \] where
  • \(T_{i}\) : time of the next event being performed.
  • \(T_{event cell}\) : cell next time event.
Step 5 : Go to step 2 until the simulation time is superior to the fermentation period.
We do this processus until the simulation time is superior to the fermentation period. Of course, the number of cells increase with an exponential law. The computational power increase too with the same law.
Do not try to processed a long simulation time if your computer is not powerful.
Step 6 : Show the results.
Here are a graph generated by the stochastic algorithm.
Stochastic evolution of the system With the following distribution of event time probability.
Distribution of event time probability

Conclusion

Work in progress.

Bibliography

  • Gillespie, D.T. A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. Journal of Computational Physics 22, 403-434 (1976).
  • Gillespie, D.T. Exact Stochastic Simulation Of Coupled Chemical-Reactions. Journal of Physical Chemistry 81, 2340-2361 (1977).
  • Gillespie, D.T. A rigorous derivation of the chemical master equation. Physica A: Statistical Mechanics and its Applications 188, 404-425 (1992).
  • Cao, Y., Gillespie, D.T. & Petzold, L.R. The slow-scale stochastic simulation algorithm. The Journal of Chemical Physics 122, 14116 (2005).
  • Gillespie, D.T., Hellander, A. & Petzold, L.R. Perspective: Stochastic algorithms for chemical kinetics. The Journal of Chemical Physics 138, (2013).