Team:Harvard/ZF Binding Site Finder

From 2011.igem.org

(Difference between revisions)
Line 22: Line 22:
{
{
display: none;
display: none;
 +
}
 +
 +
.helpfile
 +
{
 +
    display: none;
}
}
Line 111: Line 116:
}
}
-
 
-
// 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").val();
 
-
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);
 
-
}
 
-
});
 
// findCustom function
// findCustom function
Line 347: Line 290:
}
}
});
});
 +
 +
// toggle help display
 +
$(".showhelp").click(function(){
 +
    alert("hi");
 +
    $(".helpfile").slideToggle("slow");
 +
  });
 +
});
 +
// end jQuery
// end jQuery
Line 361: Line 312:
<table id="ui">
<table id="ui">
<tr><td colspan="3">
<tr><td colspan="3">
-
   <textarea id="sequence" rows="8" cols="80" class="graytext" >Insert DNA sequence here</textarea>
+
   <textarea id="sequence" rows="8" cols="60" class="graytext">Insert DNA sequence here</textarea>
</td></tr>
</td></tr>
<tr>
<tr>
Line 382: Line 333:
</tr>
</tr>
<tr><td colspan="3">
<tr><td colspan="3">
-
<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" id="findallsites" value="Show me ALL binding sites!" />
+
<input type="button" id="findallsites" value="Show me all binding sites" />
</td></tr>
</td></tr>
</table>
</table>
</form>
</form>
 +
<div class="showhelp">How do I use this tool? (Click to toggle help)</div>
 +
<div class="helpfile">Blah</div>
<br />
<br />
<div id="results"></div>
<div id="results"></div>

Revision as of 15:54, 12 August 2011

bar

Zinc Finger Binding Site Finder

Zinc Finger Binding Site Finder

by Justin Chew

Bottom Zinc Finger Array:
Top Zinc Finger Array:
Nucleotide Gap:

 
How do I use this tool? (Click to toggle help)
Blah