|
|
Line 1: |
Line 1: |
- | {{:Team:UT-Tokyo/Template/Style}}
| |
- | <html>
| |
- | <link
| |
- | href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,300italic,400,600,700'
| |
- | rel='stylesheet' type='text/css'>
| |
| | | |
- | <div id="global_wrapper">
| |
- | <div id="header">
| |
- | <div class="logo">
| |
- | <img
| |
- | src="https://static.igem.org/mediawiki/2013/9/93/Clock_ecoli_paper5.png"
| |
- | height="120px">
| |
- | </div>
| |
- | <div class="wrapper">
| |
- | <div class="box">Thanks for your visiting our team wiki!</div>
| |
- | </div>
| |
- | </html>
| |
- | {{:Team:UT-Tokyo/Template/Header1|subpagename=TEAM}}
| |
- | <html>
| |
- | <div id="contents">
| |
- | <h1>Wiki Freeze</h1>
| |
- | <script type="text/javascript">
| |
- | String.prototype.lengthByte = function() {
| |
- | var str = this;
| |
- | var r = 0;
| |
- | for ( var i = 0; i < str.length; i++) {
| |
- | var c = str.charCodeAt(i);
| |
- | if ((c >= 0x0 && c < 0x81) || (c == 0xf8f0)
| |
- | || (c >= 0xff61 && c < 0xffa0)
| |
- | || (c >= 0xf8f1 && c < 0xf8f4)) {
| |
- | r += 1;
| |
- | } else {
| |
- | r += 2;
| |
- | }
| |
- | }
| |
- | return r;
| |
- | }
| |
- |
| |
- | String.prototype.repeat = function(n) {
| |
- | return new Array(n + 1).join(this);
| |
- | }
| |
- |
| |
- | String.prototype.replaceAll = function(str1, str2) {
| |
- | var temp = this;
| |
- | while (temp.indexOf(str1) != -1) {
| |
- | temp = temp.replace(str1, str2);
| |
- | }
| |
- | ;
| |
- | return temp;
| |
- | };
| |
- |
| |
- | function getWrappedText(str) {
| |
- | var len = Math.floor(str.lengthByte() / 2);
| |
- | return "_" + ("人".repeat(len + 2)) + "_<br />" + "> " + str
| |
- | + " <<br />" + " ̄Y" + ("^Y".repeat(len)) + " ̄";
| |
- | }
| |
- |
| |
- | function getReverseSeq(str) {
| |
- | //先頭24塩基を抽出してアンチセンスを返す
| |
- | var rev = "";
| |
- | var min = 24;
| |
- | if (str.length < 24) {
| |
- | min = str.length;
| |
- | }
| |
- | for ( var i = 0; i < min; i++) {
| |
- | var c = str.charAt(i);
| |
- | if (c.indexOf("A") !== -1) {
| |
- | c = "T";
| |
- | } else if (c.indexOf("T") !== -1) {
| |
- | c = "A";
| |
- | } else if (c.indexOf("C") !== -1) {
| |
- | c = "G";
| |
- | } else if (c.indexOf("G") !== -1) {
| |
- | c = "C";
| |
- | } else if (c.indexOf("a") !== -1) {
| |
- | c = "t";
| |
- | } else if (c.indexOf("t") !== -1) {
| |
- | c = "a";
| |
- | } else if (c.indexOf("c") !== -1) {
| |
- | c = "g";
| |
- | } else if (c.indexOf("g") !== -1) {
| |
- | c = "c";
| |
- | }
| |
- | rev = c + rev;
| |
- | }
| |
- |
| |
- | return rev;
| |
- | }
| |
- |
| |
- | function getFP(str) {
| |
- | var anti = getReverseSeq(str);
| |
- | var forward = anti.substring(7, 24) + "tttctgttgggccattgcattgcc";
| |
- | return forward;
| |
- | }
| |
- |
| |
- | function getRP(str) {
| |
- | var anti = getReverseSeq(str);
| |
- | var reverse = str.substring(7, 24) + getReverseSeq("tactagag")
| |
- | + getReverseSeq("acctctggcggtgataatggttgc");
| |
- |
| |
- | return reverse;
| |
- | }
| |
- |
| |
- | function getForwardOnly(str) {
| |
- | var anti = getReverseSeq(str);
| |
- | anti = "ggatctagag" + anti + "tttctgttgggccattgcattgcc";
| |
- | return anti;
| |
- | }
| |
- |
| |
- | function getReverse(str) {
| |
- | var rev = "";
| |
- | for ( var i = 0; i < str.length; i++) {
| |
- | var c = str.charAt(i);
| |
- | rev = c + rev;
| |
- | }
| |
- |
| |
- | return rev;
| |
- |
| |
- | }
| |
- |
| |
- | function onClick() {
| |
- | document.getElementById('sequence').innerHTML = "5'- "
| |
- | + document.gen.argtext.value + " -3' (CDS)";
| |
- | var reverse = getReverse(document.gen.argtext.value);
| |
- | while (reverse.length < 34) {
| |
- | reverse = "-" + reverse;
| |
- | }
| |
- | document.getElementById('reverse').innerHTML = "3'- " + reverse
| |
- | + " -5' (CDS)";
| |
- | var forwardonly = getForwardOnly(document.gen.argtext.value);
| |
- | var interaction = "--------------||||||||||||||||||||||||";
| |
- | while (forwardonly.length - reverse.length < 24) {
| |
- | forwardonly = "-" + forwardonly;
| |
- | interaction = "-" + interaction;
| |
- | }
| |
- | document.getElementById('interaction').innerHTML = interaction;
| |
- | document.getElementById('generated').innerHTML = "5'- "
| |
- | + forwardonly + " -3' (Forward Primer for BioBrick)";
| |
- |
| |
- | var fp = "---------------------------------------"
| |
- | + getFP(document.gen.argtext.value);
| |
- | var int2 = "-------------------------------------------||||||||||";
| |
- | var rp = getRP(document.gen.argtext.value);
| |
- | document.getElementById('fp').innerHTML = "5'- " + fp
| |
- | + " -3' (Forward Primer for Inverse PCR)";
| |
- | document.getElementById('int2').innerHTML = int2;
| |
- | document.getElementById('rp').innerHTML = "5'- " + rp
| |
- | + " -3' (Reverse Primer for Inverse PCR)";
| |
- | document.getElementById('rp_rev').innerHTML = "3'- "
| |
- | + getReverse(rp) + " -5' (Reverse Primer for Inverse PCR)";
| |
- | }
| |
- |
| |
- | function tweet() {
| |
- | window.open("https://twitter.com/intent/tweet?text="
| |
- | + encodeURIComponent(getReverseSeq(
| |
- | document.gen.argtext.value).replaceAll("<br />",
| |
- | "\n")
| |
- | + "\n")
| |
- | + "&url=http://kenkoooo.com/wikifreeze.html");
| |
- | }
| |
- | </script>
| |
- | <form name="gen" action="#">
| |
- | <input type="text" name="argtext"
| |
- | value="ATGCATGCATGCATGCATGCATGCATGCATGC" /> <input type="button"
| |
- | value="generate" onclick="onClick()" />
| |
- | </form>
| |
- | <div style="font-family: monospace;">
| |
- | <p id="sequence">Wiki Freeze</p>
| |
- | <p id="reverse" style="margin: 0px;">Wiki Freeze</p>
| |
- | <p id="interaction" style="margin: 0px;">Wiki Freeze</p>
| |
- | <p id="generated" style="margin: 0px;">Wiki Freeze</p>
| |
- | <p></p>
| |
- | <p id="fp" style="margin: 0px;">Wiki Freeze</p>
| |
- | <p id="int2" style="margin: 0px;">Wiki Freeze</p>
| |
- | <p id="rp_rev" style="margin: 0px;">Wiki Freeze</p>
| |
- | <p id="rp">Wiki Freeze</p>
| |
- | </div>
| |
- |
| |
- |
| |
- | </div>
| |
- | </div>
| |
- |
| |
- | <div id="footer"></div>
| |
- |
| |
- | </div>
| |
- | </body>
| |
- |
| |
- | </html>
| |