Team:Harvard/ZF Binding Site Finder

From 2011.igem.org

(Difference between revisions)
Line 65: Line 65:
// clearForm function
// clearForm function
-
$(".graytext").click(function() {
+
$(".graytext").focus(function() {
if($(this)[0].defaultValue==$(this).val())
if($(this)[0].defaultValue==$(this).val())
Line 74: Line 74:
});
});
 +
 +
// reverse complement function
 +
function reverseComplement(sequence)
 +
{
 +
var output = "";
 +
 +
for(j=0;j<sequence.length;j++)
 +
{
 +
if(sequence.charAt(j) == "G")
 +
output = "C" + output;
 +
 +
if(sequence.charAt(j) == "C")
 +
output = "G" + output;
 +
 +
if(sequence.charAt(j) == "T")
 +
output = "A" + output;
 +
 +
if(sequence.charAt(j) == "A")
 +
output = "T" + output;
 +
 +
if(sequence.charAt(j) == "N")
 +
output = "N" + output;
 +
}
 +
 +
return output;
 +
 +
}
 +
// findCustom function
// findCustom function
Line 83: Line 111:
//get zinc finger arrays for searching
//get zinc finger arrays for searching
var bottomzf = $("#bottom").val().toUpperCase();
var bottomzf = $("#bottom").val().toUpperCase();
-
var topzf = $("#bottom").val().toUpperCase();
+
var topzf = $("#topsearch").val().toUpperCase();
 +
 
 +
//transform bottom zf to reverse complement
 +
bottomzf = reverseComplement(bottomzf);
 +
 
alert(bottomzf);
alert(bottomzf);
Line 154: Line 186:
     <option value="\w\w\w">NNN</option>
     <option value="\w\w\w">NNN</option>
</select><br />
</select><br />
-
<input type="text" id="top" value="Input NTPs here" class="graytext" />
+
<input type="text" id="topsearch" value="Input NTPs here" class="graytext" />
</td>
</td>
<td width="20%">
<td width="20%">

Revision as of 19:53, 8 July 2011

iGEM 2011 Zinc Finger Binding Site Finder

iGEM 2011 Zinc Finger Binding Site Finder

Justin Chew

Bottom Zinc Finger Array:

Top Zinc Finger Array:

Nucleotide Gap: