Lukas Adam (Talk | contribs) |
|||
Line 1: | Line 1: | ||
− | + | <!DOCTYPE html> | |
<html lang="en" dir="ltr" class="client-nojs"> | <html lang="en" dir="ltr" class="client-nojs"> | ||
<head> | <head> | ||
<meta charset="UTF-8" /> | <meta charset="UTF-8" /> | ||
− | + | <title>Team:Heidelberg/internal tools - 2017.igem.org</title> | |
− | <title>Team:Heidelberg/ | + | |
<meta name="generator" content="MediaWiki 1.24.1" /> | <meta name="generator" content="MediaWiki 1.24.1" /> | ||
− | <link rel="alternate" type="application/x-wiki" title="Edit" href="/wiki/index.php?title=Team:Heidelberg/ | + | <link rel="alternate" type="application/x-wiki" title="Edit" href="/wiki/index.php?title=Team:Heidelberg/internal_tools&action=edit" /> |
− | <link rel="edit" title="Edit" href="/wiki/index.php?title=Team:Heidelberg/ | + | <link rel="edit" title="Edit" href="/wiki/index.php?title=Team:Heidelberg/internal_tools&action=edit" /> |
<link rel="shortcut icon" href="/favicon.ico" /> | <link rel="shortcut icon" href="/favicon.ico" /> | ||
<link rel="search" type="application/opensearchdescription+xml" href="/wiki/opensearch_desc.php" title="2017.igem.org (en)" /> | <link rel="search" type="application/opensearchdescription+xml" href="/wiki/opensearch_desc.php" title="2017.igem.org (en)" /> | ||
<link rel="EditURI" type="application/rsd+xml" href="https://2017.igem.org/wiki/api.php?action=rsd" /> | <link rel="EditURI" type="application/rsd+xml" href="https://2017.igem.org/wiki/api.php?action=rsd" /> | ||
− | <link rel="alternate" hreflang="x-default" href="/Team:Heidelberg/ | + | <link rel="alternate" hreflang="x-default" href="/Team:Heidelberg/internal_tools" /> |
<link rel="copyright" href="http://creativecommons.org/licenses/by/3.0/" /> | <link rel="copyright" href="http://creativecommons.org/licenses/by/3.0/" /> | ||
<link rel="alternate" type="application/atom+xml" title="2017.igem.org Atom feed" href="/wiki/index.php?title=Special:RecentChanges&feed=atom" /> | <link rel="alternate" type="application/atom+xml" title="2017.igem.org Atom feed" href="/wiki/index.php?title=Special:RecentChanges&feed=atom" /> | ||
Line 21: | Line 20: | ||
<script src="https://2017.igem.org/wiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=igem&*"></script> | <script src="https://2017.igem.org/wiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=igem&*"></script> | ||
<script>if(window.mw){ | <script>if(window.mw){ | ||
− | mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Team:Heidelberg/ | + | mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Team:Heidelberg/internal_tools","wgTitle":"Team:Heidelberg/internal tools","wgCurRevisionId":131201,"wgRevisionId":131201,"wgArticleId":19802,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":"Juzb","wgUserGroups":["*","user","autoconfirmed"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"Team:Heidelberg/internal_tools","wgUserId":915,"wgUserEditCount":27,"wgUserRegistration":1492081568000,"wgUserNewMsgRevisionId":null,"wgIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgWikiEditorEnabledModules":{"toolbar":false,"dialogs":false,"hidesig":true,"preview":false,"previewDialog":false,"publish":false}}); |
}</script><script>if(window.mw){ | }</script><script>if(window.mw){ | ||
mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"editfont":"default","editondblclick":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":1,"extendwatchlist":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nickname":"","norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"rcdays":7,"rclimit":50,"rows":25,"showhiddencats":0,"shownumberswatching":1,"showtoolbar":1,"skin":"igem","stubthreshold":0,"thumbsize":5,"underline":2,"uselivepreview":0,"usenewrc":1,"watchcreations":1,"watchdefault":1,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"watchrollback":0, | mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"editfont":"default","editondblclick":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":1,"extendwatchlist":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nickname":"","norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"rcdays":7,"rclimit":50,"rows":25,"showhiddencats":0,"shownumberswatching":1,"showtoolbar":1,"skin":"igem","stubthreshold":0,"thumbsize":5,"underline":2,"uselivepreview":0,"usenewrc":1,"watchcreations":1,"watchdefault":1,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"watchrollback":0, | ||
− | "wllimit":250,"useeditwarning":1,"prefershttps":1,"language":"en","variant-gan":"gan","variant-iu":"iu","variant-kk":"kk","variant-ku":"ku","variant-shi":"shi","variant-sr":"sr","variant-tg":"tg","variant-uz":"uz","variant-zh":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false});},{},{});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":" | + | "wllimit":250,"useeditwarning":1,"prefershttps":1,"language":"en","variant-gan":"gan","variant-iu":"iu","variant-kk":"kk","variant-ku":"ku","variant-shi":"shi","variant-sr":"sr","variant-tg":"tg","variant-uz":"uz","variant-zh":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false});},{},{});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":"29b8dd8475ab9ce369f1eaa3b62557e9+\\","patrolToken":"9b15ea2f11dbe71fc465e1579a511670+\\","watchToken":"c9c576d4bfe983ce3d6431645a6d7d83+\\"});},{},{}); |
− | /* cache key: 2017_igem_org:resourceloader:filter:minify-js:7: | + | /* cache key: 2017_igem_org:resourceloader:filter:minify-js:7:1b1539751622cf633e0bbde0db35ebde */ |
}</script> | }</script> | ||
<script>if(window.mw){ | <script>if(window.mw){ | ||
Line 31: | Line 30: | ||
}</script> | }</script> | ||
</head> | </head> | ||
− | <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page- | + | <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Team_Heidelberg_internal_tools skin-igem action-view"> |
<script type='text/javascript' src ='/common/tablesorter/jquery.tablesorter.min.js'></script> | <script type='text/javascript' src ='/common/tablesorter/jquery.tablesorter.min.js'></script> | ||
Line 42: | Line 41: | ||
<div id='globalWrapper'> | <div id='globalWrapper'> | ||
<div id='top_menu_under' class='noprint'></div> | <div id='top_menu_under' class='noprint'></div> | ||
− | <div id='top_menu_14' class='noprint'></div> <!-- Will be replaced with the jQuery.load --> | + | <div id='top_menu_14' class='noprint'>Loading menubar.....</div> <!-- Will be replaced with the jQuery.load --> |
<script>jQuery('#top_menu_14').load('https://2017.igem.org/cgi/top_menu_14/menubar_reply.cgi', | <script>jQuery('#top_menu_14').load('https://2017.igem.org/cgi/top_menu_14/menubar_reply.cgi', | ||
− | { t:"Team%3AHeidelberg% | + | { t:"Team%3AHeidelberg%2Finternal%20tools", |
− | a:"View+%2FTeam%3AHeidelberg% | + | a:"View+%2FTeam%3AHeidelberg%2Finternal_tools++Edit+%2Fwiki%2Findex.php%3Ftitle%3DTeam%3AHeidelberg%2Finternal_tools%26action%3Dedit++History+%2Fwiki%2Findex.php%3Ftitle%3DTeam%3AHeidelberg%2Finternal_tools%26action%3Dhistory++Move+%2FSpecial%3AMovePage%2FTeam%3AHeidelberg%2Finternal_tools++Unwatch+%2Fwiki%2Findex.php%3Ftitle%3DTeam%3AHeidelberg%2Finternal_tools%26action%3Dunwatch%26token%3D9de7174bd4c84ca9683628fb5dd345bb%252B%255C++Page+%2FTeam%3AHeidelberg%2Finternal_tools++Discussion+%2Fwiki%2Findex.php%3Ftitle%3DTalk%3ATeam%3AHeidelberg%2Finternal_tools%26action%3Dedit%26redlink%3D1++" }); |
</script> | </script> | ||
Line 60: | Line 59: | ||
<h1 id="firstHeading" class="firstHeading"> | <h1 id="firstHeading" class="firstHeading"> | ||
− | <span dir="auto">Team:Heidelberg/ | + | <span dir="auto">Team:Heidelberg/internal tools</span> |
</h1> | </h1> | ||
</div> | </div> | ||
Line 212: | Line 211: | ||
− | h2 { font-family: 'Josefin Sans', sans-serif; font-size: 48px; font-weight: 300; color: #393939; line-height: 56px; opacity: 0.9; text-align:center} | + | h2 { margin-top: 10px; font-family: 'Josefin Sans', sans-serif; font-size: 48px; font-weight: 300; color: #393939; line-height: 56px; opacity: 0.9; text-align:center} |
h3 { font-family: 'Josefin Sans', sans-serif; font-size: 22px; font-weight: 300; color: #555; line-height: 40px; } | h3 { font-family: 'Josefin Sans', sans-serif; font-size: 22px; font-weight: 300; color: #555; line-height: 40px; } | ||
− | img { max-width: 100%;} | + | img { max-width: 100%; } |
.medium-paragraph { font-size: 18px; line-height: 34px; } | .medium-paragraph { font-size: 18px; line-height: 34px; } | ||
Line 353: | Line 352: | ||
− | @media (min-width: 992px) and (max-width: 1199px) { | + | @media (min-width: 992px) and (max-width: 1199px) {} |
− | + | ||
− | + | ||
− | @media (max-width: | + | @media (min-width: 768px) and (max-width: 991px) { |
− | + | ||
− | + | .section-description p { padding: 0; } | |
− | + | ||
− | + | .features-box .features-box-icon { font-size: 50px; line-height: 50px; } | |
− | + | ||
− | + | } | |
− | + | ||
− | + | @media (max-width: 767px) { | |
− | + | ||
− | + | .navbar { padding-top: 0; background: #444; } | |
− | + | .navbar>.container .navbar-brand, .navbar>.container-fluid .navbar-brand { margin-left: 15px; } | |
− | + | .navbar-collapse { border: 0; } | |
− | + | .navbar-inverse .navbar-toggle { border-color: transparent; } | |
− | + | .navbar-inverse ul.navbar-nav li a.btn-link-3 { margin: 10px; } | |
− | + | ||
− | + | .section-description p { padding: 0; } | |
− | + | ||
− | + | .top-content { padding: 40px 0 60px 0; } | |
− | + | ||
− | + | .features-box { text-align: center; } | |
− | + | .features-box h3 { margin-top: 5px; padding-top: 10px; } | |
− | + | ||
− | + | } | |
− | + | ||
− | + | @media (max-width: 415px) { | |
− | + | ||
− | + | h1, h2 { font-size: 36px; } | |
− | + | ||
− | + | } | |
− | + | ||
− | + | ||
− | + | /* Retina-ize images/icons */ | |
− | + | ||
− | .navbar- | + | @media |
− | + | only screen and (-webkit-min-device-pixel-ratio: 2), | |
− | + | only screen and ( min--moz-device-pixel-ratio: 2), | |
− | + | only screen and ( -o-min-device-pixel-ratio: 2/1), | |
− | + | only screen and ( min-device-pixel-ratio: 2), | |
+ | only screen and ( min-resolution: 192dpi), | ||
+ | only screen and ( min-resolution: 2dppx) { | ||
+ | |||
+ | /* logo */ | ||
+ | .navbar-brand { | ||
+ | background-image: url(../img/logo@2x.png) !important; background-repeat: no-repeat !important; background-size: 102px 32px !important; | ||
} | } | ||
+ | |||
} | } | ||
Line 468: | Line 472: | ||
color: #393939; | color: #393939; | ||
} | } | ||
− | |||
</style> | </style> | ||
− | + | ||
<link rel="stylesheet" type="text/css" | <link rel="stylesheet" type="text/css" | ||
href="https://2017.igem.org/Template:Heidelberg/table_layout/CSS?action=raw&ctype=text/css" /> | href="https://2017.igem.org/Template:Heidelberg/table_layout/CSS?action=raw&ctype=text/css" /> | ||
Line 485: | Line 488: | ||
<script src="http://static.tildacdn.com/js/tilda-map-1.0.min.js"></script> | <script src="http://static.tildacdn.com/js/tilda-map-1.0.min.js"></script> | ||
<script src="http://static.tildacdn.com/js/lazyload-1.3.min.js"></script> | <script src="http://static.tildacdn.com/js/lazyload-1.3.min.js"></script> | ||
− | + | ||
− | + | <style> | |
+ | #input_form { | ||
+ | background-color: #939393; | ||
+ | border: none; | ||
+ | color: white; | ||
+ | padding: 5px 32px; | ||
+ | text-align: center; | ||
+ | text-decoration: none; | ||
+ | display: inline-block; | ||
+ | font-size: 16px; | ||
+ | } | ||
+ | |||
+ | </style> | ||
</head> | </head> | ||
<body class="t-body"> | <body class="t-body"> | ||
Line 494: | Line 509: | ||
<div class="container"> | <div class="container"> | ||
<div class="navbar-header"> | <div class="navbar-header"> | ||
− | + | <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-navbar-1"> | |
+ | <span class="sr-only">Toggle navigation</span> | ||
+ | <span class="icon-bar"></span> | ||
+ | <span class="icon-bar"></span> | ||
+ | <span class="icon-bar"></span> | ||
+ | </button> | ||
<a class="navbar-brand" href="#"><div id="circle"> | <a class="navbar-brand" href="#"><div id="circle"> | ||
</div></a> | </div></a> | ||
Line 527: | Line 547: | ||
− | + | <div style="padding-top: 80px; background-color:white;"> | |
− | + | <div class="t-container"> | |
− | + | <div class="t-col t-col_12"> | |
− | + | <div class="container-fluid" style="margin-top: 10px;" id="container1"> | |
− | + | <h1>Internal Tools</h1> | |
− | + | <h2>Number of mutations and mutated sequences</h2> | |
− | + | <p>Expected number of mutations in a single sequence: | |
− | <p> | + | $$p_{m} = \frac{N_{mutations}}{L_{Sequence}} = N_{generations} \cdot r_{mutation} = t_{total} \cdot \Phi \cdot r_{mutation}$$ |
− | + | </p> | |
− | + | <p>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}} $$ | |
− | <p> | + | </p> |
+ | <p>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}} $$ | ||
+ | </p> | ||
+ | <p>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})}$$ | ||
+ | </p> | ||
+ | <p>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.</p> | ||
+ | <p>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}\).</p> | ||
− | |||
− | |||
− | |||
− | + | <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> | ||
+ | <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 class="container-fluid" style="margin-top: 10px;" id="container1"> | ||
+ | <h2>Diff tool</h2> | ||
+ | <p>Marks differences in two strings, ignores newlines. | ||
+ | </p> | ||
− | |||
− | |||
− | |||
− | + | <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> | ||
+ | <div style="padding-top: 30px;"> | ||
+ | <input type="button" value="Submit" id="input_form2" onclick="return differences();"> | ||
+ | </div> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </section> | ||
+ | </form> | ||
+ | </div> | ||
+ | <div style="overflow-x:scroll !important; overflow-y:hidden !important; max-height: 100px !important;"> | ||
+ | <p>Comparison:</p> | ||
+ | <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> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
− | + | ||
− | + | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
− | + | <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> | |
− | + | <script src="https://cdnjs.cloudflare.com/ajax/libs/numjs/0.13.1/numjs.js"></script> | |
− | + | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
+ | <script src="http://evanplaice.github.io/jquery-csv/src/jquery.csv.min.js"></script> | ||
+ | <script src="https://2017.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | ||
+ | <script> | ||
+ | //example that contains everything needed | ||
+ | function dummy(){ | ||
+ | //get the values | ||
+ | var mr = Number(document.getElementById('mr').value); | ||
+ | |||
+ | //initialise variables | ||
+ | var a_mutations = 0; | ||
+ | |||
+ | //calculate | ||
+ | if(phi==0){ | ||
+ | a_mutations = ng * mr; | ||
+ | } | ||
+ | |||
+ | //return the results | ||
+ | $("#amount_mutated").html((Math.round(100000 * a_mutated))/1000); | ||
+ | $("#number_generations").html(ng_out); | ||
− | + | //end the function | |
− | + | return false; | |
− | + | } | |
− | + | ||
+ | function number_mutations(){ | ||
+ | |||
+ | //get the values | ||
+ | var mr = Number(document.getElementById('mr').value); | ||
+ | var phi = Number(document.getElementById('phi').value); | ||
+ | var ng = Number(document.getElementById('ng').value); | ||
+ | var tt = Number(document.getElementById('tt').value); | ||
+ | var ls = Number(document.getElementById('ls').value); | ||
+ | var ns = Number(document.getElementById('ns').value); | ||
+ | var pm = Number(document.getElementById('pm').value); | ||
+ | |||
+ | //initialise variables | ||
+ | var a_mutations = 0; | ||
+ | var n_mutations = '?'; | ||
+ | var a_mutated = '?'; | ||
+ | var ng_out = ""; | ||
+ | var number_to_seq_out = ""; | ||
+ | var number_to_seq = 0; | ||
+ | var probability_positive_sequencing = '' | ||
+ | var warnings = "" | ||
+ | |||
+ | //Check, if given values make sense: | ||
+ | |||
+ | if(mr>1){ | ||
+ | warnings += "A mutation rate that is above one mutation per basepair, per generation does not make sense. 100 % should be enough, right? "; | ||
+ | mr = 1; | ||
+ | } | ||
+ | |||
+ | if(pm>1){ | ||
+ | warnings += "A probability of 100 % should be enough, right?. "; | ||
+ | pm = 1; | ||
+ | } | ||
+ | |||
+ | //calculate | ||
+ | if(phi*tt==0){ | ||
+ | a_mutations = 1 - Math.pow((1 - mr), ng); | ||
+ | ng_out = ""; | ||
+ | } | ||
+ | else{ | ||
+ | a_mutations = 1 - Math.pow((1 - mr), tt*phi); | ||
+ | ng = tt*phi; | ||
+ | ng_out = "The conditions result in " + ng + " generations."; | ||
+ | } | ||
+ | |||
+ | n_mutations = ls * a_mutations; | ||
+ | a_mutated = 1 - Math.pow((1-a_mutations), ls); | ||
+ | |||
+ | if(ns!=0){ | ||
+ | probability_positive_sequencing = ns*a_mutated; | ||
+ | $("#probability_positive_sequencing").html("Sequencing " + ns + " sequences results in a " + ((Math.round(probability_positive_sequencing*100))/100) + "% probabiltiy of finding at least one mutated sequence."); | ||
+ | } | ||
+ | else{ | ||
+ | $("#probability_positive_sequencing").html(""); | ||
+ | } | ||
+ | |||
+ | if(pm!=0){ | ||
+ | number_to_seq = Math.max(1, Math.round((Math.log(1-pm))/(Math.log(1-a_mutated)))); | ||
+ | if(isNaN(number_to_seq)){ | ||
+ | if(pm==1){ | ||
+ | number_to_seq_out = "To be 100 % sure, sequence infinitely many sequences."; | ||
+ | } | ||
+ | else{ | ||
+ | number_to_seq_out = "Unluckily we were unable to calculate the number of sequences to sequence to have a " + (pm*100) + "% probability for a positive result."; | ||
+ | } | ||
+ | } | ||
+ | else{ | ||
+ | number_to_seq_out = "Sequence " + number_to_seq + " clones to have a " + (pm*100) + " % probability to have at least one mutated under the results."; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | //return the results | ||
+ | $("#amount_mutations").html((Math.round(1000000 * a_mutations))/10000); | ||
+ | $("#number_mutations").html((Math.round(n_mutations*100))/100); | ||
+ | $("#amount_mutated").html((Math.round(100000 * a_mutated))/1000); | ||
+ | $("#number_generations").html(ng_out); | ||
+ | $("#number_to_seq").html(number_to_seq_out); | ||
+ | $("#warnings_mutations").html(warnings); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | //end the function | |
− | + | return false; | |
− | + | } | |
− | + | ||
− | + | function glucose(){ | |
− | + | //get the values | |
− | + | var initial_concentration = Number(document.getElementById('initial_concentration').value); | |
− | + | var minimal_concentration = Number(document.getElementById('minimal_concentration').value); | |
− | + | var final_ecoli_concentration = Number(document.getElementById('final_ecoli_concentration').value); | |
+ | var beginning_ecoli_concentration = Number(document.getElementById('beginning_ecoli_concentration').value); | ||
+ | var pace = Boolean(document.getElementById('pace').value); | ||
+ | var doubling_time = Number(document.getElementById('doubling_time').value); | ||
+ | var time_induction = Number(document.getElementById('time_induction').value); | ||
+ | var flow_lagoon = Number(document.getElementById('flow_lagoon').value); | ||
+ | |||
+ | //initialise variables | ||
+ | var time_turbidostat = 0; | ||
+ | var time_lagoon = 0; | ||
+ | |||
+ | //calculate | ||
+ | if(pace){ | ||
+ | phi = Math.LN2/doubling_time; //vol/h, not L/h! | ||
+ | time_turbidostat = 1/phi; // as in the esvelt supplementaries? | ||
+ | time_lagoon = 1/flow_lagoon; | ||
+ | } | ||
+ | |||
+ | //return the results | ||
+ | $("#amount_mutated").html((Math.round(100000 * a_mutated))/1000); | ||
+ | $("#number_generations").html(ng_out); | ||
− | + | //end the function | |
− | + | return false; | |
− | + | } | |
+ | |||
+ | function differences(){ | ||
+ | //get the values | ||
+ | var str1 = document.getElementById('str1').value; | ||
+ | var str2 = document.getElementById('str2').value; | ||
+ | str1 = str1.replace(/(\r\n|\n|\r)/gm,""); | ||
+ | str2 = str2.replace(/(\r\n|\n|\r)/gm,""); | ||
+ | |||
+ | //initialise variables | ||
+ | var diff = []; | ||
+ | var outstr1 = ""; | ||
+ | var outstr2 = ""; | ||
+ | var diffs = 0; | ||
+ | var lendiffs = 0; | ||
+ | var sharedlen = 0; | ||
+ | var diffinfo = ""; | ||
+ | //calculate | ||
+ | var i = 0; | ||
+ | while(i < str1.length){ | ||
+ | if(i==str2.length){ | ||
+ | break; | ||
+ | } | ||
+ | if(str1[i]==str2[i]){ | ||
+ | outstr1 += str1[i]; | ||
+ | outstr2 += str2[i]; | ||
+ | } | ||
+ | else{ | ||
+ | diffs += 1; | ||
+ | outstr1 += '<span style="color: red">' + str1[i] + '</span>'; | ||
+ | outstr2 += '<span style="color: red">' + str2[i] + '</span>'; | ||
+ | } | ||
+ | i++; | ||
+ | } | ||
+ | sharedlen = i; | ||
+ | while(i < str1.length){ | ||
+ | outstr1 = outstr1 + '<span style="color: blue">' + str1[i] + '</span>'; | ||
+ | i++; | ||
+ | lendiffs++; | ||
+ | } | ||
+ | while(i < str2.length){ | ||
+ | outstr2 = outstr2 + '<span style="color: blue">' + str2[i] + '</span>'; | ||
+ | i++; | ||
+ | lendiffs++; | ||
+ | } | ||
+ | diffinfo = "The strings are different for " + diffs + " from " + sharedlen + " positions (" + (0.01*Math.round(10000*(diffs/sharedlen))) + "%)and their length differs by " + lendiffs + " positions."; | ||
+ | |||
+ | //return the results | ||
+ | $("#outstr1").html(outstr1); | ||
+ | $("#outstr2").html(outstr2); | ||
+ | $("#diffinfo").html(diffinfo); | ||
− | + | //end the function | |
− | + | return false; | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | </script> | ||
Line 745: | Line 952: | ||
--> | --> | ||
− | <!-- Saved in parser cache with key 2017_igem_org:pcache:idhash:19802-0!*!*!*!*!*!* and timestamp | + | <!-- Saved in parser cache with key 2017_igem_org:pcache:idhash:19802-0!*!*!*!*!*!* and timestamp 20170926073158 and revision id 131201 |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
--> | --> | ||
</div> <div class="visualClear"></div> | </div> <div class="visualClear"></div> |
Revision as of 08:04, 26 September 2017
<!DOCTYPE html>
WikitemplateA home
From 2014.igem.org
Internal Tools
Number of mutations and mutated sequences
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}\).
\(p_{m} =\) %(bp/bp).
\(N_{mutations} =\) bp per sequence.
The share of sequences that shows at least one mutation in \(L_{Sequence}\) bp is \(p_{M}=\) % of sequences
Diff tool
Marks differences in two strings, ignores newlines.