Team:Harvard/ZF Binding Site Finder
From 2011.igem.org
(Difference between revisions)
Line 75: | Line 75: | ||
}); | }); | ||
+ | // findCustom function | ||
+ | $("#findcustom").click(function() { | ||
+ | |||
+ | //get DNA sequence | ||
+ | var testseq = $("#sequence").val(); | ||
+ | //to uppercase | ||
+ | testseq = testseq.toUpperCase(); | ||
+ | |||
+ | //get zinc finger arrays for searching | ||
+ | var bottomzf = $("#bottom").val(); | ||
+ | var topzf = $("#top").val(); | ||
+ | //to uppercase | ||
+ | bottomzf = bottomzf.toUpperCase(); | ||
+ | topzf = topzf.toUpperCase(); | ||
+ | |||
+ | var ntpCheck = /[GCTAN]{9}/; | ||
+ | if (!(bottomzf.match(ntpCheck)&& | ||
+ | topzf.match(ntpCheck)&& | ||
+ | (bottomzf.length=="9")&& | ||
+ | (topzf.length=="9"))){ | ||
+ | alert("You must enter a valid sequence of nine nucleotides containing G,T,C,A, or N."); | ||
+ | return; | ||
+ | } | ||
+ | |||
+ | //transform bottom zf to reverse complement | ||
+ | bottomzf = reverseComplement(bottomzf); | ||
+ | |||
+ | alert(bottomzf); | ||
+ | alert(topzf); | ||
+ | |||
+ | }); | ||
// end jQuery | // end jQuery |
Revision as of 18:52, 8 July 2011