Difference between revisions of "Team:Heidelberg/InteractiveTools"

(Blanked the page)
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Heidelberg/header
 
    }}
 
{{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}\).
 
  
 
            <form action="" id="form1">
 
                <section>
 
                <h2>Get your mutations</h2>
 
                    <ul class="input-list style-1 clearfix">
 
                        <li>
 
                            <label>
 
                                Mutation rate \(r_{mutation} \:[bp/generation]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="mr" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Flow troughLagoon \(\Phi_{lagoon} \: [Volumes/h]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="phi" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Total time<br> in lagoon \(t_{total} \: [h]\)
 
                            <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="tt" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Number<br> of generations  \(N_{generations}\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ng" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Length of sequence that can mutate \(L_{Sequence} \: [bp]\)<br>
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ls" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Number of sequences that are sequenced \(N_{Sequences}\)<br>
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ns" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Probability to get at least one mutated result  \(p(N_{mutated}>0) \)<br>
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="pm" value="0.9" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                        <div style="padding-top: 30px;">
 
                            <input type="button" value="Submit" id="input_form" onclick="return number_mutations();">
 
                            </div>
 
                        </li>
 
                    </ul>
 
                </section>
 
            </form>
 
            <div class="container-fluid" style="margin-top: 10px;" id="container2">
 
                <p id="warnings_mutations"></p>
 
                <br>
 
                <p id="number_generations"></p>
 
                <p>\(p_{m} =\) <span id="amount_mutations"></span> %(bp/bp).</p>
 
                <p>\(N_{mutations} =\) <span id="number_mutations"></span> bp per sequence.</p>
 
                <p>The share of sequences that shows at least one mutation in \(L_{Sequence}\) bp is \(p_{M}=\) <span id="amount_mutated"></span> % of sequences</p>
 
                <p id="probability_positive_sequencing"></p>
 
                <p id="number_to_seq"></p>
 
            </div>
 
 
 
        }}
 
    }}
 
    {{Heidelberg/templateus/Contentsection|
 
        {{#tag:html|
 
            <h2>Diff tool</h2>
 
            Marks differences in two strings, ignores newlines.
 
 
 
            <form action="" id="form2">
 
                <section>
 
                    <ul class="input-list style-1 clearfix">
 
                        <li>
 
                            <label>
 
                                String 1<br>
 
                                <textarea id="str1" lang='en-150' rows=8 cols=50></textarea>
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                String 2<br>
 
                                <textarea id="str2" lang='en-150' rows=8 cols=50></textarea>
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label for="case_sensitive">
 
                                Case sensitive
 
                                <input type="checkbox" Name="Case sensitive" id="case_sensitive" value="True" checked>
 
                            </label> 
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="Submit" id="input_form2" onclick="return differences();">
 
                            </div>
 
                        </li>
 
                    </ul>
 
                </section>
 
            </form>
 
            <div>
 
                Comparison:
 
                <div style="overflow-x:scroll !important; overflow-y:hidden !important; max-height: 100px !important; background-color: whitesmoke;">
 
                    <p id="outstr1" style="display:inline !important; overflow: hidden !important; white-space: nowrap !important; font-family: monospace !important;"></p>
 
                    <br>
 
                    <p id="outstr2" style="display:inline !important; overflow: hidden !important; white-space: nowrap !important; font-family: monospace !important;"></p>
 
                </div>
 
                <p id="diffinfo"></p>
 
            </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|
 
            <form action="" id="form1">
 
                <section>
 
                    <h2>Get the ideal concentration</h2>
 
                    <ul class="input-list style-1 clearfix">
 
                        <li>
 
                            <label>
 
                                Glucose concentration <br> \(c_{G} \: [g/l]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="cturbidostat" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Glucose concentration <br> \(c_{G} \: [mmol/l]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="cturbidostatmol" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Flow rate <br>\(\Phi \:[Volumes/h]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="fr" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Generation time <br>\(t_{E} \:[min]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="te" value="30" lang='en-150' step="any">
 
                                </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                <i>E. coli</i> titer<br>  \(c_{E. coli} \:[OD600]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ectiterod" value="0.8" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                <i>E. coli</i> titer<br>  \(c_{E. coli} \:[g_{DW}/l]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ectiterdw" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Lagoon volume<br>  \(V_{L} \:[ml]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="vl" value="100" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Lagoon Flow rate <br> \(\Phi_{L} \:[ml/min]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="phil" value="1.667" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Glucose degradation<br>\(q \: [g_{glucose} \: g_{DW}^{-1} h^{-1}]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="q" value="0.183" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                Time <br>\(t \: [min]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="gluc_time" value="90" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                <i>E. coli</i> start concentration<br>\(c_{E} \: [g/L]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ec0dw" value="0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                <i>E. coli</i> start concentration<br>\(c_{E} \: [OD600]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="ec0od" value="0.01" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                <i>E. coli</i> capacity <br>\(c_{c} \: [g/L]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="cmaxdw" value="0.72" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                        <li>
 
                            <label>
 
                                <i>E. coli</i> capacity <br>\(c_{c} \: [OD600]\)
 
                                <input type="number" pattern="[0-9]+([,\.][0-9]+)?" id="cmaxod" value="2.0" lang='en-150' step="any">
 
                            </label>
 
                        </li>
 
                    </ul>
 
 
                    <ul class="input-list style-1 clearfix">
 
                        <li>
 
                            <label for="logistic">
 
                                Logistic <input type="checkbox" Name="Logistic" id="logistic" value="True" checked>
 
                            </label> 
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="Medium (Turbidostat)" id="input_form" onclick="return glucosecont();">
 
                            </div>
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="Medium (Lagoon)" id="input_form" onclick="return glucosecont_lagoon();">
 
                            </div>
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="Lagoon (Medium)" id="input_form" onclick="return glucosecont_forward();">
 
                            </div>
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="Medium (Flask)" id="input_form" onclick="return glucosedis();">
 
                            </div>
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="New Medium (Flask) " id="input_form" onclick="return glucosedisnew();">
 
                            </div>
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="Flask (Medium)" id="input_form" onclick="return glucosedis_forward();">
 
                            </div>
 
                        </li>
 
                        <li>
 
                            <div style="padding-top: 30px;">
 
                                <input type="button" value="New Flask (Medium)" id="input_form" onclick="return glucosedisnew_forward();">
 
                            </div>
 
                        </li>
 
                    </ul>
 
                </section>
 
            </form>
 
 
            <p id="glucoseout"></p><br>
 
            <div style="width: 100% !important; overflow-x: auto !important;">
 
                <div style="width: 100% !important; min-width: 700 !important;" id="glucoseplot">
 
                </div>
 
            </div>
 
            <br>
 
        }}
 
    }}
 
}}
 
{{Heidelberg/references2
 
    }}
 
{{Heidelberg/footer
 
    }}
 
 
 
{{Heidelberg/tools_code
 
    }}
 

Latest revision as of 17:31, 14 December 2017