Difference between revisions of "Team:Manchester/Model/Simulate"

 
(47 intermediate revisions by 3 users not shown)
Line 82: Line 82:
 
h1.bigtitle{
 
h1.bigtitle{
 
     font-size: 30px;
 
     font-size: 30px;
 +
}
 +
 +
.navbutton{
 +
    padding: 10px;
 +
    background: rgb(238, 238, 238);
 +
    margin-bottom:20px;
 +
}
 +
 +
.navbutton b{
 +
    padding-bottom:20px;
 +
    text-align:center;
 
}
 
}
  
Line 95: Line 106:
  
 
<div class="team">
 
<div class="team">
 +
 +
  <div class="navbutton onethird_size">
 +
 +
    <b>Contents</b>
 +
 +
      <ol style="text-align:left"> 
 +
        <a href="#heading1"><li style="text-align:left">ODEs applicability</li></a>
 +
        <a href="#heading2"><li style="text-align:left">Equations at equilibrium</li></a>
 +
        <a href="#heading3"><li style="text-align:left">Concentration Time Graphs</li></a>
 +
        <a href="#heading4"><li style="text-align:left">Solving ODEs</li></a>
 +
        <a href="#heading5"><li style="text-align:left">Why we chose our 4 models</li></a>
 +
        <a href="#heading6"><li style="text-align:left">Extension to ensemble modelling</li></a>
 +
        <a href="#heading7"><li style="text-align:left">Constraints - Improving Data</li></a>
 +
        <a href="#heading8"><li style="text-align:left">Constraints - Illustration of concept</li></a>
 +
        <a href="#heading9"><li style="text-align:left">How our code works: Constraints</li></a>
 +
      </ol>
 +
 +
 +
 +
 +
  </div>
  
 
<!---------------------------------------------------------ODE-------------------------------------------------->
 
<!---------------------------------------------------------ODE-------------------------------------------------->
Line 100: Line 132:
 
<h1 class="bigtitle">ODE</h1>
 
<h1 class="bigtitle">ODE</h1>
  
<p> Contents </br>
 
<a href="#heading1">ODEs applicability</a></br>
 
<a href="#heading2">Equations at equilibrium</a></br>
 
<a href="#heading3">Concentration Time Graphs</a></br>
 
<a href="#heading4">Solving ODEs</a></br>
 
<a href="#heading5">Why we chose our 4 models</a></br>
 
<a href="#heading6">Extension to ensemble modelling</a></br>
 
<a href="#heading7">Constraints - Improving Data</a></br>
 
<a href="#heading8">Constraints - Illustration of concept</a></br>
 
<a href="#heading9">How our code works: Constraints</a></br>
 
  
<p id="heading1" class="title2" style="font-size:25px;">Ode’s applicability to enzyme kinetics</p>
+
 
 +
<p id="heading1" class="title2" style="font-size:25px;">ODEs applicability to enzyme kinetics</p>
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
ODE’s or ordinary differential equations are at the heart of modeling enzyme kinetics. They are equations describing the rate of change of a variable e.g. product concentration. To illustrate their applicability consider the following reaction scheme
+
Ordinary Differential Equations (ODEs) are at the heart of modeling enzyme kinetics. They are equations describing the rate of change of a variable e.g. product concentration. To illustrate their applicability consider the following reaction scheme:
 
<br /><br />
 
<br /><br />
 
</p>
 
</p>
Line 122: Line 145:
 
</center>
 
</center>
  
<p style="font-size:17px;">Consider the rate of change of AEa the enzyme complex. It can break down into H and Ea or it could break down into A and Ea or it could be formed by A and Ea. The first two possibilities will happen proportional to the amount of AEa. the latter possibility is proportional to the product of the concentrations as it’s proportional to the number of collisions.  
+
<p style="font-size:17px;">Consider the rate of change of the enzyme complex (AE<sub>A</sub>). There are 3 possibilities:</p>
 +
$$A+E_A \rightarrow AE_A $$
 +
$$AE_A \rightarrow A + E_A$$
 +
$$AE_A \rightarrow H + E_A$$
 +
</br>
 +
<p style="font-size:17px;">
 +
It can break down into H and E<sub>A</sub> or it could break down into A and E<sub>A</sub> or it could be formed by A and E<sub>A</sub>. The first two possibilities will happen proportional to the amount of AE<sub>A</sub>. the latter possibility is proportional to the product of the concentrations as it’s proportional to the number of collisions.  
 
<br /><br />
 
<br /><br />
Assigning rates to these steps which represent the probability of each process happening you would therefore get the following equation  
+
Given that the rate of change of AE<sub>A</sub> is the amount made minus the amount consumed. Therefore you get the following equation, where k's represent the probability of each process.
  
$$\dot{AE_a} = k_1[A][E_a]-(k_2+k_3)[AE_a]$$
+
$$\dot{AE_A} = k_1[A][E_A]-(k_2+k_3)[AE_A]$$
 
</p>
 
</p>
  
Line 136: Line 165:
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
The equations described above are called mass action equations and their rate constants aren’t widely documented. What are actually documented are constants that describe a reaction scheme under the assumption that all enzyme complexes are at steady state.  In doing this you are able to remove enzyme and enzyme complex concentrations entirely from your equations. This is ideal as these concentrations are hard to measure in the lab.
+
The equations described above are called mass action equations and their rate constants are not widely documented. What are actually documented are constants that describe a reaction scheme under the assumption that all enzyme complexes are at steady state (the rate of change is zero).  In doing this you are able to remove enzyme and enzyme complex concentrations entirely from your equations. This is ideal as these concentrations are hard to measure in the lab.
 
<br /><br />
 
<br /><br />
In most cases these equations have been derived and documented especially when you note the equations are modular (you can chop the reaction scheme up into a series of smaller reaction schemes). If you have an abnormal reaction pathway you may need to derive it for yourself. A guide on how to do this is available on github.
+
In most cases these equations have been derived and documented, especially when you note the equations are modular (you can chop the reaction scheme up into a series of smaller reaction schemes). If you have an abnormal reaction pathway you may need to derive it for yourself.
 
</p>
 
</p>
  
  
  
<p id="heading3" class="title2" style="font-size:25px;">Concentration time graphs</p>
+
<p id="heading3" class="title2" style="font-size:25px;">Generating concentration time graphs</p>
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
The experimental data available to us was concentration time graphs, ode’s are perfect for creating these. We mainly used a matlab solver which is a predictor-corrector method. We also have a nth order ode solver we have written in c++ and that uses RK4.  
+
The experimental data available to us was concentration time graphs, ODEs are perfect for creating these. We mainly used a MATLAB solver which uses a predictor-corrector method. We also have a n<sup>th</sup> order ODE solver written in C++ and that uses RK4.  
 
<br /><br />
 
<br /><br />
It will now be explained how knowing the rate of change of your concentrations can lead to concentration over time in practice via such methods. The simple euler method will be used to illustrate.  
+
It will now be explained how knowing the rate of change of your concentrations can lead to concentration over time in practice via such methods. The Forward Euler method will be used to illustrate.  
 
<br /><br />
 
<br /><br />
You must know your starting concentrations, these are your “initial conditions” and represent e.g. your starting concentration of glucose/alcohol (mM). The differential equation is used to find the rate of change at this point (here on gradient). You take a small step in time along this gradient. Then you recalculate the gradient and take another small step and so on. See below figure for a visual representation.
+
You must know your starting concentrations, these are your “initial conditions” and represent your starting concentration of reagents (mM). The differential equation is used to find the rate of change at this point. You take a small step in time along this gradient. Then you recalculate the gradient at the new point before taking another small step and so on. See below figure for a visual representation.
 
</p>
 
</p>
  
Line 164: Line 193:
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
A question we tried to answer is what reaction scheme is our cell free mechanism actually following. What follows are the possibilities we investigated,the reaction scheme, the equations for said reaction scheme and what they say physically about the reaction scheme. How to then predict which model/models are closest to the truth is explained in the ensemble output sections.
+
A question we tried to answer is what reaction scheme is our cell free mechanism actually following. What follows are the possibilities we investigated for the reaction scheme. How to then predict which models are closest to the truth is explained in the <a href="https://2016.igem.org/Team:Manchester/Model/MechanismUncertainty">network mechanism analysis.</a>
 
<br /><br />
 
<br /><br />
Before we proceed it’s important to know that our schemes are broken up in two steps.  Step 1 alcohol/glucose as a substrate with H2O2 as a product and step2 H2O2 as a substrate with oxidised ABTS as a product. The final pairings we tested are shown in the chart below any y can be paired with any other for the step so e.g. revmm and pp. The reason for these distinctions apart from saying mm is too far removed from reality is that they make no sense as the other step this will soon become clear.
+
Before we proceed it’s important to know that our schemes are broken up in two steps.  Step 1 alcohol/glucose as a substrate with H<sub>2</sub>O<sub>2</sub> as a product </br></br>step 2 H<sub>2</sub>O<sub>2</sub> as a substrate with ABTS<sub>oxidised</sub> as a product. </br></br>
 +
The final selection is shown in the chart below where pairing from each column is suitable e.g. Reversible Michaelis-Menten and Bi-uni. The reason for these distinctions apart from saying "Irreversible Michaelis-Menten is too far removed from reality" is that they make no sense as the other step this will soon become clear.
 
</p>
 
</p>
  
Line 173: Line 203:
 
     <tr>
 
     <tr>
 
       <td>Type of reaction</td>
 
       <td>Type of reaction</td>
       <td>step 1</td>
+
       <td>GOx reaction</td>
       <td>step 2</td>
+
       <td>HRP reaction</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Michaelis menten</td>
+
       <td>Irreversible Michaelis-Menten</td>
 
       <td>n</td>
 
       <td>n</td>
 
       <td>n</td>
 
       <td>n</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Reversible mm</td>
+
       <td>Reversible Michaelis-Menten</td>
 
       <td>y</td>
 
       <td>y</td>
 
       <td>n</td>
 
       <td>n</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Bi-uni</td>
+
       <td>Bi-Uni Michaelis-Menten</td>
 
       <td>n</td>
 
       <td>n</td>
 
       <td>y</td>
 
       <td>y</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Uni-bi</td>
+
       <td>Uni-Bi Michaelis-Menten</td>
 
       <td>y</td>
 
       <td>y</td>
 
       <td>n</td>
 
       <td>n</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>pp</td>
+
       <td>Ping-Pong</td>
 
       <td>n</td>
 
       <td>n</td>
 
       <td>y</td>
 
       <td>y</td>
Line 205: Line 235:
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
For all the equations and variable definitions follow this<a href "http://tellurium.analogmachine.org/wp-content/uploads/2014/08/RateLawList.pdf"> link, </a>
+
For all the equations and variable definitions follow this<a href="http://tellurium.analogmachine.org/wp-content/uploads/2014/08/RateLawList.pdf"> link, </a>
Note for Tau = [P]/[S] for multiple substrates/products it is multiplicative. V represents the rate of change of the product.
+
Note: </p>
 +
$$\text{T} = \frac{\prod_{i=1}^nP_i}{\prod_{j=1}^kS_j}$$
 +
$$\nu = \frac{dP}{dt}=\text{rate of change of product}$$
 
<br /><br />
 
<br /><br />
Simple michaelis menten.  
+
<p style="font-size:17px;">
This model has no real physical relevance to our experiment so it's not discussed here.
+
Irreversible Michaelis-Menten.  
While useful as an initial test equation the irreversible nature easily hides properties of the system and this is highly undesirable
+
This model has very poor physical relevance to our experiment so it's not discussed here.
 +
While useful for initial testing the irreversible nature easily hides properties of the system and this is highly undesirable.
 
<br /><br />
 
<br /><br />
Reversible michaelis menten:</p>
+
Reversible Michaelis-Menten:</p>
 
<center>
 
<center>
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/c/c1/T--Manchester--modelling_equation_2.png" alt="equation 2" />
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/c/c1/T--Manchester--modelling_equation_2.png" alt="equation 2" />
 
</center>
 
</center>
 
<br /><br />
 
<br /><br />
<p style="font-size:17px;">This reaction scheme is saying alcohol/glucose and AOx/GOx can combine to make H2O2 and that this reaction can happen in reverse and there will be some sort of equilibrium.
+
<p style="font-size:17px;">This reaction scheme is saying alcohol and AOx can combine to make H<sub>2</sub>O<sub>2</sub> and that this reaction can happen reversibly and so some sort of equilibrium will occur.
 
<br /><br />
 
<br /><br />
 
The mass action scheme is:</p>
 
The mass action scheme is:</p>
Line 225: Line 258:
 
<br /><br />
 
<br /><br />
  
<p style="font-size:17px;">As you can see the two schemes are very similar, we know that ethanal is actually the second product in this reaction. Our question is, does it make a difference to the kinetics? This question can be assessed with the use of ensemble outputs and comparison to results using the uni bi rate law.  
+
<p style="font-size:17px;">As you can see the two schemes are very similar.
 +
</br></br> We know that Ethanal is actually the second product in this reaction. Our question is, does it make a difference to the kinetics? This question can be assessed with the use of <a href="https://2016.igem.org/Team:Manchester/Model/MechanismUncertainty">ensemble outputs</a> and comparison to results using the Uni-Bi Michaelis-Menten rate law.  
 
<br /><br />
 
<br /><br />
  
Uni-bi:</p>
+
Uni-Bi Michaelis-Menten:</p>
 
<center>
 
<center>
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/1/1e/T--Manchester--modelling_equation_4.png" alt="equation 4" />
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/1/1e/T--Manchester--modelling_equation_4.png" alt="equation 4" />
Line 234: Line 268:
 
<br /><br />
 
<br /><br />
  
<p style="font-size:17px;">This reaction is saying that alcohol/glucose and aox can combine to make H2O2 and Ethanal and that this can occur on reverse.
+
<p style="font-size:17px;">This reaction is saying that alcohol and AOx can combine to make H<sub>2</sub>O<sub>2</sub> and Ethanal and that this can occur reversibly
<br /><br />
+
 
The mass action scheme is:</p>
 
The mass action scheme is:</p>
  
Line 243: Line 276:
 
<br /><br />
 
<br /><br />
  
<p style="font-size:17px;">This mechanism does include ethanal. The order the substrates break off does matter, as you can imagine if Ethanal does break off first you will end up with a large amount of ethanal forcing the back reaction, this would be alleviated if H2o2 could break off first as then H2o2 would be more available for the next use. In literature there are two equations for this, however the ordered case is the random order case in the limit some of its rates go to zero. As such we used the random order case in our analysis and let the rate constants take care of the order.  
+
<p style="font-size:17px;">This mechanism does include Ethanal. The order the substrates dissociate does matter, as you can imagine if Ethanal does break off first you will end up with a large amount of Ethanal forcing the back reaction, this would be alleviated if H<sub>2</sub>O<sub>2</sub> could break off first as then H<sub>2</sub>O<sub>2</sub> would be more available for the next use. In literature there are two equations for this, however the ordered case is the random order case in the limit some of its rates go to zero. We assumed that if this were the case the sampling of our system would account for this, sampling many tiny parameters, rather than us making that judgement ourselves.
 
<br /><br />
 
<br /><br />
Bi-uni :</p>
+
Bi-Uni Michaelis-Menten:</p>
 
<center>
 
<center>
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/a/a7/T--Manchester--modelling_equation_6.png" alt="equation 6" />
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/a/a7/T--Manchester--modelling_equation_6.png" alt="equation 6" />
Line 251: Line 284:
 
<br /><br />
 
<br /><br />
 
   
 
   
<p style="font-size:17px;">This reaction is saying H202 and abts and hrp can combine to make oxidised abts with hrp acting as a catalyst.  
+
<p style="font-size:17px;">This reaction is saying H<sub>2</sub>O<sub>2</sub> and ABTS and HRP can combine to make ABTS<sub>oxidised</sub> with HRP acting as a catalyst.  
 
<br /><br />
 
<br /><br />
 
The mass action scheme is:</p>
 
The mass action scheme is:</p>
Line 258: Line 291:
 
</center>
 
</center>
 
<br /><br />
 
<br /><br />
<p style="font-size:17px;">This mechanism takes into account that there are two substrates the same implentation was used as in uni-bi. Physically it is sayin there is some mechanism by which hrp acts directly as a catalyst in one step. Ping pong proposes something different. We can investigate which one is correct with our ensemble outputs.
+
<p style="font-size:17px;">This mechanism takes into account that there are two substrates, the same implementation was used as in Uni-Bi Michaelis-Menten. Physically it is saying there is some mechanism by which HRP acts directly as a catalyst in one step. </br>Ping pong proposes something different.  
 +
 
 
  <br /><br />
 
  <br /><br />
PingPong:</p>
+
Ping-Pong:</p>
 
<center>
 
<center>
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/e/e5/T--Manchester--modelling_equation_8.png" alt="equation 8" />
 
   <img class="width60" src="https://static.igem.org/mediawiki/2016/e/e5/T--Manchester--modelling_equation_8.png" alt="equation 8" />
 
</center>
 
</center>
 
<br /><br />
 
<br /><br />
<p style="font-size:17px;">This reaction is saying H202 and hrp can combine oxidising Hrp and reducing H202, The resultant H20 molecule takes no further place in this reaction but now the abts does. In this next step the reaction is saying Abts and Hrp* react reducing hrp and oxidising abts, The result is oxidised abts and hrp being reformed as a catalyst.
+
<p style="font-size:17px;">This reaction is saying H<sub>2</sub>O<sub>2</sub> and HRP can combine oxidising HRP and reducing H<sub>2</sub>O<sub>2</sub>, The resultant H<sub>2</sub>O molecule takes no further place in this reaction but now the ABTS does. In this next step the reaction is saying ABTS and HRP* react reducing HRP and oxidising ABTS, The result is oxidised ABTS and HRP being regenerated as the catalyst for the first the stage again.
 
<br /><br />
 
<br /><br />
 
The mass action scheme is:</p>
 
The mass action scheme is:</p>
Line 272: Line 306:
 
</center>
 
</center>
 
<br /><br />
 
<br /><br />
<p style="font-size:17px;">There is another alternative for a ping pong scheme and that is hrp and abts combine first oxidising the abts and reducing the hrp. The H202 would come along later and reform the hrp catalyst. This wasn’t considered as you would expect to see a jump in abts oxidised at the start of your reaction and this wasn’t observed.
+
<p style="font-size:17px;">There is another alternative for a Ping-Pong scheme and that is HRP and ABTS combine first oxidising the ABTS and reducing the HRP. The H<sub>2</sub>O<sub>2</sub> would come along later and reform the HRP catalyst. This wasn’t considered as you would expect to see a jump in ABTS<sub>oxidised</sub> at the start of your reaction and this wasn’t observed.
  
 
</p>
 
</p>
<h1 class="title11">Practical considerations</h1>
+
<h1 style="margin-top: 60px;" class="title11">Practical considerations</h1>
<p id="heading4" class="title2" style="font-size:25px;">Solving odes code</p>
+
<p id="heading4" class="title2" style="font-size:25px;">Solving ODEs code</p>
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
 
<br /><br />
 
<br /><br />
As mentioned in the theory section matlab has its own solver, ode 45 was the one we used googling ode 45 will take you to MATLAB's documentation on it you can navigate to all the solvers it has. In these there is a concept called stiffness which you should understand to make an informed decision. However ode 45 will work for enzyme kinetics with sensible initial conditions so it's not discussed here.  
+
As mentioned in the theory section MATLAB has its own <a target="_blank" href="https://uk.mathworks.com/help/matlab/math/choose-an-ode-solver.html">solvers</a>.We used ode45.  
 
<br /><br />
 
<br /><br />
The c++ code uses the RK4 method. Its a nth order solver. All you have to do to use is enter your initial conditions into the first line of the code and in the diffall finction you must where there is a list starting with i==1 followed by an equation, have as many i==n statements as initial conditions with the equation written below corresponding to the nth initial conditions  differential equation.
+
The C++ code uses the 4th order Runge Kutta method. Its a n<sub>th</sub> order solver. Requiring n initial conditions for the n equations.
 
<br /><br />
 
<br /><br />
Note that all the above assumes your using first order differential equations only. However if you have a nth order differential equation it can be written as n first order equations. This mathematical step will need to be done first.  
+
Note that all the above assumes your using first order differential equations only. However if you have a n<sub>th</sub> order differential equation it can be written as a system of first order equations. This mathematical step will need to be done first.  
 
</p>
 
</p>
  
  
 
<p id="heading5" class="title2" style="font-size:25px;">Discussion of why we chose our 4 models</p>
 
<p id="heading5" class="title2" style="font-size:25px;">Discussion of why we chose our 4 models</p>
<p style="font-size:17px;">When modelling the cell free system of the alcopatch there are a bank of potential rate equations, each with a differing underlying mechanism, for each step of the two steps.</p>
+
<p style="font-size:17px;">When modelling the cell free system of the AlcoPatch there are a bank of potential rate equations, each with a differing underlying mechanism, for each of the two steps.</p>
 
<br /><br />
 
<br /><br />
  
Line 294: Line 328:
 
   <table>
 
   <table>
 
     <tr>
 
     <tr>
       <td>Step 1</td>
+
       <td>GOx reaction</td>
       <td>Step 2</td>
+
       <td>HRP reaction</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Irreversible Michalis Menten</td>
+
       <td>Irreversible Michaelis-Menten</td>
       <td>Irreversible Michalis Menten</td>
+
       <td>Irreversible Michaelis-Menten</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Reversible Michalis Menten</td>
+
       <td>Reversible Michaelis-Menten</td>
       <td>Reversible Michalis Menten</td>
+
       <td>Reversible Michaelis-Menten</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
       <td>Random Uni-Bi</td>
+
       <td>Random order Uni-Bi Michaelis-Menten</td>
       <td>Random Bi-Uni</td>
+
       <td>Random order Bi-Uni Michaelis-Menten</td>
 
     </tr>
 
     </tr>
 
   </table>
 
   </table>
Line 313: Line 347:
  
 
<br />
 
<br />
<p style="font-size:17px;">This many potential equations mean there are 9 different combinations of rate laws
+
<p style="font-size:17px;">This many potential equations mean there are 9 different combinations of rate laws.
More generally the this can be expressed as :
+
More generally the this can be expressed as:
  
$$n_{permutation}=\prod_{i=1}^{n_{steps}}n_{equations}$$
+
$$n_{permutation}=\prod_{i=1}^{n_{steps}}n_{equations,i}$$
  
 
<br /><br />
 
<br /><br />
This can very quickly add to to huge numbers, a 5 step reaction pathway with 5 potential equations per step has 3125 possible combinations. The first step when building the reaction pathway is to eliminate any infeasible reaction schemes, just removing one potential reaction per step reduces this number by 2101! A short amount of critical consideration to remove equations is much better spent than trying to brute force a larger number of equations.
+
This can very quickly lead to huge numbers, a 5 step reaction pathway with 5 potential equations per step has 3125 possible combinations. The first step when building the reaction pathway is to eliminate any infeasible reaction schemes. Just removing one potential reaction per step reduces this number by 2101. A short amount of critical consideration to remove equations is much better spent than trying to use brute force on a larger number of equations.
 
<br /><br />
 
<br /><br />
  We chose four as they encapsulate the two questions we are asking, does ethanal/Gdl make a difference? And does the concentration of ABTS have aneffect? These four are irreversible michaelis menten both steps, reversible michaelis menten both steps. Reversible michaelis menten followed by Random Bi-uni and Random uni-bi followed by Random Bi-uni. Ping pong was not used due to time constraints.
+
  We chose four as they encapsulate the two questions we are asking, does Ethanal/GDL make a difference? And does the concentration of ABTS have an effect? These four are irreversible Michaelis-Menten both steps, reversible Michaelis-Menten both steps. Reversible Michaelis-Menten followed by Random order Bi-Uni and Random order Uni-Bi followed by Random order Bi-Uni. Ping pong was not used further due to time constraints.
  
 
  </p>
 
  </p>
Line 328: Line 362:
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
Extending to ensemble modelling is beautifully simple, You simply loop through the process multiple times using different rate constants generated from your pdf’s and save all the resulting concentration vs time arrays.
+
Extending to ensemble modelling is simple. You simply loop through the process multiple times using different rate constants generated from your PDFs and save all the resulting concentration vs time arrays.
 
</p>
 
</p>
  
Line 336: Line 370:
  
  
<h1 style="margin-top:90px;" class="bigtitle">Constraints</h1>
+
<h1 style="margin-top:90px;" class="bigtitle">Thermodynamic Constraints</h1>
  
<p id="heading7" class="title2" style="font-size:25px;">Improve data motivation, What we used</p>
+
 
 +
 
 +
<p id="heading7" class="title2" style="font-size:25px;">Improving data</p>
 +
 
 +
<p style="font-size:17px;">
 +
In some situations there are constraints (representing physical limitations) that can be applied to the parameters to further improve your data set. These constraints come from thermodynamic laws, one well known example is the Haldane relationship which relates kinetic parameters to the equilibrium constant. </p>
 +
$$K_{eq} = \frac{V_f}{V_b} \frac{K_{m,b}}{K_{m,f}}$$
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
In some situations there are constraints (representing physical limitations) that can be applied to the parameters to further improve your data set. One such example is the haldane relationship which relates kinetic parameters to the equilibrium constant.
 
 
<br /><br />
 
<br /><br />
For our system we noticed the Kcat/Km ratio was reported so this was used.
+
For our system we also noticed the K<sub>cat</sub>/K<sub>m</sub> ratio was constant.
 
<br /><br />
 
<br /><br />
As such only parameters consistent with this ratio were used.
+
As such only parameters that were consistent with this ratio were used.
 
<br /><br />
 
<br /><br />
 
In doing this kind of step you not only save computer time but also can provide a tighter prediction on what you would expect to observe if the model is accurate.
 
In doing this kind of step you not only save computer time but also can provide a tighter prediction on what you would expect to observe if the model is accurate.
 
<br /><br />
 
<br /><br />
Below you will find a figure showing the difference to the simulation using a filtered data set and a unfiltered data set.  
+
Below you will find a figure showing the difference to the simulation using a data set consistent with our constraint (filtered) and a data set not filtered by a constraint.  
 
</p>
 
</p>
  
<center>
+
<left>
 
<img class="width50" src="https://static.igem.org/mediawiki/2016/b/b0/T--Manchester--modelling_graph_1.png" alt="graph 1" />
 
<img class="width50" src="https://static.igem.org/mediawiki/2016/b/b0/T--Manchester--modelling_graph_1.png" alt="graph 1" />
</center>
+
</left>
 
+
<right>
<center>
+
 
<img class="width50" src="https://static.igem.org/mediawiki/2016/1/14/T--Manchester--modelling_graph_2.png" alt="graph 1" />
 
<img class="width50" src="https://static.igem.org/mediawiki/2016/1/14/T--Manchester--modelling_graph_2.png" alt="graph 1" />
</center>
+
</right>
  
<p style="font-size: 17px;">The above figures illustrate the difference in simulation results when applying constraints to your parameters. Left is a concentration graph with no constraints applied, Right is a concentration graph with constraints applied. As you can see the constrained simulation produces less results that take much longer to reach steady state, this was consistent with experimental data.  
+
<p style="font-size: 17px;">The above figures illustrate the difference in simulation results when applying constraints to your parameters. One is a concentration graph with no constraints applied, the other is a concentration graph with constraints applied. As you can see the constrained simulation produces less results that take much longer to reach steady state, this was consistent with experimental data.  
 
</p>
 
</p>
  
  <br /><<br /><br />
+
</br></br>
  
<p id="heading8" class="title2" style="font-size:25px;">Illustration of concept</p>
 
<p style="font-size:17px;">
 
Below some imaginary constraints are given by the 2 blue curves. Any point which falls between the 2 curves would be accepted (in green) and any point which lies outside these bounds is rejected (in red). This is repeated until enough suitable points are generated.</p>
 
  
  
<center>
+
<p id="heading9" class="title2" style="font-size:25px;">How constraint code works</p>
<img class="width40" src="https://static.igem.org/mediawiki/2016/3/3f/T--Manchester--modelling_graph_3.png" alt="graph 3" />
+
</center>
+
 
+
<p id="heading9" class="title2" style="font-size:25px;">How code works and Git </p>
+
  
 
<p style="font-size:17px;">
 
<p style="font-size:17px;">
Line 380: Line 411:
  
 
<br /><br />
 
<br /><br />
The code works not exactly like you would expect from the theory explanation. Specifically the constraint is not applied to the original pdfs to create a new pdf consistent with the constraint, to do this you need to look into multivariate distributions. We actually took the much easier option of while running the simulation sampling from both Kcat and Km distributions (kcat/km is the constraint). Only keeping values that are within 0.5 standard deviations of the kcat/km value where standard deviation was calculated from the literature ratio.  
+
The code works not exactly like you would expect from the theory explanation. Specifically the constraint is not applied to the original PDFs to create a new PDF consistent with the constraint, to do this you need to look into multivariate distributions. We actually took the much easier option of while running the simulation sampling from both K<sub>cat</sub> and K<sub>m</sub> distributions (K<sub>cat</sub>/K<sub>m</sub> is the constraint.) Only keeping values that are within 0.5 standard deviations of the K<sub>cat</sub>/K<sub>m</sub> value where standard deviation was calculated from the literature ratio. The K<sub>cat</sub>/K<sub>m</sub> was drawn from literature data.
 
<br /><br />
 
<br /><br />
 
The downside of our simpler method is that we waste computer time. As we only had one constraint this wasn’t much of a problem, however if you have many constraints you will have to look into multivariate techniques, or overcome the slowness with high performance computing (supercomputers).   
 
The downside of our simpler method is that we waste computer time. As we only had one constraint this wasn’t much of a problem, however if you have many constraints you will have to look into multivariate techniques, or overcome the slowness with high performance computing (supercomputers).   
 
</p>
 
</p>
  
 +
<p id="heading8" class="title2" style="font-size:25px;">Illustration of concept</p>
 +
<p style="font-size:17px;">
 +
Below some imaginary constraints are given by the 2 blue curves. Any point which falls between the 2 curves would be accepted (in green) and any point which lies outside these bounds is rejected (in red). This is repeated until enough suitable points are generated. So to run the required number of simulations.</p>
 +
 +
 +
<center>
 +
<img class="width40" src="https://static.igem.org/mediawiki/2016/3/3f/T--Manchester--modelling_graph_3.png" alt="graph 3" />
 +
</center>
  
<span class="box1"></span>
+
<span class="box"></span>
  
 
</div>
 
</div>
 
</html>
 
</html>
 
{{Manchester/CSS/footer}}
 
{{Manchester/CSS/footer}}

Latest revision as of 03:04, 20 October 2016

Manchester iGEM 2016

System Simulation

ODE

ODEs applicability to enzyme kinetics

Ordinary Differential Equations (ODEs) are at the heart of modeling enzyme kinetics. They are equations describing the rate of change of a variable e.g. product concentration. To illustrate their applicability consider the following reaction scheme:

equation 1

Consider the rate of change of the enzyme complex (AEA). There are 3 possibilities:

$$A+E_A \rightarrow AE_A $$ $$AE_A \rightarrow A + E_A$$ $$AE_A \rightarrow H + E_A$$

It can break down into H and EA or it could break down into A and EA or it could be formed by A and EA. The first two possibilities will happen proportional to the amount of AEA. the latter possibility is proportional to the product of the concentrations as it’s proportional to the number of collisions.

Given that the rate of change of AEA is the amount made minus the amount consumed. Therefore you get the following equation, where k's represent the probability of each process. $$\dot{AE_A} = k_1[A][E_A]-(k_2+k_3)[AE_A]$$

Equations at equilibrium

The equations described above are called mass action equations and their rate constants are not widely documented. What are actually documented are constants that describe a reaction scheme under the assumption that all enzyme complexes are at steady state (the rate of change is zero). In doing this you are able to remove enzyme and enzyme complex concentrations entirely from your equations. This is ideal as these concentrations are hard to measure in the lab.

In most cases these equations have been derived and documented, especially when you note the equations are modular (you can chop the reaction scheme up into a series of smaller reaction schemes). If you have an abnormal reaction pathway you may need to derive it for yourself.

Generating concentration time graphs

The experimental data available to us was concentration time graphs, ODEs are perfect for creating these. We mainly used a MATLAB solver which uses a predictor-corrector method. We also have a nth order ODE solver written in C++ and that uses RK4.

It will now be explained how knowing the rate of change of your concentrations can lead to concentration over time in practice via such methods. The Forward Euler method will be used to illustrate.

You must know your starting concentrations, these are your “initial conditions” and represent your starting concentration of reagents (mM). The differential equation is used to find the rate of change at this point. You take a small step in time along this gradient. Then you recalculate the gradient at the new point before taking another small step and so on. See below figure for a visual representation.

graph 9

Figure representing the euler method the dots represent recalculation points



A question we tried to answer is what reaction scheme is our cell free mechanism actually following. What follows are the possibilities we investigated for the reaction scheme. How to then predict which models are closest to the truth is explained in the network mechanism analysis.

Before we proceed it’s important to know that our schemes are broken up in two steps. Step 1 alcohol/glucose as a substrate with H2O2 as a product

step 2 H2O2 as a substrate with ABTSoxidised as a product.

The final selection is shown in the chart below where pairing from each column is suitable e.g. Reversible Michaelis-Menten and Bi-uni. The reason for these distinctions apart from saying "Irreversible Michaelis-Menten is too far removed from reality" is that they make no sense as the other step this will soon become clear.

Type of reaction GOx reaction HRP reaction
Irreversible Michaelis-Menten n n
Reversible Michaelis-Menten y n
Bi-Uni Michaelis-Menten n y
Uni-Bi Michaelis-Menten y n
Ping-Pong n y

For all the equations and variable definitions follow this link, Note:

$$\text{T} = \frac{\prod_{i=1}^nP_i}{\prod_{j=1}^kS_j}$$ $$\nu = \frac{dP}{dt}=\text{rate of change of product}$$

Irreversible Michaelis-Menten. This model has very poor physical relevance to our experiment so it's not discussed here. While useful for initial testing the irreversible nature easily hides properties of the system and this is highly undesirable.

Reversible Michaelis-Menten:

equation 2


This reaction scheme is saying alcohol and AOx can combine to make H2O2 and that this reaction can happen reversibly and so some sort of equilibrium will occur.

The mass action scheme is:

equation 3


As you can see the two schemes are very similar.

We know that Ethanal is actually the second product in this reaction. Our question is, does it make a difference to the kinetics? This question can be assessed with the use of ensemble outputs and comparison to results using the Uni-Bi Michaelis-Menten rate law.

Uni-Bi Michaelis-Menten:

equation 4


This reaction is saying that alcohol and AOx can combine to make H2O2 and Ethanal and that this can occur reversibly The mass action scheme is:

equation 5


This mechanism does include Ethanal. The order the substrates dissociate does matter, as you can imagine if Ethanal does break off first you will end up with a large amount of Ethanal forcing the back reaction, this would be alleviated if H2O2 could break off first as then H2O2 would be more available for the next use. In literature there are two equations for this, however the ordered case is the random order case in the limit some of its rates go to zero. We assumed that if this were the case the sampling of our system would account for this, sampling many tiny parameters, rather than us making that judgement ourselves.

Bi-Uni Michaelis-Menten:

equation 6


This reaction is saying H2O2 and ABTS and HRP can combine to make ABTSoxidised with HRP acting as a catalyst.

The mass action scheme is:

equation 7


This mechanism takes into account that there are two substrates, the same implementation was used as in Uni-Bi Michaelis-Menten. Physically it is saying there is some mechanism by which HRP acts directly as a catalyst in one step.
Ping pong proposes something different.

Ping-Pong:

equation 8


This reaction is saying H2O2 and HRP can combine oxidising HRP and reducing H2O2, The resultant H2O molecule takes no further place in this reaction but now the ABTS does. In this next step the reaction is saying ABTS and HRP* react reducing HRP and oxidising ABTS, The result is oxidised ABTS and HRP being regenerated as the catalyst for the first the stage again.

The mass action scheme is:

equation 9


There is another alternative for a Ping-Pong scheme and that is HRP and ABTS combine first oxidising the ABTS and reducing the HRP. The H2O2 would come along later and reform the HRP catalyst. This wasn’t considered as you would expect to see a jump in ABTSoxidised at the start of your reaction and this wasn’t observed.

Practical considerations

Solving ODEs code



As mentioned in the theory section MATLAB has its own solvers.We used ode45.

The C++ code uses the 4th order Runge Kutta method. Its a nth order solver. Requiring n initial conditions for the n equations.

Note that all the above assumes your using first order differential equations only. However if you have a nth order differential equation it can be written as a system of first order equations. This mathematical step will need to be done first.

Discussion of why we chose our 4 models

When modelling the cell free system of the AlcoPatch there are a bank of potential rate equations, each with a differing underlying mechanism, for each of the two steps.



GOx reaction HRP reaction
Irreversible Michaelis-Menten Irreversible Michaelis-Menten
Reversible Michaelis-Menten Reversible Michaelis-Menten
Random order Uni-Bi Michaelis-Menten Random order Bi-Uni Michaelis-Menten

This many potential equations mean there are 9 different combinations of rate laws. More generally the this can be expressed as: $$n_{permutation}=\prod_{i=1}^{n_{steps}}n_{equations,i}$$

This can very quickly lead to huge numbers, a 5 step reaction pathway with 5 potential equations per step has 3125 possible combinations. The first step when building the reaction pathway is to eliminate any infeasible reaction schemes. Just removing one potential reaction per step reduces this number by 2101. A short amount of critical consideration to remove equations is much better spent than trying to use brute force on a larger number of equations.

We chose four as they encapsulate the two questions we are asking, does Ethanal/GDL make a difference? And does the concentration of ABTS have an effect? These four are irreversible Michaelis-Menten both steps, reversible Michaelis-Menten both steps. Reversible Michaelis-Menten followed by Random order Bi-Uni and Random order Uni-Bi followed by Random order Bi-Uni. Ping pong was not used further due to time constraints.

Extension to ensemble modelling

Extending to ensemble modelling is simple. You simply loop through the process multiple times using different rate constants generated from your PDFs and save all the resulting concentration vs time arrays.

Thermodynamic Constraints

Improving data

In some situations there are constraints (representing physical limitations) that can be applied to the parameters to further improve your data set. These constraints come from thermodynamic laws, one well known example is the Haldane relationship which relates kinetic parameters to the equilibrium constant.

$$K_{eq} = \frac{V_f}{V_b} \frac{K_{m,b}}{K_{m,f}}$$



For our system we also noticed the Kcat/Km ratio was constant.

As such only parameters that were consistent with this ratio were used.

In doing this kind of step you not only save computer time but also can provide a tighter prediction on what you would expect to observe if the model is accurate.

Below you will find a figure showing the difference to the simulation using a data set consistent with our constraint (filtered) and a data set not filtered by a constraint.

graph 1 graph 1

The above figures illustrate the difference in simulation results when applying constraints to your parameters. One is a concentration graph with no constraints applied, the other is a concentration graph with constraints applied. As you can see the constrained simulation produces less results that take much longer to reach steady state, this was consistent with experimental data.



How constraint code works

Link to github homepage

The code works not exactly like you would expect from the theory explanation. Specifically the constraint is not applied to the original PDFs to create a new PDF consistent with the constraint, to do this you need to look into multivariate distributions. We actually took the much easier option of while running the simulation sampling from both Kcat and Km distributions (Kcat/Km is the constraint.) Only keeping values that are within 0.5 standard deviations of the Kcat/Km value where standard deviation was calculated from the literature ratio. The Kcat/Km was drawn from literature data.

The downside of our simpler method is that we waste computer time. As we only had one constraint this wasn’t much of a problem, however if you have many constraints you will have to look into multivariate techniques, or overcome the slowness with high performance computing (supercomputers).

Illustration of concept

Below some imaginary constraints are given by the 2 blue curves. Any point which falls between the 2 curves would be accepted (in green) and any point which lies outside these bounds is rejected (in red). This is repeated until enough suitable points are generated. So to run the required number of simulations.

graph 3