Team:HokkaidoU Japan/Shuffling Kit/Primer Designer

From 2013.igem.org

(Difference between revisions)
Line 27: Line 27:
     <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
     <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
     <script type="text/javascript">
     <script type="text/javascript">
-
(function(){var i,e,c,a,f,d,h,g,b;a=function(j){switch(j){case"AA":case"TT":return -9.1;case"AT":return -8.6;case"TA":return -6;case"CA":case"TG":return -5.8;case"GT":case"AC":return -6.5;case"CT":case"AG":return -7.8;case"GA":case"TC":return -5.6;case"CG":return -11.9;case"GC":return -11.1;case"GG":case"CC":return -11}};g=function(j){var k,l,n,m;l=0;for(k=n=0,m=j.length-2;0<=m?n<=m:n>=m;k=0<=m?++n:--n){l+=a(j.slice(k,+(k+1)+1||9000000000))}return l};f=function(j){switch(j){case"AA":case"TT":return -24;case"AT":return -23.9;case"TA":return -16.9;case"CA":case"TG":return -12.9;case"GT":case"AC":return -17.3;case"CT":case"AG":return -20.8;case"GA":case"TC":return -13.5;case"CG":return -27.8;case"GC":return -26.7;case"GG":case"CC":return -26.6}};b=function(j){var k,l,n,m;l=0;for(k=n=0,m=j.length-2;0<=m?n<=m:n>=m;k=0<=m?++n:--n){l+=f(j.slice(k,+(k+1)+1||9000000000))}return l};i=function(j){var l,k;l=g(j);k=b(j);return(1000*l/(-10.8+k+1.987*-15.89495209964411))-273.15+16.6*-1.3010299956639813};c=function(k){var m,j,l;if(i(k.slice(0,35))<60){alert("Sequence is too short.")}for(m=l=17;l<=35;m=++l){j=i(k.slice(0,+(m-1)+1||9000000000));if(j>60){if(k[m-1]==="G"||k[m-1]==="C"){break}}}return[k.slice(0,+(m-1)+1||9000000000),j]};e=function(j){switch(j){case"A":return"T";case"T":return"A";case"G":return"C";case"C":return"G"}};h=function(k){var j;return((function(){var o,m,n,l;n=k.split("");l=[];for(o=0,m=n.length;o<m;o++){j=n[o];l.push(e(j))}return l})()).reverse().join("")};d=function(n,j,r){var o,k,m,p,q,l;o=c(r);k=c(h(r));m="TTTGGTCTCT"+n+"T"+o[0];q=o[1];p="TTTGGTCTCA"+j+"A"+k[0];l=k[1];return[m,q,p,l]};$(function(){return $("#primer-designer").submit(function(m){var l,k,p,n,j,o;m.preventDefault();k=$(this);l=k.find("button");l.attr("disabled",true);p=k.find('[name="overhang-f"]').val().toUpperCase();n=k.find('[name="overhang-r"]').val().toUpperCase();o=k.find('[name="sequence"]').val().toUpperCase();j=d(p,h(n),o);$("#primer-f").text(j[0]);$("#tm-f").text(j[1]);$("#primer-r").text(j[2]);$("#tm-r").text(j[3]);return l.attr("disabled",false)})})}).call(this);
+
(function(){var l,e,g,h,d,a,i,f,b,k,j,c;a=function(m){switch(m){case"AA":case"TT":return -9.1;case"AT":return -8.6;case"TA":return -6;case"CA":case"TG":return -5.8;case"GT":case"AC":return -6.5;case"CT":case"AG":return -7.8;case"GA":case"TC":return -5.6;case"CG":return -11.9;case"GC":return -11.1;case"GG":case"CC":return -11}};j=function(m){var n,o,q,p;o=0;for(n=q=0,p=m.length-2;0<=p?q<=p:q>=p;n=0<=p?++q:--q){o+=a(m.slice(n,+(n+1)+1||9000000000))}return o};i=function(m){switch(m){case"AA":case"TT":return -24;case"AT":return -23.9;case"TA":return -16.9;case"CA":case"TG":return -12.9;case"GT":case"AC":return -17.3;case"CT":case"AG":return -20.8;case"GA":case"TC":return -13.5;case"CG":return -27.8;case"GC":return -26.7;case"GG":case"CC":return -26.6}};c=function(m){var n,o,q,p;o=0;for(n=q=0,p=m.length-2;0<=p?q<=p:q>=p;n=0<=p?++q:--q){o+=i(m.slice(n,+(n+1)+1||9000000000))}return o};l=function(m){var o,n;o=j(m);n=c(m);return(1000*o/(-10.8+n+1.987*-15.89495209964411))-273.15+16.6*-1.3010299956639813};d=function(o){var q,m,p;if(l(o.slice(0,35))<60){alert("Sequence is too short.");return false}for(q=p=17;p<=35;q=++p){m=l(o.slice(0,+(q-1)+1||9000000000));if(m>60){if(o[q-1]==="G"||o[q-1]==="C"){break}}}return[o.slice(0,+(q-1)+1||9000000000),m]};h=function(m){switch(m){case"A":return"T";case"T":return"A";case"G":return"C";case"C":return"G"}};k=function(n){var m;return((function(){var r,p,q,o;q=n.split("");o=[];for(r=0,p=q.length;r<p;r++){m=q[r];o.push(h(m))}return o})()).reverse().join("")};f=function(q,m,u){var r,n,p,s,t,o;r=d(u);n=d(k(u));p="TTTGGTCTCT"+q+"T"+r[0];t=r[1];s="TTTGGTCTCA"+m+"A"+n[0];o=n[1];return[p,t,s,o]};g=function(m){if(/GGTCTC/.test(m)||/GGTCTC/.test(k(m))){return false}else{return true}};e=function(n){var m;m=/[ATCG]+/.exec(n);console.log(m);if(m[0]===n){return true}else{return false}};b=function(n){var m;m=n.val().toUpperCase();if(!e(m)){alert("You can NOT use non-AGCT characters.");n.focus();return false}if(!g(m)){alert("This sequence contains BsaI cutting site.");n.focus();return false}};$(function(){$('[name="overhang-f"]').focusout(function(){return b($(this))});$('[name="overhang-r"]').focusout(function(){return b($(this))});$('[name="sequence"]').focusout(function(){return b($(this))});return $("#primer-designer").submit(function(p){var o,n,s,q,m,r;p.preventDefault();n=$(this);o=n.find("button");o.attr("disabled",true);s=n.find('[name="overhang-f"]').val().toUpperCase();q=n.find('[name="overhang-r"]').val().toUpperCase();r=n.find('[name="sequence"]').val().toUpperCase();console.log(g(s));console.log(g(q));console.log(g(r));console.log(e(s));console.log(e(q));console.log(e(r));m=f(s,k(q),r);$("#primer-f").text(m[0]);$("#tm-f").text(m[1]);$("#primer-r").text(m[2]);$("#tm-r").text(m[3]);return o.attr("disabled",false)})})}).call(this);
     </script>
     </script>
   </body>
   </body>
</html>
</html>

Revision as of 14:03, 20 September 2013

Overhang_F
Overhang_R
Sequence

Forward

sequence
tm

Reverse

sequence
tm