Team:Grenoble/Projet/Modelling/Stochastic
From 2011.igem.org
JeanBaptiste (Talk | contribs) |
JeanBaptiste (Talk | contribs) |
||
Line 257: | Line 257: | ||
</p> | </p> | ||
<p> | <p> | ||
- | + | $X_{LacI}$ and $X_{TetR}$ are here the matrices which will represent the two toggle switch ways in each bacterium on | |
- | the whole plate. On | + | the whole plate in time. On each point of the plate are wells containing a great number of bacteria. Each way in each |
- | bacterium is a random variable. The X matrices are then matrices of | + | bacterium is a random variable. The X matrices are then 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<SUB>wells</SUB> wells on |
Revision as of 13:05, 28 October 2011
Modelling - Stochastic
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 whatever the number of simulation is. However, in the switch area, the choice between one of the two state is randomly made by bacterias. That's why, we need a modelling which is taking into account the randomness of the choice of the state.
Sensitivity to noise
In a first time, we just used the deterministic model. 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.
With the random model, fluctuations in the system are more present. This affects the quality of the switch. That's why is important to take into account the stochastic aspect (random and probalistic studies) of the system. In our stochastic model, we used gillespie algorithm. An often used one in stochastic modelling.
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 construction or destruction 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 step. Then, one random number is generated and its value will set the reaction that will occur for the current time step. 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.
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.
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
- Propensity functions and the Gillespie Algorithm
- Runs and statistical properties
Our stochastic model only describes the stochastic behaviour of the Toggle switch genetical 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 parameters page. In our Matlab code the propensities are computed at each time step in the file Stochastic_model.m.
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.
Mean, standard deviation and statistical properties
To get 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 which will represent the two toggle switch ways in each bacterium on the whole plate in time. On each point of the plate are wells containing a great number of bacteria. Each way in each bacterium is a random variable. The X matrices are then matrices of $ nb_{cells} \times nb_{cell/well} \times time points$ random variables.
Thanks to stochastic modelling we can obtain the mean and variance in each of the nbwells wells on the plate.
To design our final device we need to know the width of the interface between the two ways 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 (X1X2)well random variable.
(µX1X2(well) is of course not continuous but discrete, we just want to highlight the deviation problem caused by σX1X2(well))
We want to know µX1X2(well) and σX1X2(well) to obtain respectively :
- The width of the "gaussian" function of µX1X2(well) to set the minimal definition (the ΔIPTG between wells) of our final device
- The minimum number of bacteria we want in the wells.
We have nbcell/well independant random variables with the same probability density function. According to central limit theorem, the mean of X1X2 = (X1X2 cell1 + X1X2 cell2 + ... + X1X2 celln) / n is µX1X2(well) and its standard deviation is σX1X2(well)/. The width of the gaussian is therefore easily calculable (µX1X2(well) = µX1(well) + µX2(well)), but it's not that easy for the standard deviation σX1X2(well)
If we consider Y1 and Y2 two random variables correlated, with known mean and variance (µ1, µ2,
σ1, σ2)
Var(Y1Y2) = E[(Y1Y2 - E[(Y1Y2])2]
= E[(Y1Y2)2 -2E[Y1Y2]Y1Y2 +
E[Y1Y2]2]
= E[(Y1Y2)] -2(µ1µ2)2 + µ1µ2
and E[(Y1Y2)] is not reductible to function of µ1 and µ2. To obtian this value
we then needed to create a composite random variable X3 wich will be calculated during for each run of our
MATLAB stochastic algorithm (see previous section).
x3 = x1 * x2
We can thus get the variance and mean of X1X2 (X3) through simulation.
If we want to get an error inferior to 10% for example around the µX1X2(well) curve, the number of bacteria n
needed will be n so that :
$$precision_{68\%} = \frac{\sigma_{LacI \times TetR_{cell}}}{\mu_{LacI \times TetR_{cell}}\sqrt{n_{cells}}}$$
With such a precision we can then calculate the IPTG definition between the wells.