Team:Grenoble/Projet/Modelling/Stochastic

From 2011.igem.org

(Difference between revisions)
 
(19 intermediate revisions not shown)
Line 4: Line 4:
{{:Team:Grenoble/Templates/Team:Grenoble_Rawhide}}
{{:Team:Grenoble/Templates/Team:Grenoble_Rawhide}}
-->
-->
-
 
<html>
<html>
 +
 +
 +
<!--
 +
<img src="http://www.clickartists.org/clicksite/html/images/square.jpg"/>
 +
<h2>JB</h2>
 +
-->
 +
<!--
 +
Si vous éditez la page commencez par décommenter ces lignes, publier, PUIS commencer à faire ce que vous avez à faire et quand vous avez fini de publier remettez en commentaire.
 +
 +
Ne laissez pas le carré trop longtemps si vous n'éditez pas, chaque fois reprenez ce qui est sur internet plutôt que ce que vous avez sur votre PC
 +
ps: dans Geany selectionner une ou plusieurs lignes et appuyer sur "Ctrl + E" pour commenter ou décommenter
 +
-->
<div class="body">
<div class="body">
Line 13: Line 24:
    <h1>Modelling - Stochastic</h1>
    <h1>Modelling - Stochastic</h1>
        <p>
        <p>
-
With precedent modelling, we get the deterministic behavior of our system. All the parameters are precisely known and the solution obtained is always the same
+
  With the model developed so far, we have studied the deterministic behavior of our system. All the parameters  
-
whatever the number of simulation is. However, in the switch area, the choice between one of the two state is randomly made by bacterias.
+
  are precisely known and the solution obtained is always the same whatever the number of simulation is. However,  
-
That's why, we need a modelling which is taking into account the randomness of the choice of the state.
+
  in the switching area, the choice between one of the two states is randomly made by bacteria. We therefore need
-
    </p>
+
  to adapt the model so as to take into account the randomness of the choice of the state.
 +
</p>
     </div>
     </div>
 +
 +
 +
 +
  <center>
 +
  <form method="get" >
 +
    <input type="button" value="< PREVIOUS <" onclick="document.location = '/Team:Grenoble/Projet/Modelling/Deterministic';" />
 +
    <select name="id" onchange="document.location = '/Team:Grenoble/Projet/Modelling' + this.options[this.selectedIndex].value ;">
 +
 +
      <optgroup label="Modelling Homepage">
 +
     
 +
      <option value="#Content" >Table of content</option>
 +
 +
      </optgroup>
 +
 +
      <optgroup label="Construction of the model" >
 +
 
 +
      <option value="/Deterministic#Our_EquationsTS" >Establishment of the equation - Toggle switch</option>
 +
 +
      <option value="/Deterministic#Our_EquationsQS" >Establishment of the equation - Quorum sensing</option>
 +
 
 +
      <option value="/Deterministic#Our_algorithms" >Our algorithms</option>
 +
 
 +
     
 +
      </optgroup>
 +
 
 +
      <optgroup label="Stochastic Modelling">
 +
 
 +
      <option value="/Stochastic#Geof" selected="selected">Sensitivity to noise</option>
 +
 
 +
      <option value="/Stochastic#Gillespie_algorithm">Gillespie algorithm</option>
 +
 
 +
      <option value="/Stochastic#Stats">Mean, standard deviation and stats</option>
 +
 +
      </optgroup>
 +
 +
      <optgroup label="Parameters">
 +
     
 +
      <option value="/Parameters">Table of parameters</option>
 +
 +
      </optgroup>
 +
      </select>
 +
      <input type="hidden" name="id2" value="0" />
 +
      <input type="submit" value="Go!" />
 +
    <input type="button" value="> NEXT >" onclick="document.location = '/Team:Grenoble/Projet/Modelling/Parameters';" />
 +
 
 +
      </form>
 +
      </center>
 +
 +
    <div  class="blocbackground" id="Random_Aspect">
    <div  class="blocbackground" id="Random_Aspect">
    <h2>Sensitivity to noise</h2>
    <h2>Sensitivity to noise</h2>
    <p>
    <p>
-
In a first time, we just used the deterministic model. The gradient of IPTG and the homogenous concentration of aTc are modeled by a
+
We have started our study by simply using the deterministic model, which we have transformed into a stochastic
-
normal distribution with for standard deviation a predetermined percentage of the distribution average.
+
differential equation system: the gradient of IPTG and the homogenous concentration of aTc are modeled by a  
 +
normal distribution with, for standard deviation, a predetermined percentage of the distribution average.
    </p>
    </p>
    <center>
    <center>
    <table class="nobordure">
    <table class="nobordure">
<tr>
<tr>
-
<td><a href="https://static.igem.org/mediawiki/2011/8/83/Conc_det.png"><img src="https://static.igem.org/mediawiki/2011/8/83/Conc_det.png" class="centerwide" style="box-shadow: none"/></a>
+
<td><a href="https://static.igem.org/mediawiki/2011/8/83/Conc_det.png"><img src="https://static.igem.org/mediawiki/2011/8/83/Conc_det.png" class="centerwide" style="box-shadow: none; width: 400px;"/></a>
<div class="legend">
<div class="legend">
<strong>Figure 1:</strong>
<strong>Figure 1:</strong>
Logarithmic gradient of IPTG and aTc repartition on the plate with deterministic modelling
Logarithmic gradient of IPTG and aTc repartition on the plate with deterministic modelling
</div></td>
</div></td>
-
<td><a href="https://static.igem.org/mediawiki/2011/2/2c/Conc_sto.png"><img src="https://static.igem.org/mediawiki/2011/2/2c/Conc_sto.png" class="centerwide" style="box-shadow: none"/></a>
+
<td><a href="https://static.igem.org/mediawiki/2011/2/2c/Conc_sto.png"><img src="https://static.igem.org/mediawiki/2011/2/2c/Conc_sto.png" class="centerwide" style="box-shadow: none; width: 400px;"/></a>
<div class="legend">
<div class="legend">
<strong>Figure 2:</strong>
<strong>Figure 2:</strong>
Line 40: Line 102:
</tr></br>
</tr></br>
<tr>
<tr>
-
<td><a href="https://static.igem.org/mediawiki/2011/4/49/Switch_det.png"><img src="https://static.igem.org/mediawiki/2011/4/49/Switch_det.png" class="centerwide" style="box-shadow: none"/></a>
+
<td><a href="https://static.igem.org/mediawiki/2011/4/49/Switch_det.png"><img src="https://static.igem.org/mediawiki/2011/4/49/Switch_det.png" class="centerwide" style="box-shadow: none; width: 400px;"/></a>
<div class="legend">
<div class="legend">
<strong>Figure 3:</strong>
<strong>Figure 3:</strong>
Concentration of both repressor on the plate with deterministic modelling.
Concentration of both repressor on the plate with deterministic modelling.
</div></td>
</div></td>
-
<td><a href="https://static.igem.org/mediawiki/2011/8/8f/Switch_Stoc.png"><img src="https://static.igem.org/mediawiki/2011/8/8f/Switch_Stoc.png" class="centerwide" style="box-shadow: none"/></a>
+
<td><a href="https://static.igem.org/mediawiki/2011/8/8f/Switch_Stoc.png"><img src="https://static.igem.org/mediawiki/2011/8/8f/Switch_Stoc.png" class="centerwide" style="box-shadow: none; width: 400px;"/></a>
<div class="legend">
<div class="legend">
<strong>Figure 4:</strong>
<strong>Figure 4:</strong>
Line 54: Line 116:
</table></center>
</table></center>
<p>
<p>
-
With the random model, fluctuations in the system are more present. This affects the quality of the switch.
+
As can be seen from the figures above, the presence of fluctuations affect the quality of the switch in
-
That's why is important to take into account the stochastic aspect (random and probalistic studies) of the system.
+
the case of the random model. This is why it is important to take into account the stochastic aspect  
-
In our stochastic model, we used gillespie algorithm. An often used one in stochastic modelling.
+
(random and probalistic studies) of the system. We have run the stochastic simulations by means of a
 +
commonly-used algorithm, the Gillespie algorithm, which we describe below.
</p>
</p>
Line 68: Line 131:
      </p>
      </p>
-
      <p>
+
      <table class="nobordure">
-
<img src="https://static.igem.org/mediawiki/2011/5/5f/Mouvement_brownien.png" class="centerwide" style="height: 300px; width: auto;"/>
+
<tr>
-
      </p>
+
  <td>
-
      <p>
+
    <p>
-
However, at a cell's scale, the influence of the randomness of the reactions is no longer  
+
      <a href="https://static.igem.org/mediawiki/2011/5/5f/Mouvement_brownien.png"><img src="https://static.igem.org/mediawiki/2011/5/5f/Mouvement_brownien.png" class="centerwide" style="width: 400px; height: auto;"/></a>
-
negligible, especially for biosensors. For an efficient measurement biosensor systems must provide  
+
      <div class="legend">
-
the expected precision of the measure.
+
Reactions in the cell happen at random
-
      </p>
+
      </div>
-
      <p>
+
    </p>
-
In his algorithm Gillespie uses propensity theory to describe the behaviour of such a medium. Each  
+
  </td>
-
reaction occuring in the cell, like construction or destruction of a protein, has a certain  
+
  <td>
-
propensity (see it as the probability that the event occurs in a coming amount of time).
+
    <p>
-
      </p>
+
      However, at a cell's scale, the influence of the randomness of the reactions is no longer  
-
<img src="https://static.igem.org/mediawiki/2011/2/2b/Stochastic_illustration.png" class="centerwide" style="height: 300px; width: auto;"/>
+
      negligible, especially for biosensors. For an efficient measurement biosensor systems must provide  
-
      <p>
+
      the expected precision of the measure.
-
The propensities are calculated at each time step. Then, one random number is generated and its value
+
    </p>
-
will set the reaction that will occur for the current time step. Of course, a reaction with a relatively high
+
    <p>
-
propensity will have more chance to occur than another one.
+
      In his algorithm Gillespie uses propensity theory to describe the behaviour of such a medium.  
-
      </p>
+
      Each reaction occuring in the cell, like synthesis or degradation of a protein, has a certain  
-
      <p>
+
      propensity (see it as the probability that the event occurs in a coming amount of time).
-
After this step the concentrations are changed according to the reaction, and the same process is repeated until
+
    </p>
-
the ending time of the simulation is reached.
+
  <td>
-
      </p>
+
</tr>
 +
<tr>
 +
  <td>
 +
    <p>
 +
    <a href="https://static.igem.org/mediawiki/2011/2/2b/Stochastic_illustration.png"><img src="https://static.igem.org/mediawiki/2011/2/2b/Stochastic_illustration.png" class="centerwide" style="width: 400px; height: auto;"/></a>
 +
    <div class="legend">A random number is generated and sets the reaction to occur according to their propensities</div>
 +
    </p>
 +
  </td>
 +
  <td>
 +
    <p>
 +
      The propensities are calculated at each time . Then, one random number is generated and its value
 +
      will set the reaction that will occur for the current time . Of course, a reaction with a relatively high
 +
      propensity will have more chance to occur than another one.
 +
    </p>
 +
    <p>
 +
      After this step the concentrations are changed according to the reaction, and the same process is repeated until
 +
      the ending time of the simulation is reached.
 +
    </p>
 +
  </td>
 +
</tr>
 +
</table>
 +
 +
<p>
 +
  This is a basic description of the algorithm, but following these steps we can get a curve of the evolution of
 +
  a molecule in the cell that takes into account the randomness of reactions occuring in the cell.
 +
</p>
 +
<center>
 +
<a href="https://static.igem.org/mediawiki/2011/6/61/Gillespie_run.png"><img src="https://static.igem.org/mediawiki/2011/6/61/Gillespie_run.png" class="centerwide" /></a>
 +
<div class="legend" ><strong>Figure 1: </strong>Result of one Gillespie run on our model (TetR nb of molecules)</div>
 +
</center>
 +
<p>
 +
  Of course, the calculation being partially based on a random selection of the reactions, each run of the algorithm produces a different
 +
  curve. On the image below all the curves have been generated using the exact same initial conditions and parameters.
 +
</p>
 +
<center>
 +
<a href="https://static.igem.org/mediawiki/2011/d/da/Gillespie_runS.png"><img src="https://static.igem.org/mediawiki/2011/d/da/Gillespie_runS.png" class="centerwide" /></a>
 +
<div class="legend" ><strong>Figure 2: </strong>Result of several Gillespie runs on our model (TetR nb of molecules). Curves are all similar</div>
 +
</center>
 +
<p>
 +
  However, the output depends on the parameters and equations of the system, and for each run the results are very similar (except
 +
  if the probability density function is bi-modal of course. In the case of our system for example, at the interface each bacterium
 +
  has a chance to switch into one way or another. In this case the output can be either around 0 (LacI pathway chosen) or higher
 +
  (TetR way chosen)
 +
</p>
       
       
<p><strong>Reference :</strong> Daniel T. Gillespie (1977). "Exact Stochastic Simulation of Coupled Chemical Reactions".  
<p><strong>Reference :</strong> Daniel T. Gillespie (1977). "Exact Stochastic Simulation of Coupled Chemical Reactions".  
Line 104: Line 210:
      </strong>
      </strong>
<p>
<p>
-
  Our stochastic model only describes the stochastic behaviour of the Toggle switch genetical network.  
+
  To simplify the computations, our stochastic model only describes the stochastic behaviour of the  
 +
  Toggle switch genetic network.  
  The toggle switch is the core of our system, it is the most sensitive part of the network and sets  
  The toggle switch is the core of our system, it is the most sensitive part of the network and sets  
  the precision, the behaviour and the limits of our system.
  the precision, the behaviour and the limits of our system.
Line 113: Line 220:
  deterministic modelling :
  deterministic modelling :
</p>
</p>
 +
<center>
<table class="nobordure">
<table class="nobordure">
<tr>
<tr>
Line 120: Line 228:
<tr>
<tr>
  <td>
  <td>
-
    $ \phi \arrow TetR $
+
    $ \phi \longrightarrow TetR $
  </td>
  </td>
  <td>
  <td>
-
    $ \frac{k_{pLac}P_{Lac total}}{1+(\frac{LacI}{1 + \frac{IPTG}{K_{LacI - IPTG}}})^{n_{n_pLac}}} $
+
    $ \frac{k_{pLac}P_{Lac total}}{1+(\frac{LacI}{1 + \frac{IPTG}{K_{LacI - IPTG}}})^{n_{n_pLac}}} $
  </td>
  </td>
</tr>
</tr>
<tr>
<tr>
  <td>
  <td>
-
    $ TetR \arrow \phi$
+
    $ TetR \longrightarrow \phi$
  </td>
  </td>
  <td>
  <td>
Line 136: Line 244:
<tr>
<tr>
  <td>
  <td>
-
    $ \phi \arrow LacI $
+
    $ \phi \longrightarrow LacI $
  <td>
  <td>
-
    $ \frac{k_{pTet}P_{Tet total}}{1+(\frac{TetR}{1 + \frac{aTc}{K_{TetR - aTc}}})^{n_{n_pTet}}} $
+
    $ \frac{k_{pTet}P_{Tet total}}{1+(\frac{TetR}{1 + \frac{aTc}{K_{TetR - aTc}}})^{n_{n_pTet}}} $
  </td>
  </td>
</tr>
</tr>
<tr>
<tr>
  <td>
  <td>
-
    $ LacI \arrow \phi$
+
    $ LacI \longrightarrow \phi$
  </td>
  </td>
  <td>
  <td>
Line 151: Line 259:
   
   
</table>
</table>
 +
</center>
<p>
<p>
  The parameters are the same as those used in ODEs and can be found on the  
  The parameters are the same as those used in ODEs and can be found on the  
-
  <a href="https://2011.igem.org/Team:Grenoble/Projet/Modelling/Parameters"> parameters page.</a>
+
  <a href="https://2011.igem.org/Team:Grenoble/Projet/Modelling/Parameters"> parameter page.</a>
  In our Matlab code the propensities are computed at each time step in the file Stochastic_model.m.
  In our Matlab code the propensities are computed at each time step in the file Stochastic_model.m.
</p>
</p>
Line 192: Line 301:
  if you want to adapt our code to a completely different system, only the Stochastic_model.m and  
  if you want to adapt our code to a completely different system, only the Stochastic_model.m and  
  parameters.mat files need to be changed, but a good understanding of the whole code is necessary.
  parameters.mat files need to be changed, but a good understanding of the whole code is necessary.
 +
      </p>
 +
     
 +
      <p>
 +
Stochastic Modelling allows us to take into account the random aspect of chemical reaction and also
 +
to perform <a href="https://2011.igem.org/Team:Grenoble/Projet/Results/Toggle#Stoc">stability study of our device</a>.
      </p>
      </p>
Line 199: Line 313:
    <h2>Mean, standard deviation and statistical properties</h2>
    <h2>Mean, standard deviation and statistical properties</h2>
      <p>
      <p>
-
To get the number of bacteria and the minimal step for the IPTG gradient we get, we need to compute
+
To determine the number of bacteria and the minimal step for the IPTG gradient we get, we need to compute
the mean and the standard deviation of each of the two species of the toggle switch.
the mean and the standard deviation of each of the two species of the toggle switch.
      </p>
      </p>
      <p>
      <p>
-
X1 and X2 are here the matrices which will represent the two toggle switch ways in each bacterium on  
+
$X_{LacI}$ and $X_{TetR}$ are here the matrices representing the two toggle switch states in each bacterium on the whole  
-
the whole plate. On eahc point of the plate are wells containing a great number of bacteria. Each way in each
+
plate in time. On each point of the plate are wells containing a great number of bacteria. Each toggle state in each
-
bacterium is a random variable. The X matrices are then matrices of nb<SUB>cells</SUB>*nb<SUB>cell/well</SUB>
+
bacterium is a random variable. The X matrices are therefore matrices of $ nb_{cells} \times nb_{cell/well} \times time points$
random variables.
random variables.
      </p>
      </p>
 +
<center>
 +
<a href="https://static.igem.org/mediawiki/2011/4/4d/Matrice_X1.png"><img src="https://static.igem.org/mediawiki/2011/4/4d/Matrice_X1.png" class="centerwide" /></a>
 +
<div class="legend" ><strong>Figure 1: </strong>Design of the Matrices representing the TetR and LacI concentrations in each bacterium on the plate</div>
 +
</center>
      <p>
      <p>
-
Thanks to stochastic modelling we can obtain the mean and variance in each of the nb<SUB>wells</SUB> wells on
+
Thanks to stochastic modelling we can obtain the mean and variance in each of the $nb_{wells}$ wells on
-
the plate.
+
the plate. (These values have to be estimated from the data we obtain with Gillespie, and as in biological
-
     
+
results, we need an important dataset to make an analysis that is statistically reliable.)
-
      <img src="https://static.igem.org/mediawiki/2011/d/df/Mean1.png" class="centerwide"/>
+
      </p>
      </p>
      <p>
      <p>
-
To design our final device we need to know the width of the interface between the two ways of the toggle switch.
+
Here the mean value of concentrations of LacI and TetR in all of the bacteria in each channel is computed and we expect to get
 +
the behaviour on the figure below.
 +
      </p>
 +
      <center>
 +
      <a href="https://static.igem.org/mediawiki/2011/d/df/Mean1.png"><img src="https://static.igem.org/mediawiki/2011/d/df/Mean1.png" class="centerwide"/></a>
 +
      <div class="legend" ><strong>Figure 1: </strong>Expected behaviour of the means of TetR and LacI over the plate</div>
 +
      </center>
 +
      <p>
 +
To design our final device we need to know the width of the interface between the two states of the toggle switch.
We also need to know the number of bacteria needed in the wells to have a proper measurement.
We also need to know the number of bacteria needed in the wells to have a proper measurement.
      </p>
      </p>
      <p>
      <p>
The interface which will be the colored part of our plate will turn red when populations in way 1 and populations  
The interface which will be the colored part of our plate will turn red when populations in way 1 and populations  
-
in way 2 are in presence on the same point on the plate.  
+
in way 2 are in presence on the same point on the plate.
-
We then need to know the statistical properties of the (X<SUB>1</SUB>X<SUB>2</SUB>)<SUB>well</SUB> random variable.<br/>
+
We then need to know the statistical properties of the $(X_{LacI} X_{TetR})_{well}$ random variable.
-
      <img src="https://static.igem.org/mediawiki/2011/b/bb/Mean2.png" class="centerwide"/>
+
      </p>
      </p>
 +
      <center>
 +
      <a href="https://static.igem.org/mediawiki/2011/d/df/Mean1.png"><img src="https://static.igem.org/mediawiki/2011/b/bb/Mean2.png" class="centerwide"/></a>
 +
      <div class="legend" ><strong>Figure 2: </strong>Expected behaviour of the means of $TetR \times LacI$ over the plate</div>
 +
      </center>
 +
      <p>
      <p>
-
(µ<SUB>X1X2</SUB>(well) is of course not continuous but discrete, we just want to highlight the deviation problem caused
+
($µ_{X_{LacI}X_{TetR}}(well)$ is of course not continuous but discrete, we just want to highlight the deviation problem caused
-
by σ<SUB>X1X2</SUB>(well))
+
by $σ_{X_{LacI}X_{TetR}}(well)$)
      </p>
      </p>
-
      <p>We want to know µ<SUB>X1X2</SUB>(well) and σ<SUB>X1X2</SUB>(well) to obtain respectively :</p>
+
      <p>We want to know $µ_{X_{LacI}X_{TetR}}(well)$ and $σ_{X_{LacI}X_{TetR}}(well)$ to obtain respectively :</p>
      <ol>
      <ol>
<li>
<li>
-
  The width of the "gaussian" function of µ<SUB>X1X2</SUB>(well) to set the minimal definition (the ΔIPTG between wells)
+
  The width of the "gaussian" function of $µ_{X_{LacI}X_{TetR}}(well)$ to set the minimal definition (the ΔIPTG between wells)
  of our final device
  of our final device
</li>
</li>
Line 238: Line 367:
</li>
</li>
<p>
<p>
-
  We have nb<SUB>cell/well</SUB> independant random variables with the same probability density function. According to
+
  We have $nb_{cell/well}$ independant random variables with the same probability density function. According to
-
  central limit theorem, the mean of X<SUB>1</SUB>X<SUB>2</SUB> = (X<SUB>1</SUB>X<SUB>2 cell1</SUB> +  
+
  central limit theorem, the mean of $X_{LacI}X_{TetR} = (X_{LacI}X_{TetR  cell1} +  
-
  X<SUB>1</SUB>X<SUB>2 cell2</SUB> + ... + X<SUB>1</SUB>X<SUB>2 celln</SUB>) / n is µ<SUB>X1X2</SUB>(well) and its
+
  X_{LacI}X_{TetR  cell2} + ... + X_{LacI}X_{TetR  celln}) / n$ is $µ_{X_{LacI}X_{TetR}}(well)$ and its
-
  standard deviation is σ<SUB>X1X2</SUB>(well)/<math><mrow><msqrt><mi>n</mi></msqrt></mrow></math>.
+
  standard deviation is $σ_{X_{LacI}X_{TetR}}(well)/ \sqrt{n}$.
-
  The width of the gaussian is therefore easily calculable (µ<SUB>X1X2</SUB>(well) = µ<SUB>X1</SUB>(well) +  
+
  The width of the gaussian is therefore easily calculable ($µ_{X_{LacI}X_{TetR}}(well) = µ_{X_{LacI}}(well) +  
-
  µ<SUB>X2</SUB>(well)), but it's not that easy for the standard deviation σ<SUB>X1X2</SUB>(well)
+
  µ_{X_{TetR}}(well)$), but it's not that easy for the standard deviation $σ_{X_{LacI}X_{TetR}}(well)$
</p>
</p>
<p>
<p>
-
  If we consider Y1 and Y2 two random variables correlated, with known mean and variance (µ<SUB>1</SUB>, µ<SUB>2</SUB>,  
+
  If we consider $X_{LacI}$ and $X_{TetR}$ are two correlated random variables, with known mean and variance ($µ_{LacI}$, $µ_{TetR}$,  
-
  σ<SUB>1</SUB>, σ<SUB>2</SUB>)<br/>
+
  $σ_{LacI}$, $σ_{TetR}$)
-
  Var(Y<SUB>1</SUB>Y<SUB>2</SUB>) = E[(Y<SUB>1</SUB>Y<SUB>2</SUB> - E[(Y<SUB>1</SUB>Y<SUB>2</SUB>])<SUP>2</SUP>]<br/>
+
  $$
-
  = E[(Y<SUB>1</SUB>Y<SUB>2</SUB>)<SUP>2</SUP> -2E[Y<SUB>1</SUB>Y<SUB>2</SUB>]Y<SUB>1</SUB>Y<SUB>2</SUB> +  
+
  Var(X_{LacI}X_{TetR}) = E[(X_{LacI}X_{TetR} - E[(X_{LacI}X_{TetR}])^{2}]
-
  E[Y<SUB>1</SUB>Y<SUB>2</SUB>]<SUP>2</SUP>]<br/>
+
  $$
-
  = E[(Y<SUB>1</SUB>Y<SUB>2</SUB>)] -2(µ<SUB>1</SUB>µ<SUB>2</SUB>)<SUP>2</SUP> + µ<SUB>1</SUB>µ<SUB>2</SUB>
+
  $$
 +
  = E[(X_{LacI}X_{TetR})^{2} -2E[X_{LacI}X_{TetR}]X_{LacI}X_{TetR} +  
 +
  E[X_{LacI}X_{TetR}]^{2}]
 +
  $$
 +
  $$
 +
  = E[(X_{LacI}X_{TetR})] -2(µ_{LacI}µ_{TetR})^{2} + µ_{LacI}µ_{TetR}
 +
  $$
</p>
</p>
<p>
<p>
-
  and E[(Y<SUB>1</SUB>Y<SUB>2</SUB>)] is not reductible to function of µ<SUB>1</SUB> and µ<SUB>2</SUB>. To obtian this value
+
  and $E[(X_{LacI}X_{TetR})]$ is not reductible to function of $µ_{LacI}$ and $µ_{TetR}$. To obtain this value
-
  we then needed to create a composite random variable X<SUB>3</SUB> wich will be calculated during for each run of our
+
  we then needed to create a composite random variable x<SUB>3</SUB> wich will be calculated during each run of our
-
  MATLAB stochastic algorithm (see previous section).<br/>
+
  MATLAB stochastic algorithm (see previous section).
-
  x<SUB>3</SUB> = x<SUB>1</SUB> * x<SUB>2</SUB><br/>
+
  $$
-
  We can thus get the variance and mean of X<SUB>1</SUB>X<SUB>2</SUB> (X<SUB>3</SUB>) through simulation.
+
  x_{3}= x_{LacI} \times x_{TetR}
-
  If we want to get an error inferior to 10% for example around the µ<SUB>X1X2</SUB>(well) curve, the number of bacteria n
+
  $$
-
  needed will be n so that :
+
  We can thus get the variance and mean of $X_{LacI}X_{TetR}$ ($X_{3}$) with our data.
-
  <math display="block">
+
  If we want to get an error inferior to 10% for example around the $µ_{X_{LacI}X_{TetR}}(well)$ curve, the number of bacteria n
-
  <mrow>
+
  needed will be n so that:
-
    <mfrac>
+
  $$\frac{\sigma_{LacI \times TetR_{cell}}}{\mu_{LacI \times TetR_{cell}}\sqrt{n_{cells}}} \leq 10%$$
-
      <mrow>
+
-
<msub>
+
-
<mi>&sigma;</mi>
+
-
      <msub>
+
-
      <mi>X</mi>
+
-
    <mn>3</mn>
+
-
      </msub>
+
-
</msub>
+
-
<mfenced open="(" close=")" separators=",">
+
-
  <mrow>
+
-
    <mi>well</mi>
+
-
  </mrow>
+
-
</mfenced>
+
-
      </mrow>
+
-
      <mrow>
+
-
<msqrt>
+
-
  <mi>n</mi>
+
-
</msqrt>
+
-
      </mrow>
+
-
    </mfrac>
+
-
    <mo>/</mo>
+
-
    <msub>
+
-
    <mi>µ</mi>
+
-
  <mi>X1X2</mi>
+
-
    </msub>
+
-
    <mfenced open="(" close=")" separators=",">
+
-
      <mrow>
+
-
<mi>well</mi>
+
-
      </mrow>
+
-
    </mfenced>
+
-
    <mo>&lt;</mo>
+
-
    <mi>10%</mi>
+
-
  </mrow>
+
-
  </math>
+
  With such a precision we can then calculate the IPTG definition between the wells.
  With such a precision we can then calculate the IPTG definition between the wells.
 +
</p>
 +
 +
<p>
 +
This statistical approach of stochastic modelling allows us to get <a href="https://2011.igem.org/Team:Grenoble/Projet/Results/Device#Statistic">severals specificities of our device</a>.
</p>
</p>
 
 
-
 
</div>
</div>
 
 
-
<div id="selector">
+
-
<form method="get" >
+
  <center>
-
  <input type="button" value="< PREVIOUS <" onclick="document.location = '/Team:Grenoble/Projet/Modelling';" />
+
  <form method="get" >
-
  <select name="id" onchange="document.location = '/Team:Grenoble/Projet/Modelling' + this.options[this.selectedIndex].value ;">
+
    <input type="button" value="< PREVIOUS <" onclick="document.location = '/Team:Grenoble/Projet/Modelling/Deterministic';" />
 +
    <select name="id" onchange="document.location = '/Team:Grenoble/Projet/Modelling' + this.options[this.selectedIndex].value ;">
-
    <optgroup label="Modelling Homepage">
+
      <optgroup label="Modelling Homepage">
-
   
+
     
-
    <option value="#Content" selected="selected">Table of content</option>
+
      <option value="#Content" >Table of content</option>
-
    </optgroup>
+
      </optgroup>
-
    <optgroup label="Construction of the model" >
+
      <optgroup label="Construction of the model" >
-
                               
+
 
-
                                    <option value="/Deterministic#Our_EquationsTS" >Establishment of the equation - Toggle switch</option>
+
      <option value="/Deterministic#Our_EquationsTS" >Establishment of the equation - Toggle switch</option>
-
                                    <option value="/Deterministic#Our_EquationsQS" >Establishment of the equation - Quorum sensing</option>
+
      <option value="/Deterministic#Our_EquationsQS" >Establishment of the equation - Quorum sensing</option>
-
                               
+
 
-
                                    <option value="/Deterministic#Our_algorithms" >Our algorithms</option>
+
      <option value="/Deterministic#Our_algorithms" >Our algorithms</option>
-
                               
+
 
-
                                   
+
     
-
                            </optgroup>
+
      </optgroup>
-
                       
+
 
-
                            <optgroup label="Stochastic Modelling">
+
      <optgroup label="Stochastic Modelling">
-
                               
+
 
-
                                    <option value="/Stochastic#Geof">Sensitivity to noise</option>
+
      <option value="/Stochastic#Geof" selected="selected">Sensitivity to noise</option>
-
                               
+
 
-
                                    <option value="/Stochastic#Gillespie_algorithm">Gillespie algorithm</option>
+
      <option value="/Stochastic#Gillespie_algorithm">Gillespie algorithm</option>
-
                               
+
 
-
                                    <option value="/Stochastic#Stats">Mean, standard deviation and stats</option>
+
      <option value="/Stochastic#Stats">Mean, standard deviation and stats</option>
-
 
+
-
                            </optgroup>
+
-
                            <optgroup label="Parameters">
+
      </optgroup>
-
                           
+
-
    <option value="/Parameters">Table of parameters</option>
+
-
    <option value="/Parameters">Sensitivity to parameters</option>
+
-
    </optgroup>
+
      <optgroup label="Parameters">
-
                           
+
     
-
                            <optgroup label="Analysis of the system">
+
      <option value="/Parameters">Table of parameters</option>
-
                           
+
-
    <option value="/Results#Validation">Simulation of bacteria distribution</option>
+
-
<option value="/Results#Validation">Stability of the system</option>
+
-
    <option value="/Results#Device">Device specificities</option>
+
-
    </optgroup>
+
      </optgroup>
-
                    </select>
+
      </select>
-
                    <input type="hidden" name="id2" value="0" />
+
      <input type="hidden" name="id2" value="0" />
-
                    <input type="submit" value="Go!" />
+
      <input type="submit" value="Go!" />
-
  <input type="button" value="> NEXT >" onclick="document.location = '/Team:Grenoble/Projet/Modelling/Deterministic';" />
+
    <input type="button" value="> NEXT >" onclick="document.location = '/Team:Grenoble/Projet/Modelling/Parameters';" />
-
               
+
 
-
            </form>
+
      </form>
-
            </div>
+
      </center>
Line 364: Line 460:
</div>
</div>
</html>
</html>
 +
{{:Team:Grenoble/Design/pied}}

Latest revision as of 02:34, 29 October 2011

Grenoble 2011, Mercuro-Coli iGEM

Modelling - Stochastic

With the model developed so far, we have studied the deterministic behavior of our system. All the parameters are precisely known and the solution obtained is always the same whatever the number of simulation is. However, in the switching area, the choice between one of the two states is randomly made by bacteria. We therefore need to adapt the model so as to take into account the randomness of the choice of the state.

Sensitivity to noise

We have started our study by simply using the deterministic model, which we have transformed into a stochastic differential equation system: the gradient of IPTG and the homogenous concentration of aTc are modeled by a normal distribution with, for standard deviation, a predetermined percentage of the distribution average.


Figure 1: Logarithmic gradient of IPTG and aTc repartition on the plate with deterministic modelling
Figure 2: Logarithmic gradient of IPTG and aTc repartition on the plate with random deterministic modelling
Figure 3: Concentration of both repressor on the plate with deterministic modelling.
Figure 4: Concentration of both repressor on the plate with random deterministic modelling.

As can be seen from the figures above, the presence of fluctuations affect the quality of the switch in the case of the random model. This is why it is important to take into account the stochastic aspect (random and probalistic studies) of the system. We have run the stochastic simulations by means of a commonly-used algorithm, the Gillespie algorithm, which we describe below.

Gillespie algorithm

During a chemical reaction, the molecules move at random in the medium obeying brownian motion, and reactions happen randomly in the medium. On a macroscopic scale, the reactions can be seen as deterministic, and the statistical properties are summarized by constants in classical ODEs.

Reactions in the cell happen at random

However, at a cell's scale, the influence of the randomness of the reactions is no longer negligible, especially for biosensors. For an efficient measurement biosensor systems must provide the expected precision of the measure.

In his algorithm Gillespie uses propensity theory to describe the behaviour of such a medium. Each reaction occuring in the cell, like synthesis or degradation of a protein, has a certain propensity (see it as the probability that the event occurs in a coming amount of time).

A random number is generated and sets the reaction to occur according to their propensities

The propensities are calculated at each time . Then, one random number is generated and its value will set the reaction that will occur for the current time . Of course, a reaction with a relatively high propensity will have more chance to occur than another one.

After this step the concentrations are changed according to the reaction, and the same process is repeated until the ending time of the simulation is reached.

This is a basic description of the algorithm, but following these steps we can get a curve of the evolution of a molecule in the cell that takes into account the randomness of reactions occuring in the cell.

Figure 1: Result of one Gillespie run on our model (TetR nb of molecules)

Of course, the calculation being partially based on a random selection of the reactions, each run of the algorithm produces a different curve. On the image below all the curves have been generated using the exact same initial conditions and parameters.

Figure 2: Result of several Gillespie runs on our model (TetR nb of molecules). Curves are all similar

However, the output depends on the parameters and equations of the system, and for each run the results are very similar (except if the probability density function is bi-modal of course. In the case of our system for example, at the interface each bacterium has a chance to switch into one way or another. In this case the output can be either around 0 (LacI pathway chosen) or higher (TetR way chosen)

Reference : Daniel T. Gillespie (1977). "Exact Stochastic Simulation of Coupled Chemical Reactions". The Journal of Physical Chemistry 81 (25): 2340–2361

Daniel T. Gillespie (1976). "A General Method for Numerically Simulating the Stochastic Time Evolution of Coupled Chemical Reactions". Journal of Computational Physics 22 (4): 403–434

Our genetical network

  1. Propensity functions and the Gillespie Algorithm
  2. To simplify the computations, our stochastic model only describes the stochastic behaviour of the Toggle switch genetic network. The toggle switch is the core of our system, it is the most sensitive part of the network and sets the precision, the behaviour and the limits of our system.

    The propensity functions used in our models are derived from the ODEs we have already written for deterministic modelling :

    Chemical reaction Propensity
    $ \phi \longrightarrow TetR $ $ \frac{k_{pLac}P_{Lac total}}{1+(\frac{LacI}{1 + \frac{IPTG}{K_{LacI - IPTG}}})^{n_{n_pLac}}} $
    $ TetR \longrightarrow \phi$ $ \delta_{TetR} TetR $
    $ \phi \longrightarrow LacI $ $ \frac{k_{pTet}P_{Tet total}}{1+(\frac{TetR}{1 + \frac{aTc}{K_{TetR - aTc}}})^{n_{n_pTet}}} $
    $ LacI \longrightarrow \phi$ $ \delta_{LacI} LacI $

    The parameters are the same as those used in ODEs and can be found on the parameter page. In our Matlab code the propensities are computed at each time step in the file Stochastic_model.m.

  3. Runs and statistical properties
  4. In a Gillespie simulation, the information brought by a few instances of the Gillespie simulation is enough to get the general behaviour of the genetical system. However, it is not sufficient when the information that we want is the mean or the variance of the concentrations in each species.

    In this case a great number of runs is necessary to have a correct estimate of the expected values. This is why we had to write a Matlab code to iterate a great number of runs. This part of the code can be found in the file Main_gillespie.m.

    Once the runs are computed through Gillespie algorithm, we have to extract the information from them. In this purpose we wrote the Hist.m, test.m and Dynamicdistros.m files. These files are specific to our system, we hope they can give an idea of how to analyse the results obtained via our Gillespie code, but they are not as easily understandable as other files.

    Once the datasets are obtained we have to extract its statistical properties. Refer to the next section for more information.

IMPORTANT NOTE:

We tried to write a Matlab code that is as easily adaptable to any other system as possible. However, because of the lack of time and the great amount of work it requires, we could not build a completely generic MATLAB function handler for Gillespie simulations. We provide the source codes here of the Matlab stochastic scripts for our simulations and tried to comment them as much as possible. Note that, if you want to adapt our code to a completely different system, only the Stochastic_model.m and parameters.mat files need to be changed, but a good understanding of the whole code is necessary.

Stochastic Modelling allows us to take into account the random aspect of chemical reaction and also to perform stability study of our device.

Mean, standard deviation and statistical properties

To determine the number of bacteria and the minimal step for the IPTG gradient we get, we need to compute the mean and the standard deviation of each of the two species of the toggle switch.

$X_{LacI}$ and $X_{TetR}$ are here the matrices representing the two toggle switch states in each bacterium on the whole plate in time. On each point of the plate are wells containing a great number of bacteria. Each toggle state in each bacterium is a random variable. The X matrices are therefore matrices of $ nb_{cells} \times nb_{cell/well} \times time points$ random variables.

Figure 1: Design of the Matrices representing the TetR and LacI concentrations in each bacterium on the plate

Thanks to stochastic modelling we can obtain the mean and variance in each of the $nb_{wells}$ wells on the plate. (These values have to be estimated from the data we obtain with Gillespie, and as in biological results, we need an important dataset to make an analysis that is statistically reliable.)

Here the mean value of concentrations of LacI and TetR in all of the bacteria in each channel is computed and we expect to get the behaviour on the figure below.

Figure 1: Expected behaviour of the means of TetR and LacI over the plate

To design our final device we need to know the width of the interface between the two states of the toggle switch. We also need to know the number of bacteria needed in the wells to have a proper measurement.

The interface which will be the colored part of our plate will turn red when populations in way 1 and populations in way 2 are in presence on the same point on the plate. We then need to know the statistical properties of the $(X_{LacI} X_{TetR})_{well}$ random variable.

Figure 2: Expected behaviour of the means of $TetR \times LacI$ over the plate

($µ_{X_{LacI}X_{TetR}}(well)$ is of course not continuous but discrete, we just want to highlight the deviation problem caused by $σ_{X_{LacI}X_{TetR}}(well)$)

We want to know $µ_{X_{LacI}X_{TetR}}(well)$ and $σ_{X_{LacI}X_{TetR}}(well)$ to obtain respectively :

  1. The width of the "gaussian" function of $µ_{X_{LacI}X_{TetR}}(well)$ to set the minimal definition (the ΔIPTG between wells) of our final device
  2. The minimum number of bacteria we want in the wells.
  3. We have $nb_{cell/well}$ independant random variables with the same probability density function. According to central limit theorem, the mean of $X_{LacI}X_{TetR} = (X_{LacI}X_{TetR cell1} + X_{LacI}X_{TetR cell2} + ... + X_{LacI}X_{TetR celln}) / n$ is $µ_{X_{LacI}X_{TetR}}(well)$ and its standard deviation is $σ_{X_{LacI}X_{TetR}}(well)/ \sqrt{n}$. The width of the gaussian is therefore easily calculable ($µ_{X_{LacI}X_{TetR}}(well) = µ_{X_{LacI}}(well) + µ_{X_{TetR}}(well)$), but it's not that easy for the standard deviation $σ_{X_{LacI}X_{TetR}}(well)$

    If we consider $X_{LacI}$ and $X_{TetR}$ are two correlated random variables, with known mean and variance ($µ_{LacI}$, $µ_{TetR}$, $σ_{LacI}$, $σ_{TetR}$) $$ Var(X_{LacI}X_{TetR}) = E[(X_{LacI}X_{TetR} - E[(X_{LacI}X_{TetR}])^{2}] $$ $$ = E[(X_{LacI}X_{TetR})^{2} -2E[X_{LacI}X_{TetR}]X_{LacI}X_{TetR} + E[X_{LacI}X_{TetR}]^{2}] $$ $$ = E[(X_{LacI}X_{TetR})] -2(µ_{LacI}µ_{TetR})^{2} + µ_{LacI}µ_{TetR} $$

    and $E[(X_{LacI}X_{TetR})]$ is not reductible to function of $µ_{LacI}$ and $µ_{TetR}$. To obtain this value we then needed to create a composite random variable x3 wich will be calculated during each run of our MATLAB stochastic algorithm (see previous section). $$ x_{3}= x_{LacI} \times x_{TetR} $$ We can thus get the variance and mean of $X_{LacI}X_{TetR}$ ($X_{3}$) with our data. If we want to get an error inferior to 10% for example around the $µ_{X_{LacI}X_{TetR}}(well)$ curve, the number of bacteria n needed will be n so that: $$\frac{\sigma_{LacI \times TetR_{cell}}}{\mu_{LacI \times TetR_{cell}}\sqrt{n_{cells}}} \leq 10%$$ With such a precision we can then calculate the IPTG definition between the wells.

    This statistical approach of stochastic modelling allows us to get severals specificities of our device.