Team:UT-Tokyo/test.html

From 2013.igem.org

(Difference between revisions)
(Created page with "{{: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'> <d...")
 
(36 intermediate revisions not shown)
Line 19: Line 19:
<html>
<html>
<div id="contents">
<div id="contents">
 +
<h2>Automatic RNA silencing primer designer</h2>
<script type="text/javascript">
<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) {
function getReverseSeq(str) {
//先頭24塩基を抽出してアンチセンスを返す
//先頭24塩基を抽出してアンチセンスを返す
Line 96: Line 62:
function getRP(str) {
function getRP(str) {
-
var anti = getReverseSeq(str);
+
var reverse = str.substring(7, 24);
-
var reverse = str.substring(7, 24) + getReverseSeq("tactagag")
+
-
+ getReverseSeq("acctctggcggtgataatggttgc");
+
return reverse;
return reverse;
-
}
 
-
 
-
function getForwardOnly(str) {
 
-
var anti = getReverseSeq(str);
 
-
anti = "ggatctagag" + anti + "tttctgttgggccattgcattgcc";
 
-
return anti;
 
}
}
Line 122: Line 80:
function onClick() {
function onClick() {
document.getElementById('sequence').innerHTML = "5'- "
document.getElementById('sequence').innerHTML = "5'- "
-
+ document.gen.argtext.value + " -3' (CDS)";
+
+ document.gen.argtext.value + " -3'";
var reverse = getReverse(document.gen.argtext.value);
var reverse = getReverse(document.gen.argtext.value);
-
while (reverse.length < 34) {
+
var forwardonly = "<p style=\"display:inline;color: #3CB371;\">ggatctagag</p>"
-
reverse = "-" + reverse;
+
+ getReverseSeq(document.gen.argtext.value)
-
}
+
+ "<p style=\"display:inline;color: #1E90FF;\">tttctgttgggccattgcattgcc</p>";
-
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'- "
document.getElementById('generated').innerHTML = "5'- "
-
+ forwardonly + " -3' (Forward Primer for BioBrick)";
+
+ forwardonly + " -3'";
 +
}
 +
 
 +
function onClick2() {
 +
document.getElementById('sequence2').innerHTML = "5'- "
 +
+ document.gen2.argtext2.value + " -3'";
-
var fp = "---------------------------------------"
+
var fp = getFP(document.gen2.argtext2.value);
-
+ getFP(document.gen.argtext.value);
+
var rp = getRP(document.gen2.argtext2.value)
-
var int2 = "-------------------------------------------||||||||||";
+
+ getReverseSeq("tactagag")
-
var rp = getRP(document.gen.argtext.value);
+
+ getReverseSeq("acctctggcggtgataatggttgc");
-
document.getElementById('fp').innerHTML = "5'- " + fp
+
document.getElementById('fp').innerHTML = "5'- " + fp + " -3'";
-
+ " -3' (Forward Primer for Inverse PCR)";
+
document.getElementById('rp').innerHTML = "5'- " + rp + " -3'";
-
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 submitStop(e) {
 +
if (!e)
 +
var e = window.event;
-
function tweet() {
+
if (e.keyCode == 13)
-
window.open("https://twitter.com/intent/tweet?text="
+
return false;
-
+ encodeURIComponent(getReverseSeq(
+
-
document.gen.argtext.value).replaceAll("<br />",
+
-
"\n")
+
-
+ "\n")
+
-
+ "&url=http://kenkoooo.com/wikifreeze.html");
+
}
}
</script>
</script>
-
<form name="gen" action="#">
+
<form name="gen">
<input type="text" name="argtext"
<input type="text" name="argtext"
-
value="ATGCATGCATGCATGCATGCATGCATGCATGC" /> <input type="button"
+
value="ATGCATGCATGCATGCATGCATGCATGCATGC"
-
value="generate" onclick="onClick()" />
+
onKeyPress="onClick();return submitStop(event);" /> <input
 +
type="button" value="generate" onclick="onClick()" />
</form>
</form>
-
<div style="font-family: monospace;">
+
 
-
<p id="sequence">Wiki Freeze</p>
+
<div>
-
<p id="reverse" style="margin: 0px;">Wiki Freeze</p>
+
<h3>CDS</h3>
-
<p id="interaction" style="margin: 0px;">Wiki Freeze</p>
+
<p id="sequence"></p>
-
<p id="generated" style="margin: 0px;">Wiki Freeze</p>
+
<h3>Forward Primer for BioBrick</h3>
-
<p></p>
+
<p id="generated"></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>
 +
<form name="gen2">
 +
<input type="text" name="argtext2"
 +
value="ATGCATGCATGCATGCATGCATGCATGCATGC"
 +
onKeyPress="onClick2();return submitStop(event);" /> <input
 +
type="button" value="generate" onclick="onClick2()" />
 +
</form>
 +
 +
<div>
 +
<h3>CDS</h3>
 +
<p id="sequence2"></p>
 +
<h3>Forward Primer for Inverse PCR</h3>
 +
<p id="fp"></p>
 +
<h3>Reverse Primer for Inverse PCR</h3>
 +
<p id="rp"></p>
 +
</div>
</div>
</div>
Line 185: Line 144:
</div>
</div>
-
</body>
+
<p>
-
 
+
</html>
</html>

Latest revision as of 03:34, 28 September 2013

           TEAM
       

Automatic RNA silencing primer designer

CDS

Forward Primer for BioBrick

CDS

Forward Primer for Inverse PCR

Reverse Primer for Inverse PCR