Team:UChicago/Fluctuation Analysis
From 2014.igem.org
(Difference between revisions)
(25 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
<html> | <html> | ||
+ | |||
<style> | <style> | ||
- | + | ||
- | + | #maincontent { | |
+ | margin: auto; | ||
+ | width: 60%; | ||
} | } | ||
+ | |||
+ | table { | ||
+ | width: 100%; | ||
+ | } | ||
+ | |||
+ | table, th, td { | ||
+ | border-collapse: collapse; | ||
+ | border: 1px solid black; | ||
+ | } | ||
+ | |||
</style> | </style> | ||
- | <input type="text" id="text" style="width: 150px;" /> | + | <div id="maincontent"> |
- | <br /> | + | <input type="text" id="text" style="width: 150px;"/> |
- | <input type="button" value="Click Me" id="button" /> | + | <br/> |
+ | <input type="button" value="Click Me" id="button"/> | ||
+ | <br/> | ||
+ | <h2>Small FALCOR-like program for mutational analysis</h2> | ||
+ | <input type="checkbox" id="debugb"><label for="debugb">Debug mode</label></input> | ||
+ | <button type="button">Add sample data</button> | ||
+ | <div id="inputs"> | ||
+ | <h4>Mutants</h4> | ||
+ | <textarea id="mutin" placeholder="Paste data here"></textarea> | ||
+ | <h4>Viable Cells</h4> | ||
+ | <textarea id="tcellsin" placeholder="Paste data here"></textarea> | ||
+ | <button id="calcb" type="button">Calculate</button> | ||
+ | </div> | ||
+ | <div id="results"> | ||
+ | <h3>Results</h3> | ||
+ | <table> | ||
+ | <tr> | ||
+ | <th>Mean Mutational Events</th> | ||
+ | <th>95% CI</th> | ||
+ | <th>Mutation Rate</th> | ||
+ | <th>95% CI</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td id="mmutev">1.4</td> | ||
+ | <td id="mutevci">.1</td> | ||
+ | <td id="mutrate">10<sup>-3</sup></td> | ||
+ | <td id="mutrateci">10<sup>-4</sup></td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </div> | ||
<!-- may contain terrible hacks --> | <!-- may contain terrible hacks --> | ||
Line 17: | Line 59: | ||
$('#button').click(function () { | $('#button').click(function () { | ||
var text = $('#text'); | var text = $('#text'); | ||
- | text. | + | text.val(text.val() + ' after clicking'); |
}); | }); | ||
+ | }); | ||
+ | $(document).ready(function() { | ||
+ | $('#calcb').click(function() { | ||
+ | var mutcounts = $.map($('#mutin').val().split(), parseInt); | ||
+ | if (mutcounts.some(isNaN)) { | ||
+ | alert('invalid value of mutant amount given'); | ||
+ | return; | ||
+ | } | ||
+ | var viablescounts = $.map($('#tcellsin').val().split(),parseInt); | ||
+ | if (viablescounts.some(isNaN)) { | ||
+ | alert('invalid value of number of viable cells'); | ||
+ | return; | ||
+ | } | ||
+ | if (mutcounts.length < 1 || viablescounts.length < 1) { | ||
+ | alert('must have at least one data member in each input'); | ||
+ | return; | ||
+ | } | ||
+ | if (mutcounts.length != viablescounts.length) { | ||
+ | alert('must have same number of data items in all inputs'); | ||
+ | return; | ||
+ | } | ||
+ | var tmutplates = 0; | ||
+ | for (var i = 0; i < mutcounts.length; i++) { | ||
+ | if (mutcounts[i] > 0) tmutplates++; | ||
+ | } | ||
+ | var hitspercell = Math.log(mutcounts.length / tmutplates); | ||
+ | var mutrate = hitspercell / viablescounts[0]; | ||
+ | $('#mutrate').html(mutrate.toString()); | ||
+ | }); | ||
}); | }); | ||
</script> | </script> | ||
- | + | </div> | |
</html> | </html> |
Latest revision as of 02:52, 26 August 2014
Small FALCOR-like program for mutational analysis
Mutants
Viable Cells
Results
Mean Mutational Events | 95% CI | Mutation Rate | 95% CI |
---|---|---|---|
1.4 | .1 | 10-3 | 10-4 |