Difference between revisions of "Team:Heidelberg/InteractiveTools"

(Blanked the page)
 
Line 1: Line 1:
{{Heidelberg/header|Modeling}}
 
{{Heidelberg/navbar
 
    }}
 
{{Heidelberg/templateus/Mainbody|
 
    Modeling.|
 
    Interactive tools|
 
    https://static.igem.org/mediawiki/2017/a/ae/T--Heidelberg--2017_Background_Tiger.jpg|
 
    {{Heidelberg/templateus/Contentsection|
 
        {{#tag:html|
 
            <h2>Number of mutations and mutated sequences</h2>
 
            Expected number of mutations in a single sequence:
 
                $$p_{m} = \frac{N_{mutations} }{L_{Sequence} } = N_{generations} \cdot r_{mutation} = t_{total} \cdot \Phi \cdot r_{mutation}$$
 
           
 
            The expected share of sequences that shows at least one mutation in \(L_{Sequence}\) bp is the probability that \(L_{sequence}\) basepairs stay unchanged when \(\frac{N_{mutations} }{L_{Sequence} }\) mutations are expected:
 
            $$p_{M} = \frac{N_{mutated} }{N_{Sequences} } = 1 - p(N_{mutations}=0) = 1 - (1-p_{m})^{L_{Sequence} } $$
 
           
 
            With this equation we can also calculate the number of sequences \(N_{Sequences}\) that have to be sequenced in order to find a mutated one with a probability of \(p(N_{mutated} > 0)\).
 
            $$ N_{Sequences} = \frac{p(N_{mutated} > 0)}{p_{M} } $$
 
           
 
            The probability to find at least one mutated sequence under the given conditions is
 
            $$p(N_{mutated}>0) = 1 - (1-p_{M})^{N_{sequences} }$$
 
            which gives
 
            $$N_{Sequences} = \frac{ln(1-p(N_{mutated}>0))}{ln(1-p_{M})}$$
 
           
 
            Set \(\Phi\) to zero to use the number of generations for the calculation. If \(\Phi\) and the number of generations are given, \(\Phi\) is used.
 
            Consider \(L_{Sequence}\) as the number of basepairs that is expected to be mutated. If half of the sequence you are interested in, is highly conserved choose a lower \(L_{Sequence}\).
 
  
            {{Heidelberg/form|Get your mutations|#005493|number_mutations();|
 
                {{Heidelberg/formrow|
 
                    {{Heidelberg/forminput|Mutation rate \(r_{mutation} \:[bp/generation]\)|number|mr|5e-5}}
 
                    {{Heidelberg/forminput|Flow rate Lagoon \(\Phi_{lagoon} \: [Volumes/h]\)|number|phi|1}}
 
                    {{Heidelberg/forminput|Total time in lagoon \(t_{total} \: [h]\)|number|tt|10}}
 
                    {{Heidelberg/forminput|Number of generations  \(N_{generations}\)|number|ng|10}}
 
                }}
 
                {{Heidelberg/formrow|
 
                    {{Heidelberg/forminput|Length of sequence that can mutate \(L_{Sequence} \: [bp]\)|number|ls|350}}
 
                    {{Heidelberg/forminput|Number of sequences that are sequenced \(N_{Sequences}\)|number|ns|5}}
 
                    {{Heidelberg/forminput|Probability to get at least one mutated result  \(p(N_{mutated}>0) \)|number|pm|0.9}}
 
                }}
 
            }}
 
 
 
           
 
            <div class="container-fluid" style="margin-top: 10px;" id="container2">
 
                <span id="warnings_mutations"></span>
 
                <span id="number_generations"></span>
 
                <span>\(p_{m} =\) <span id="amount_mutations"></span> % (bp/bp).</span>
 
                <span>\(N_{mutations} =\) <span id="number_mutations"></span> bp per sequence.</span>
 
                <span>The share of sequences that shows at least one mutation in \(L_{Sequence}\) bp is \(p_{M}=\) <span id="amount_mutated"></span> % of sequences</span>
 
                <span id="probability_positive_sequencing"></span>
 
                <span id="number_to_seq"></span>
 
            </div>
 
 
 
        }}
 
    }}
 
    {{Heidelberg/templateus/Contentsection|
 
        {{#tag:html|
 
            <h2>Diff tool</h2>
 
            Marks differences in two strings, ignores newlines.
 
 
            {{Heidelberg/form|Insert strings to compare|#005493|differences();|
 
                {{Heidelberg/formrow|
 
                    {{Heidelberg/formtextarea|String 1|str1|String 1}}
 
                    {{Heidelberg/formtextarea|String 2|str2|String 2}}
 
                }}
 
                {{Heidelberg/formrow|
 
                    {{Heidelberg/formcheckbox|Case sensitive|case_sensitive}}
 
                }}
 
            }}
 
 
            <div>
 
                Comparison:
 
                <div style="overflow-x:scroll !important; overflow-y:hidden !important; max-height: 100px !important; background-color: whitesmoke;">
 
                    <span id="outstr1" style="display:inline !important; overflow: hidden !important; white-space: nowrap !important; font-family: monospace !important;"></span>
 
                    <br>
 
                    <span id="outstr2" style="display:inline !important; overflow: hidden !important; white-space: nowrap !important; font-family: monospace !important;"></span>
 
                </div>
 
                <span id="diffinfo"></span>
 
            </div>
 
        }}
 
    }}
 
    {{Heidelberg/templateus/Contentsection|
 
        {{#tag:html|
 
            <h2>Glucose Concentratoin</h2>
 
            Calculate the ideal glucose concentration in the medium used for either a turbidostat or a single flask.
 
            The glucose concentration in the <b>turbidostat</b> \(c_{G_{T} }\) is increased with the incoming medium with a flow rate of \(\Phi\) and a glucose concentration of \(c_{G_{M} }\). It is decreased by with the medium that leaves the turbidostat with the same flow rate, but a glucose concentration of \(c_{G_{T} }\). Additionally E. coli take up glucose with a concentration of \(c_{E}\) and a rate of \(q\).
 
            $$
 
            \frac{\partial c_{G_{T} }(t)}{\partial t} = \Phi \cdot c_{G_{M} } - \Phi \cdot c_{G_{T} } - c_{E} \cdot q
 
            $$
 
            In the case of a turbidostat we can assume a dynamic equilibrium:
 
            $$
 
            \frac{\partial c_{G_{T} }(t)}{\partial t} = 0
 
            $$
 
            This results in
 
            $$
 
            c_{G_{T} } = c_{G_{M} } - \frac{c_{E. coli} \cdot q}{\Phi}
 
            $$                    $$
 
            \Leftrightarrow c_{G_{M} } (c_{G_{T} }) = c_{G_{T} } + \frac{c_{E} \cdot q}{\Phi}
 
            $$
 
            When a lagoon with Volume \(V_{L}\) and a flowrate of \(\Phi_{L}\) is supplied by the turbidostat the glucose consumption in that lagoon can be modeled the same way. Because the <i>E. coli</i> titer, glucose concentration and flow rate into the lagoon are constant, a steady state equilibrium can be assumed:
 
            $$
 
            c_{G_{L} } = c_{G_{T} } - \frac{c_{E. coli} \cdot q}{\Phi_{L} }
 
            $$
 
            In the context of PACE mutagenesis plasmids are induced in the lagoons which stops growth of E. coli, hence the E. coli titer is assumed to be the same as in the turbidostat.
 
            $$
 
            c_{G_{L} } = c_{G_{M} } - \frac{c_{E} \cdot q}{\Phi} - \frac{c_{E} \cdot q}{\Phi_{L} }
 
            $$
 
            $$
 
            \Leftrightarrow c_{G_{M} } (c_{G_{L} }) = c_{G_{L} } + \frac{c_{E} \cdot q}{\Phi} + \frac{c_{E} \cdot q}{\Phi_{L} }
 
            $$
 
           
 
            <br>
 
            If the concentration of glucose in a    <b>flask</b>, \(c_{G_{F} }\) needs to be determined, the functional dependencies are as follows.
 
           
 
            As there is no incoming medium, or medium that leaves the flask, the concentration of glucose is only changed by <i>E. coli</i> degrading it.
 
            $$
 
            \frac{\partial c_{G_{F} }(t)}{\partial t} = q \cdot \int_{t_{0} }^{t} c_{E}(t) \: dt
 
            $$
 
            Exponential growth of the <i>E. coli</i> is assumed, resulting in
 
            $$c_{G_{F} }(t) = c_{G_{F} }(t_{0}) - q \cdot \int_{t_{0} }^{t} c_{E}(t) \: dt
 
            $$
 
            $$
 
            = c_{G_{F} }(t_{0}) -q \cdot \int_{t_{0} }^{t} c_{E}(t_{0}) \cdot exp\left(\frac{ln(2) \cdot t}{t_{E} }\right) dt
 
            $$
 
            $$
 
            = c_{G_{F} }(t_{0}) - q \cdot c_{E}(t_{0}) \cdot t_{E} \cdot \left(exp\left(\frac{ln(2) \cdot t}{t_{E} }\right) - exp\left(\frac{ln(2) \cdot t_{0} }{t_{E} }\right)\right)
 
            $$
 
            So the glucose starting concentration \(c_{G_{F} }(t_{0})\) needed to get a concentration of \(c_{G_{f} }(t)\) afer a    duration of \(t\) is calculated by
 
            $$
 
            c_{G_{F} }(t_{0}) = c_{G_{F} }(t) + q \cdot c_{E}(t_{0}) \cdot t_{E} \cdot \left(exp\left(\frac{ln(2) \cdot t}{t_{E} }\right) - exp\left(\frac{ln(2) \cdot t_{0} }{t_{E} }\right)\right)
 
            $$
 
            If logistic growth is assumed, the term for \(c_{E}(t)\) changes.      Here \(c_{c}\) is the capacity, the maximum concentration of <i>E. coli</i> under the present conditions.
 
            $$
 
            c_{G_{F} }(t) = c_{G_{F} }(t_{0}) - q \cdot \int_{t_{0} }^{t} c_{E}(t) \: dt
 
            $$
 
            $$
 
            = c_{G_{F} } (t_{0}) -q \int_{t_{0} }^{t} \frac{c_{E}(t_{0}) \: exp \big(ln(2) \cdot \frac{t}{t_{E} } \big)}{1+ \frac{c_{E}(t_{0})}{c_{c} } \: exp \big(ln(2) \cdot \frac{t}{t_{E} }\big)} \: dt
 
            $$
 
            $$
 
            = c_{G_{F} } (t_{0}) - q \: \frac{t_{E} \cdot c_{c} }{ln(2)} \cdot ln \Bigg( \frac{1 + \frac{c_{E}(t_{0})}{c_{c} } exp\big(ln(2) \: \frac{t}{t_{e} } \big)}{1 + \frac{c_{E}(t_{0})}{c_{c} } } \Bigg)
 
            $$
 
            So the glucose starting concentration \(c_{G_{F} }(t_{0})\) needed to get a concentration of \(c_{G_{f} }(t)\) afer a duration of \(t\) is calculated by
 
            $$
 
            c_{G_{F} } (t_{0}) = c_{G_{F} } (t) + q \: \frac{t_{E} \cdot c_{c} }{ln(2)} \cdot ln \Bigg( \frac{1 + \frac{c_{E}(t_{0})}{c_{c} } exp\big(ln(2) \: \frac{t}{t_{e} } \big)}{1 + \frac{c_{E}(t_{0})}{c_{c} } } \Bigg)
 
            $$
 
           
 
            <br>
 
            <b>Further calculations</b> for simplification of entering data:
 
            $$
 
            c_{E. coli_{DW} } = c_{E. coli_{OD600} } \cdot 0.36
 
            $$
 
            according to <i>Milo et al.</i><x-ref>Milo2009</x-ref>.
 
            $$
 
            q = 0.183 \: g_{Glucose} \: g_{DW}^{-1} \: h^{-1}
 
            $$
 
            according to <i>Neubauer et al.</i><x-ref>Neubauer2001</x-ref>.
 
           
 
           
 
            Because turbidstats are operated at a constant cell density, the flow rate \(\Phi\) can be calculated from the generation time \(t_{E}\).
 
            $$
 
            \Phi = \frac{ln(2)}{t_{E} }
 
            $$
 
           
 
            If the <i>E. coli</i> titer in \(g_{DW}/l\) is zero, it is calculated from the OD, else the dryweight value is used. If the glucose concentration in \(mmol/l\) not zero, it is used for the calulation. If the generation time \(t_{E}\) is not zero, it is used to calculate the flow rate \(\Phi\).
 
        }}
 
    }}
 
    {{Heidelberg/templateus/Contentsection|
 
        {{#tag:html|
 
 
            {{Heidelberg/formblank|Get the ideal concentration|#005493|
 
                {{Heidelberg/formrow|
 
                    {{Heidelberg/forminput|Glucose concentration \(c_{G} \: [g/l]\)|number|cturbidostat|1}}
 
                    {{Heidelberg/forminput|Glucose concentration \(c_{G} \: [mmol/l]\)|number|cturbidostatmol|5.55}}
 
                    {{Heidelberg/forminput|Flow rate \(\Phi \:[Volumes/h]\)|number|fr|1}}
 
                    {{Heidelberg/forminput|Generation time \(t_{E} \:[min]\)|number|te|30}}
 
                }}
 
                {{Heidelberg/formrow|
 
                    {{Heidelberg/forminput|<i>E. coli</i> titer \(c_{E. coli} \:[OD600]\)|number|ectiterod|0.8}}
 
                    {{Heidelberg/forminput|<i>E. coli</i> titer \(c_{E. coli} \:[g_{DW}/l]\)|number|ectiterdw|0}}
 
                    {{Heidelberg/forminput|Lagoon volume \(V_{L} \:[ml]\)|number|vl|100}}
 
                    {{Heidelberg/forminput|Lagoon flow rate \(\Phi_{L} \:[ml/min]\)|number|phil|1.667}}
 
                }}
 
                {{Heidelberg/formrow|               
 
                    {{Heidelberg/forminput|Glucose degradation \(q \: [g_{glucose} \: g_{DW}^{-1} h^{-1}]\)|number|q|0.183}}
 
                    {{Heidelberg/forminput|Time \(t \: [min]\)|number|gluc_time|90}}
 
                    {{Heidelberg/forminput|<i>E. coli</i> start concentration\(c_{E} \: [g/L]\)|number|ec0dw|0}}
 
                    {{Heidelberg/forminput|<i>E. coli</i> start concentration\(c_{E} \: [OD600]\)|number|ec0od|0.01}}
 
                }}
 
                {{Heidelberg/formrow|                     
 
                    {{Heidelberg/forminput|<i>E. coli</i> capacity \(c_{c} \: [g/L]\)|number|cmaxdw|0.72}}
 
                    {{Heidelberg/forminput|<i>E. coli</i> capacity \(c_{c} \: [OD600]\)|number|cmaxod|2.0}}
 
                    {{Heidelberg/formcheckbox|Exponential|exponential}}|
 
                }}|
 
                {{Heidelberg/formrow| 
 
                    {{Heidelberg/formbutton|Medium (Turbidostat)|glucosecont();}}
 
                    {{Heidelberg/formbutton|Medium (Lagoon)|glucosecont_lagoon();}}
 
                    {{Heidelberg/formbutton|Lagoon (Medium)|glucosecont_forward();}}
 
                }}
 
                {{Heidelberg/formrow| 
 
                    {{Heidelberg/formbutton|Medium (Flask)|glucosedis();}}
 
                    {{Heidelberg/formbutton|New Medium (Flask)|glucosedisnew();}}
 
                    {{Heidelberg/formbutton|Flask (Medium)|glucosedis_forward();}}
 
                }}
 
                {{Heidelberg/formrow| 
 
                    {{Heidelberg/formbutton|New flask Medium|glucosedisnew_forward();}}
 
                }}
 
            }}
 
 
            <div class="col-lg-12 col-md-12 col-xs-12", style="padding-left:0px;padding-right:0px">
 
                <div class="mdl-shadow--4dp" style="padding:20px; float:left}">
 
                    <div style="width: 100% !important; overflow-x: auto !important;">
 
                        <div style="width: 100% !important; min-width: 700 !important;" id="glucoseplot"></div>
 
                    </div>
 
                <div class="img-caption title">      <strong><b>Changes in <i>E. coli</i> and glucose concentration over time</b></strong>
 
                </div>
 
                <div class="img-caption subtitle">
 
                    <div class=content id="glucoseout"></div>
 
                </div>
 
            </div>
 
        </div>
 
        }}
 
    }}
 
}}
 
{{Heidelberg/references2
 
    }}
 
{{Heidelberg/footer
 
    }}
 
 
 
{{Heidelberg/tools_code
 
    }}
 

Latest revision as of 17:31, 14 December 2017