Difference between revisions of "Team:USTC-Software/Model"

(delete judging div)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{USTC-Software}}
+
{{USTC-Software/html/header}}
 +
 
 
<html>
 
<html>
 +
<link href="https://2019.igem.org/Template:USTC-Software/css/default?action=raw&ctype=text/css" rel="stylesheet"
 +
      type="text/css"/>
 +
<link href="https://2019.igem.org/Template:USTC-Software/css/bootstrap?action=raw&ctype=text/css" rel="stylesheet"
 +
      type="text/css"/>
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/jquery?action=raw&ctype=text/javascript"
 +
        type="text/javascript"></script>
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/popper?action=raw&ctype=text/javascript"
 +
        type="text/javascript"></script>
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/bootstrap?action=raw&ctype=text/javascript"
 +
        type="text/javascript"></script>
 +
<script src="https://2019.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  
 +
<div class="autoMenu2" id="autoMenu2"></div>
 +
<div class="container">
 +
  <div class="row">
 +
    <!-- <div class="col-lg-2 col-md-0">
 +
      <div class="autoMenu d-none d-lg-block" data-autoMenu id="autoMenu"></div>
 +
    </div> -->
 +
    <div class="col-lg-12 col-md-12">
 +
      <div class="card page-content">
 +
        <div class="card-body">
 +
          <h1 class="text-center">Model</h1>
 +
          <h3>Biological Models</h3>
 +
          <h4>Flux Balance Analysis</h4>
 +
          <div class="passage">Flux Balance Analysis (FBA) is a mathematical method for simulating metabolism in
 +
            metabolic networks. It is based on linear programming to calculate fluxes when the model is stable.
 +
            <br><br>
 +
            Assuming S is a matrix, which contains all reactions in a model. In this matrix, metabolites consumed take
 +
            negative coefficients, and metabolites produced then take positive ones. Furthermore, v is a vector that
 +
            represents the flux of all reactions. When the system is steady, it satisfies:
 +
            $$
 +
            \textbf{S}\textbf{v}=0
 +
            $$
 +
            And then, FBA tries to maximize or minimize the objective function \(\textbf{c}^\textrm{T} \textbf{v}\), which
 +
            c contains the weight of all reactions contributing to the function. Now it is clear that FBA is a linear
 +
            programming problem, and it just works.
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/e/e4/T--USTC-Software--model_fba_banlanced.png" alt="">
 +
              <p>The conceptual basis of constraint- based modeling. With no constraints, the fIux
 +
                distribution of a biological network may lie at any point in a solution space. When mass balance
 +
                constraints imposed by the stoichiometric matrix S (labeled 1) and capacity constraints imposed
 +
                by the lower and upper bounds (a;and b;) (labeled 2) are applied to a network, it defines an
 +
                allowable solution space. The network may acquire any flux distribution within this space, but
 +
                points outside this space are denied by the constraints. Through optimization of an objective
 +
                function, FBA can identify a single optimal fIux distribution that lies on the edge of the
 +
                allowable solution space.</p>
 +
            </div>
 +
          </div>
 +
          <h4>Flux Variability Analysis</h4>
 +
          <div class="passage">
 +
            Flux Variability Analysis (FVA) is an extension of FBA. It can show the minimum and maximum range of each
 +
            reaction flux while they satisfy constraints and have the same optimal objective by solving a double linear
 +
            programming problem.
 +
            <br><br>
 +
            However, when the metabolic network contains internal loops, the result can be too high in absolute to be
 +
            realistic. Users can select the "loopless" option to avoid such internal loops, and get a more consistent
 +
            result.
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/f/f3/T--USTC-Software--model_analysis.png" alt="" style="max-height: 800px">
 +
              <p>Whole process of analysis</p>
 +
            </div>
 +
          </div>
 +
          <h4>Regulatory Flux Balance Analysis</h4>
 +
          <div class="passage">
 +
            Regulatory Flux Balance Analysis is a brilliant combination of FBA and transcriptional regulation. It integrates regulatory network and adds constraints based on the FBA. Therefore the solution space can be compressed, and our results can be more credible and authentic.
 +
            <br><br>
 +
            The combined metabolic/regulatory model can predict the ability of mutant E.coli strains to grow on defined media as well as time courses of cell growth, substrate uptake, metabolic by-product secretion, and qualitative gene expression in various conditions.
 +
            <br><br>
 +
            By applying this method in our software, we can make it more precisely.
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/5/54/T--USTC-Software--model_rFBA.png" alt="" style="max-height: 800px">
 +
              <p>rFBA</p>
 +
            </div>
 +
          </div>
 +
          <h3>Computer Models</h3>
 +
          <h4>Object-Relational Mapping</h4>
 +
          <div class="passage">
 +
            Object-Relational Mapping (ORM) enables us to work with databases more comfortable and safer. It fills the
 +
            gap between object-oriented programming languages and relational databases and avoids the vulnerability of
 +
            SQL Injection.
 +
            <br>
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/c/cb/T--USTC-Software--model_mapping.png" alt="">
 +
              <p>Object-Relational Mapping</p>
 +
            </div>
 +
            We use ORM to organize our metabolic networks, biobricks data, and user's computational models. It brings us
 +
            the convenience of creating, querying, listing, and connecting models, with acceptable performance.
 +
            <br>
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/f/f0/T--USTC-Software--model_DB.png" alt="" style="width: 600px">
 +
              <p>Relationship between two types of database</p>
 +
            </div>
 +
            In practice, we use Django ORM with MySQL backend to provide fast, flexible, and reliable service.
 +
            <br>
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/1/19/T--USTC-Software--model_django.png" alt="" style="width: 600px">
 +
              <p>Django ORM</p>
 +
            </div>
 +
          </div>
 +
          <h4>Message Queues</h4>
 +
          <div class="passage">
 +
            Our website requires computing large models, and it is quite embarrassing to see users waiting for browsers
 +
            for so long. So we use message queues to maintain computing tasks.
 +
            <br><br>
 +
            We split our programs computing models from our website, and use message queues to send and receive
 +
            information about our computation. A queue is a data structure that stores things waiting to be handled, and
 +
            it obeys the "First Come, First Serve" principle. So, we can store our computing tasks in the queue, and
 +
            response to users instantly about the progress of his tasks.
 +
            <br>
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/3/3f/T--USTC-Software--model_msg.png" alt="" style="max-height: 480px; object-fit: cover;">
 +
              <p>Message Queues</p>
 +
            </div>
 +
            In Foresyn, we use RabbitMQ and Celery to build our message queues. Here, Celery uses its protocol to
 +
            communicate with web programs and computation programs. And RabbitMQ acts as a broker who accepts and
 +
            forwards messages of Celery.
 +
            <br>
 +
            <div class="psgImg">
 +
              <img src="https://static.igem.org/mediawiki/2019/f/f3/T--USTC-Software--model_rabit.png" alt="">
 +
              <p>RabbitMQ</p>
 +
            </div>
 +
          </div>
 +
          <h4>Different Searching Engines</h4>
 +
          <div class="passage">
 +
            When we are developing Foresyn, we discovered that there is a contradiction between speed and accuracy. So
 +
            our strategy is to use slow but accurate algorithm when searching small datasets, and use fast but less
 +
            accurate algorithm when searching large ones.
 +
            <br><br>
 +
            Here, there are only some models like E. coli, but a lot of genes, reactions and metabolites in our
 +
            database. We choose to calculate Levenshtein distances for model searching. Levenshtein distance defines as
 +
            the following recursive function:
 +
            $$
 +
            \qquad\operatorname{lev}_{a,b}(i,j) = \begin{cases}
 +
            \max(i,j) & \text{if } \min(i,j)=0, \\
 +
            \min (\operatorname{lev}_{a,b}(i-1,j) + 1,\operatorname{lev}_{a,b}(i,j-1) + 1,
 +
            \operatorname{lev}_{a,b}(i-1,j-1) + 1) & a_i \neq b_i, \\
 +
            \min (\operatorname{lev}_{a,b}(i-1,j) + 1,\operatorname{lev}_{a,b}(i,j-1) + 1,
 +
            \operatorname{lev}_{a,b}(i-1,j-1)) & \text{otherwise.} \\
 +
            \end{cases}
 +
            $$
 +
            which has a time complexity of \(O(nm)\) where n and m are the length of the two strings.
 +
            <br><br>
 +
            When we are handling genes, reactions and metabolites, we use another algorithm.
 +
          </div>
 +
          <h4>Biobricks Recommendation</h4>
 +
          <div class="passage">
 +
            It is troublesome for Synthesis biologists to decide which kind of biobricks should be used in their
 +
              computing models. To deal with the issue, we designed a biobricks recommending system based on key-words
 +
              extraction and behavior analysis. With our special designed algorithm, our system can give a precise
 +
              prediction of biobricks that users demand.
 +
              <br>
 +
              <div class="psgImg">
 +
                <img alt="" src="https://static.igem.org/mediawiki/2019/1/1b/T--USTC-Software--model_biobricks.png">
 +
                <p>Recommendation</p>
 +
              </div>
 +
          </div>
 +
          <h2 class="ref">References</h2>
 +
          <div class="ref-list">
 +
            <ul>
 +
              <li>1. Orth JD, Thiele I, Palsson BØ. What is flux balance analysis?. *Nat Biotechnol*.
 +
                2010;28(3):245–248. doi:10.1038/nbt.1614
 +
              </li>
 +
              <li>2. Gudmundsson S, Thiele I. Computationally efficient flux variability analysis. *BMC Bioinformatics*.
 +
                2010;11:489. Published 2010 Sep 29. doi:10.1186/1471-2105-11-489
 +
              </li>
 +
              <li>3. Arne C. Müller, Alexander Bockmayr, Fast thermodynamically constrained flux variability analysis,
 +
                *Bioinformatics*, Volume 29, Issue 7, 1 April 2013, Pages 903–909,
 +
                https://doi.org/10.1093/bioinformatics/btt059
 +
              </li>
 +
              <li>4. Abdelmoneim Amer Desouki, Florian Jarre, Gabriel Gelius-Dietrich, Martin J. Lercher, CycleFreeFlux:
 +
                efficient removal of thermodynamically infeasible loops from flux distributions, Bioinformatics,
 +
                Volume 31, Issue 13, 1 July 2015, Pages 2159–2165, https://doi.org/10.1093/bioinformatics/btv096
 +
              </li>
 +
              <li>5. Ambler, Scott W. "Mapping objects to relational databases." On the World Wide Web: http://www.
 +
                AmbySoft. com (2000).
 +
              </li>
 +
              <li>6. Vinoski, Steve. "Advanced message queuing protocol." IEEE Internet Computing 6 (2006): 87-89.</li>
 +
              <li>7. https://medium.com/@jairvercosa/manger-vs-query-sets-in-django-e9af7ed744e0</li>
 +
              <li>8. https://www.nature.com/articles/nbt.1614</li>
 +
              <li>9. https://www.cloudamqp.com/blog/2014-12-03-what-is-message-queuing.html</li>
 +
              <li>10. https://www.rabbitmq.com/</li>
 +
            </ul>
 +
          </div>
 +
        </div>
 +
      </div>
 +
    </div>
 +
  </div>
 +
</div>
  
 +
<!--autoMenu css and js files, generate Menu of each article-->
 +
<!--<link href="https://2019.igem.org/Template:USTC-Software/css/autoMenu?action=raw&ctype=text/css" rel="stylesheet">-->
 +
<!--<script src="https://2019.igem.org/Template:USTC-Software/js/autoMenu?action=raw&ctype=text/javascript"></script>-->
  
 +
<!--autoMenu css and js files, generate Menu of each article-->
 +
<link href="https://2019.igem.org/Template:USTC-Software/css/autoMenu2?action=raw&ctype=text/css" rel="stylesheet">
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/autoMenu2?action=raw&ctype=text/javascript"></script>
  
 +
<!--scrollBar js. when scroll down, a cat will be there-->
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/addScrollBar?action=raw&ctype=text/javascript"></script>
  
<div class="clear"></div>
+
<!-- make content Menu fixed-->
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/makeIndexFixed?action=raw&ctype=text/javascript"></script>
  
 +
<!--add background-->
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/addBackground?action=raw&ctype=text/javascript"></script>
  
<div class="column full_size">
+
<link href="https://2019.igem.org/Template:USTC-Software/css/pageContent?action=raw&ctype=text/css" rel="stylesheet">
<h1> Modeling</h1>
+
  
<p>Mathematical models and computer simulations provide a great way to describe the function and operation of BioBrick Parts and Devices. Synthetic Biology is an engineering discipline, and part of engineering is simulation and modeling to determine the behavior of your design before you build it. Designing and simulating can be iterated many times in a computer before moving to the lab. This award is for teams who build a model of their system and use it to inform system design or simulate expected behavior in conjunction with experiments in the wetlab.</p>
+
<!--add figure <index>-->
 +
<script src="https://2019.igem.org/Template:USTC-Software/js/insertNumForPics?action=raw&ctype=text/javascript"></script>
  
</div>
+
<!-- some updated css style -->
<div class="clear"></div>
+
<!--<style>-->
 +
<!--div.card p {margin: 20px;}-->
 +
<!--div.card h2,h3,h4 {margin: 25px;}-->
 +
<!--div.card h1 {margin-top: 30px;}-->
 +
<!--div.card img {margin-left: 30px; margin-right:30px;}-->
 +
<!--</style>-->
  
<div class="column full_size">
 
<h3> Gold Medal Criterion #3</h3>
 
<p>
 
Convince the judges that your project's design and/or implementation is based on insight you have gained from modeling. This could be either a new model you develop or the implementation of a model from a previous team. You must thoroughly document your model's contribution to your project on your team's wiki, including assumptions, relevant data, model results, and a clear explanation of your model that anyone can understand.
 
<br><br>
 
The model should impact your project design in a meaningful way. Modeling may include, but is not limited to, deterministic, exploratory, molecular dynamic, and stochastic models. Teams may also explore the physical modeling of a single component within a system or utilize mathematical modeling for predicting function of a more complex device.
 
</p>
 
  
</div>
+
</html>
  
<div class="column two_thirds_size">
+
{{USTC-Software/html/footer}}
<h3>Best Model Special Prize</h3>
+
 
+
<p>
+
To compete for the <a href="https://2019.igem.org/Judging/Awards">Best Model prize</a>, please describe your work on this page  and also fill out the description on the <a href="https://2019.igem.org/Judging/Judging_Form">judging form</a>. Please note you can compete for both the Gold Medal criterion #3 and the Best Model prize with this page.
+
<br><br>
+
You must also delete the message box on the top of this page to be eligible for the Best Model Prize.
+
</p>
+
 
+
</div>
+
 
+
 
+
<div class="column third_size">
+
<div class="highlight decoration_A_full">
+
<h3> Inspiration </h3>
+
<p>
+
Here are a few examples from previous teams:
+
</p>
+
<ul>
+
<li><a href="https://2018.igem.org/Team:GreatBay_China/Model">2018 GreatBay China</a></li>
+
<li><a href="https://2018.igem.org/Team:Leiden/Model">2018 Leiden</a></li>
+
<li><a href="https://2016.igem.org/Team:Manchester/Model">2016 Manchester</a></li>
+
<li><a href="https://2016.igem.org/Team:TU_Delft/Model">2016 TU Delft</li>
+
<li><a href="https://2014.igem.org/Team:ETH_Zurich/modeling/overview">2014 ETH Zurich</a></li>
+
<li><a href="https://2014.igem.org/Team:Waterloo/Math_Book">2014 Waterloo</a></li>
+
</ul>
+
</div>
+
</div>
+
 
+
</html>
+

Latest revision as of 03:04, 22 October 2019

Model

Biological Models

Flux Balance Analysis

Flux Balance Analysis (FBA) is a mathematical method for simulating metabolism in metabolic networks. It is based on linear programming to calculate fluxes when the model is stable.

Assuming S is a matrix, which contains all reactions in a model. In this matrix, metabolites consumed take negative coefficients, and metabolites produced then take positive ones. Furthermore, v is a vector that represents the flux of all reactions. When the system is steady, it satisfies: $$ \textbf{S}\textbf{v}=0 $$ And then, FBA tries to maximize or minimize the objective function \(\textbf{c}^\textrm{T} \textbf{v}\), which c contains the weight of all reactions contributing to the function. Now it is clear that FBA is a linear programming problem, and it just works.

The conceptual basis of constraint- based modeling. With no constraints, the fIux distribution of a biological network may lie at any point in a solution space. When mass balance constraints imposed by the stoichiometric matrix S (labeled 1) and capacity constraints imposed by the lower and upper bounds (a;and b;) (labeled 2) are applied to a network, it defines an allowable solution space. The network may acquire any flux distribution within this space, but points outside this space are denied by the constraints. Through optimization of an objective function, FBA can identify a single optimal fIux distribution that lies on the edge of the allowable solution space.

Flux Variability Analysis

Flux Variability Analysis (FVA) is an extension of FBA. It can show the minimum and maximum range of each reaction flux while they satisfy constraints and have the same optimal objective by solving a double linear programming problem.

However, when the metabolic network contains internal loops, the result can be too high in absolute to be realistic. Users can select the "loopless" option to avoid such internal loops, and get a more consistent result.

Whole process of analysis

Regulatory Flux Balance Analysis

Regulatory Flux Balance Analysis is a brilliant combination of FBA and transcriptional regulation. It integrates regulatory network and adds constraints based on the FBA. Therefore the solution space can be compressed, and our results can be more credible and authentic.

The combined metabolic/regulatory model can predict the ability of mutant E.coli strains to grow on defined media as well as time courses of cell growth, substrate uptake, metabolic by-product secretion, and qualitative gene expression in various conditions.

By applying this method in our software, we can make it more precisely.

rFBA

Computer Models

Object-Relational Mapping

Object-Relational Mapping (ORM) enables us to work with databases more comfortable and safer. It fills the gap between object-oriented programming languages and relational databases and avoids the vulnerability of SQL Injection.

Object-Relational Mapping

We use ORM to organize our metabolic networks, biobricks data, and user's computational models. It brings us the convenience of creating, querying, listing, and connecting models, with acceptable performance.

Relationship between two types of database

In practice, we use Django ORM with MySQL backend to provide fast, flexible, and reliable service.

Django ORM

Message Queues

Our website requires computing large models, and it is quite embarrassing to see users waiting for browsers for so long. So we use message queues to maintain computing tasks.

We split our programs computing models from our website, and use message queues to send and receive information about our computation. A queue is a data structure that stores things waiting to be handled, and it obeys the "First Come, First Serve" principle. So, we can store our computing tasks in the queue, and response to users instantly about the progress of his tasks.

Message Queues

In Foresyn, we use RabbitMQ and Celery to build our message queues. Here, Celery uses its protocol to communicate with web programs and computation programs. And RabbitMQ acts as a broker who accepts and forwards messages of Celery.

RabbitMQ

Different Searching Engines

When we are developing Foresyn, we discovered that there is a contradiction between speed and accuracy. So our strategy is to use slow but accurate algorithm when searching small datasets, and use fast but less accurate algorithm when searching large ones.

Here, there are only some models like E. coli, but a lot of genes, reactions and metabolites in our database. We choose to calculate Levenshtein distances for model searching. Levenshtein distance defines as the following recursive function: $$ \qquad\operatorname{lev}_{a,b}(i,j) = \begin{cases} \max(i,j) & \text{if } \min(i,j)=0, \\ \min (\operatorname{lev}_{a,b}(i-1,j) + 1,\operatorname{lev}_{a,b}(i,j-1) + 1, \operatorname{lev}_{a,b}(i-1,j-1) + 1) & a_i \neq b_i, \\ \min (\operatorname{lev}_{a,b}(i-1,j) + 1,\operatorname{lev}_{a,b}(i,j-1) + 1, \operatorname{lev}_{a,b}(i-1,j-1)) & \text{otherwise.} \\ \end{cases} $$ which has a time complexity of \(O(nm)\) where n and m are the length of the two strings.

When we are handling genes, reactions and metabolites, we use another algorithm.

Biobricks Recommendation

It is troublesome for Synthesis biologists to decide which kind of biobricks should be used in their computing models. To deal with the issue, we designed a biobricks recommending system based on key-words extraction and behavior analysis. With our special designed algorithm, our system can give a precise prediction of biobricks that users demand.

Recommendation

References

  • 1. Orth JD, Thiele I, Palsson BØ. What is flux balance analysis?. *Nat Biotechnol*. 2010;28(3):245–248. doi:10.1038/nbt.1614
  • 2. Gudmundsson S, Thiele I. Computationally efficient flux variability analysis. *BMC Bioinformatics*. 2010;11:489. Published 2010 Sep 29. doi:10.1186/1471-2105-11-489
  • 3. Arne C. Müller, Alexander Bockmayr, Fast thermodynamically constrained flux variability analysis, *Bioinformatics*, Volume 29, Issue 7, 1 April 2013, Pages 903–909, https://doi.org/10.1093/bioinformatics/btt059
  • 4. Abdelmoneim Amer Desouki, Florian Jarre, Gabriel Gelius-Dietrich, Martin J. Lercher, CycleFreeFlux: efficient removal of thermodynamically infeasible loops from flux distributions, Bioinformatics, Volume 31, Issue 13, 1 July 2015, Pages 2159–2165, https://doi.org/10.1093/bioinformatics/btv096
  • 5. Ambler, Scott W. "Mapping objects to relational databases." On the World Wide Web: http://www. AmbySoft. com (2000).
  • 6. Vinoski, Steve. "Advanced message queuing protocol." IEEE Internet Computing 6 (2006): 87-89.
  • 7. https://medium.com/@jairvercosa/manger-vs-query-sets-in-django-e9af7ed744e0
  • 8. https://www.nature.com/articles/nbt.1614
  • 9. https://www.cloudamqp.com/blog/2014-12-03-what-is-message-queuing.html
  • 10. https://www.rabbitmq.com/