Team:Harvard/ZF Binding Site Finder

From 2011.igem.org

(Difference between revisions)
Line 1: Line 1:
 +
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
Line 101: Line 102:
return output;
return output;
 +
}
 +
 +
// findSites function
 +
$("#findsites").click(function() {
 +
 +
//get DNA sequence
 +
var testseq = $("#sequence").val().toUpperCase();
 +
 +
//get zinc finger arrays for searching
 +
var zf11 = $("#11").val();
 +
var zf12 = $("#12").val();
 +
var zf13 = $("#13").val();
 +
var zf21 = $("#21").val();
 +
var zf22 = $("#22").val();
 +
var zf23 = $("#23").val();
 +
 +
//start building regular expression from ZF fingers
 +
var siteExp = "(" + zf23 + zf22 + zf21;
 +
 +
//add in x NTPs between first and second finger
 +
var nucgap = $("#gap").value;
 +
for(i=0;i<nucgap;i++){
 +
siteExp = siteExp + "\\w";
 +
}
 +
 +
//finish building regular expression
 +
siteExp = siteExp + zf11 + zf12 + zf13 + "){1}";
 +
 +
//construct regular expression and find all instances of desired sequence in the test sequence
 +
var array1 = new RegExp(siteExp, "gi");
 +
var array2 = testseq.match(array1);
 +
 +
//error message if no sequences found
 +
if(testseq.search(array1) == -1)
 +
{
 +
$("#results").html("No results found.");
 +
//if results are found, build table to display results
 +
} else {
 +
 +
var revComp = "";
 +
var seqtwo = "";
 +
 +
table = "<table><tr><td colspan='4'><b>Zinc Finger Binding Site Candidates</b></td></tr><td><b>Location</b></td><td><b>Bottom Sequence</b></td><td><b>Top Sequence</b></td><td><b>Entire Sequence (top strand perspective)</b></td>";
 +
 +
for(i=0;i<array2.length;i++)
 +
{
 +
array1.test(testseq);
 +
 +
table = table + "<tr>";
 +
//subtract 18 nucleotides, nucgap inter-ZF nucleotides, +1 for index correction for location of binding site
 +
table = table + "<td>" + (array1.lastIndex - 18 - nucgap) + "</td>";
 +
seqbottom = reverseComplement(array2[i].substring(0,9));
 +
table = table + "<td>" + seqbottom + "</td>";
 +
table = table + "<td>" + array2[i].substring(array2[i].length - 9,array2[i].length) + "</td>";
 +
table = table + "<td>" + array2[i] + "</td>";
 +
table = table + "</tr>";
 +
}
 +
 +
table = table + "</table><br /><br />"
 +
 +
$("#results").html(table);
 +
}
}
}
Line 253: Line 316:
</tr>
</tr>
<tr><td colspan="3">
<tr><td colspan="3">
-
<input type="button" value="Test (drop down menu)" onClick="findSites();" />
+
<input type="button" id="findsites" value="Test (drop down menu)" />
<input type="button" id="findcustom" value="Test custom input" />
<input type="button" id="findcustom" value="Test custom input" />
<input type="button" value="Show me ALL binding sites!" onClick="findAllSites();" id="allsites"/>
<input type="button" value="Show me ALL binding sites!" onClick="findAllSites();" id="allsites"/>

Revision as of 03:58, 9 July 2011

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 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: