Team:EPF-Lausanne/PrimerDesignHelper

From 2012.igem.org

(Difference between revisions)
Line 5: Line 5:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="/Team:EPF-Lausanne/PrimerDesignHelper.js?action=raw&amp;ctype=text/javascript"></script>
<script type="text/javascript" src="/Team:EPF-Lausanne/PrimerDesignHelper.js?action=raw&amp;ctype=text/javascript"></script>
-
<script type="text/javascript">
 
-
var tails = [
 
-
{
 
-
name: "Biobrick (gene)",
 
-
value: "biobrickGene",
 
-
primer1Tail: "GTT TCT TCG AAT TCG CGG CCG CTT CTA G",
 
-
primer2Tail: "GTT TCT TCC TGC AGC GGC CGC TAC TAG TA TTA TTA",
 
-
messages: [
 
-
"Don't forget to include the first ATG and to exclude the stop codon!",
 
-
"The recommended minimum length of a BioBrick primer is 20bp",
 
-
"The recommended Tm of a BioBrick primer is between 55 and 65 °C",
 
-
"Check that the following restriction sites are absent: EcoRI, SpeI, XbaI, PstI, NotI",
 
-
"Check out <a href='http://openwetware.org/wiki/Synthetic_Biology:BioBricks/Part_fabrication'>OpenWetWare's reference page</a>"
 
-
],
 
-
validate: function(primer1, primer2){
 
-
var end = primer2.substr(0, 3).toUpperCase();
 
-
//        TAA            TGA            TAG
 
-
if(end == "TTA" || end == "TCA" || end == "CTA"){
 
-
return "<b>Remove the stop codons from the sequence!</b>"
 
-
}
 
-
}
 
-
},
 
-
{
 
-
name: "Biobrick (other)",
 
-
value: "biobrickOther",
 
-
primer1Tail: "GTT TCT TCG AAT TCG CGG CCG CTT CTA GAG",
 
-
primer2Tail: "GTT TCT TCC TGC AGC GGC CGC TAC TAG TA",
 
-
messages: [
 
-
"The recommended minimum length of a BioBrick primer is 20bp",
 
-
"The recommended Tm of a BioBrick primer is between 55 and 65 °C",
 
-
"Check that the following restriction sites are absent: EcoRI, SpeI, XbaI, PstI, NotI",
 
-
"Check out <a href='http://openwetware.org/wiki/Synthetic_Biology:BioBricks/Part_fabrication'>OpenWetWare's reference page</a>"
 
-
]
 
-
}
 
-
];
 
-
window.calc = function(){
 
-
var data = document.getElementById("data").value;
 
-
var isNormal = document.getElementById("primerTypeNormal").checked;
 
-
var isRS = document.getElementById("primerTypeRestrictionSites").checked;
 
-
var isKnown = document.getElementById("primerTypeKnownTail").checked;
 
-
var goalTm = document.getElementById("goalTm").value;
 
-
 
-
try{
 
-
var p = new Primer(data);
 
-
var validate = function(primer1, primer2){};
 
-
 
-
if(isRS){
 
-
p.setTails(Sequence.fromString(document.getElementById("primer1Tail").value), Sequence.fromString(document.getElementById("primer2Tail").value));
 
-
}
 
-
 
-
var messages = [];
 
-
if(isKnown){
 
-
var selected = $("#knownTailSelect").val();
 
-
 
-
var tail1 = "";
 
-
var tail2 = "";
 
-
 
-
for(var i = 0; i < tails.length; i++){
 
-
if(tails[i].value == selected){
 
-
tail1 = tails[i].primer1Tail;
 
-
tail2 = tails[i].primer2Tail;
 
-
if(tails[i].messages)
 
-
messages = [].concat(tails[i].messages);
 
-
if(tails[i].validate)
 
-
validate = tails[i].validate;
 
-
}
 
-
}
 
-
 
-
p.setTails(Sequence.fromString(tail1), Sequence.fromString(tail2));
 
-
}
 
-
 
-
var primers = p.generate(goalTm);
 
-
 
-
/*if(isRS){
 
-
var rand1 = Sequence.fromRandom($("#primerRandBases").val());
 
-
var rand2 = Sequence.fromRandom($("#primerRandBases").val());
 
-
primers.primer1 = rand1.toString()+" "+primers.primer1;
 
-
primers.primer2 = rand2.toString()+" "+primers.primer2;
 
-
primers.primer1Tailbp += rand1.length();
 
-
primers.primer2Tailbp += rand2.length();
 
-
}*/
 
-
 
-
var result = validate(primers.primer1NoTail, primers.primer2NoTail);
 
-
 
-
if(result)
 
-
messages.push(result);
 
-
 
-
if(messages.length > 0){
 
-
window.output({
 
-
primers: primers,
 
-
messages: messages
 
-
});
 
-
}else{
 
-
window.output({
 
-
primers: primers
 
-
});
 
-
}
 
-
}catch(e){
 
-
window.output({
 
-
error: e.message
 
-
});
 
-
}
 
-
};
 
-
window.output = function(options){
 
-
var output = {
 
-
message: [],
 
-
primer1: "No data",
 
-
primer1Temp: "NaN",
 
-
primer1bp: "NaN",
 
-
primer1Tailbp: "NaN",
 
-
primer2: "No data",
 
-
primer2Temp: "NaN",
 
-
primer2bp: "NaN",
 
-
primer2Tailbp: "NaN"
 
-
};
 
-
if(options.error){
 
-
output.message.push(options.error);
 
-
}
 
-
if(options.messages){
 
-
output.message = output.message.concat(options.messages);
 
-
}
 
-
if(options.primers){
 
-
for(var key in options.primers){
 
-
if(key == "message"){
 
-
output[key].push(options.primers[key]);
 
-
}else{
 
-
output[key] = options.primers[key];
 
-
}
 
-
}
 
-
}
 
-
 
-
if(Math.abs(output.primer1Temp - output.primer2Temp) > 5){
 
-
output.message.push("The difference is more than 5 °C");
 
-
}
 
-
 
-
if(Math.min(output.primer1Temp, output.primer2Temp) > 72){
 
-
output.message.push("Consider using the two-step PCR protocol");
 
-
}
 
-
 
-
if(Math.min(output.primer1Temp, output.primer2Temp) < 45){
 
-
output.message.push("The annealing temperature should be more than 45 °C");
 
-
}
 
-
 
-
document.getElementById("messages").innerHTML = output.message.length > 0 ? "<ul><li>"+output.message.join("</li><li>")+"</li></ul>" : "";
 
-
document.getElementById("primer1").innerHTML = output.primer1;
 
-
document.getElementById("primer1Temp").innerHTML = output.primer1Temp;
 
-
document.getElementById("primer1bp").innerHTML = output.primer1Tailbp != 0 && output.primer1Tailbp != "NaN" ? output.primer1Tailbp+" + "+output.primer1bp : output.primer1bp;
 
-
document.getElementById("primer2").innerHTML = output.primer2;
 
-
document.getElementById("primer2Temp").innerHTML = output.primer2Temp;
 
-
document.getElementById("primer2bp").innerHTML = output.primer2Tailbp != 0 && output.primer2Tailbp != "NaN" ? output.primer2Tailbp+" + "+output.primer2bp : output.primer2bp;
 
-
document.getElementById("annealingTemp").innerHTML = Math.min(output.primer1Temp, output.primer2Temp);
 
-
};
 
-
 
-
window.updateRadioElements = function(){
 
-
if(document.getElementById('primerTypeRestrictionSites').checked){
 
-
$('#restrictionSiteRow').show();
 
-
}else{
 
-
$('#restrictionSiteRow').hide();
 
-
}
 
-
if(document.getElementById('primerTypeKnownTail').checked){
 
-
$('#knownTailRow').show();
 
-
}else{
 
-
$('#knownTailRow').hide();
 
-
}
 
-
};
 
-
</script>
 
<h1>Primer design helper</h1>
<h1>Primer design helper</h1>
<p>
<p>

Revision as of 21:59, 10 July 2012

Primer design helper

Warning: This is a very basic tool and should not be seen as a replacement for your brain. This is in no way a complete tool for primer design and shouldn't be trusted! Always check the results yourself. The Tm calculation is based on Belsauer et al. 1986 (with some small modifications, inspired by http://www.basic.northwestern.edu/biotools/oligocalc.html) and has as a goal to stay close (this means within 3-6 °C) to the results found by the NEB Phusion HF-PCR reference. The tail is ignored in the Tm calculation. Also take a look at iGEM's primer design page.

Known limitations are: only A, C, G and T are accepted as input, the concentration of salts(30mM of Na+), and the primer concentration (500nM) can't be set.

Paste the sequence you want to PCR out in the following textarea:

Give some more info about what you want to do:

Primer type

Goal Tm °C

Result:


Primer 1 (NaN °C, NaNbp): 5' - No data → 3'
Primer 2 (NaN °C, NaNbp): 5' - No data → 3'
Annealing temp: NaN °C