-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This stuff is still in development. These are just some quick notes - I'll try and add more details later.
All of the primer design stuff is based on https://github.com/cjfields/Bio-Tools-Primer3Redux.
Basically the workflow is:
- Choose a SeqFetcher to get the sequences you want to design primers to.
- Choose PreProcesses to do stuff to sequences before you run primer3 (like adding sequence-specific primer3 parameters).
- Choose PostProcesses to do stuff to primers after you've run primer3 (like filtering out anything that has too high an Unafold Tm, or export primer information to files, draw results etc.
If you want to use stuff in a script, all classes should have Perldoc and t/02.t has some tests that use the various components.
bin/design_primers.pl
will let you run the entire primer design process from the command line.
design_primers.pl --help
will get you some info on how to use it.
design_primers.pl --list_seq_fetchers
will give you a list of all the installed sequence fetchers
design_primers.pl --list_pre_process
will give you a list of all the installed pre processes
design_primers.pl --list_post_process
will give you a list of all the installed post processes
You can only define a single SeqFetcher, but you can have multiple pre and post processes. These will be run in the order you specify them on the command line.
Parameters for Primer3 and for the SeqFetchers, Pre and Post processes can be specified in a config file. This should be a JSON formatted file. Primer3 settings should be keyed "Primer3" hash. Other settings are keyed on the name of the package, for example:
{
"Primer3" : {
"PRIMER_TASK" : "pick_detection_primers",
"PRIMER_PICK_LEFT_PRIMER" : 1,
"PRIMER_PICK_RIGHT_PRIMER" : 1,
"PRIMER_NUM_RETURN" : 20,
"PRIMER_PRODUCT_SIZE_RANGE" : "100-1000",
"PRIMER_MIN_SIZE" : 18,
"PRIMER_OPT_SIZE" : 20,
"PRIMER_MAX_SIZE" : 27,
"PRIMER_MIN_GC" : 40,
"PRIMER_MAX_GC" : 100,
"PRIMER_OPT_GC_PERCENT" : 60,
"PRIMER_MIN_TM" : 57,
"PRIMER_OPT_TM" : 60,
"PRIMER_MAX_TM" : 70,
"PRIMER_PAIR_MAX_DIFF_TM" : 1,
"PRIMER_TM_FORMULA" : 1,
"PRIMER_SALT_CORRECTIONS" : 1,
"PRIMER_SALT_MONOVALENT" : 50,
"PRIMER_SALT_DIVALENT" : 0,
"PRIMER_MAX_TEMPLATE_MISPRIMING" : 10,
"PRIMER_MAX_NS_ACCEPTED" : 0,
"PRIMER_MAX_POLY_X" : 5
},
"Bio::SeqFetcher::Ensembl::TranscriptIDtocDNASeq::WithExons" : {
"species" : "mouse"
},
"Bio::SeqFetcher::Ensembl::GeneIDtoGenomicSeq" : {
"species" : "mouse"
},
"Bio::SeqFetcher::Ensembl::GeneIDtoGenomicSeq::Promoter" : {
"species" : "mouse",
"upstream" : 1000,
"downstream" : 1000
},
"Bio::SeqFetcher::Ensembl::TranscriptIDtocDNASeq::WithExons" : {
"species" : "mouse"
},
"Bio::SeqFetcher::Ensembl::TranscriptIDtocDNASeq" : {
"species" : "mouse"
},
"Buckley::PrimerDesigner::PostProcess::UnafoldMelt" : {
"max_tm" : 70,
"program_name" : "melt.pl",
"NA" : "DNA",
"sodium" : 0.05,
"temperature" : 60,
"magnesium" : 0.003
}
}
}
Examples:
Design to the promoter region around an ensembl gene and use a post-processor to check the UNAfold Tms of the resulting primers:
design_primers.pl --seq_fetcher 'Bio::SeqFetcher::Ensembl::GeneIDtoGenomicSeq::Promoter' \
--post_process 'Buckley::PrimerDesigner::PostProcess::UnafoldMelt' \
--config example_config.json --identifier 'ENSMUSG00000029249' \
--identifier 'ENSMUSG00000014773'
Get the transcript sequence for an Ensembl transcript, annotated with exon boundaries. Use a pre-process to flag the exon boundaries as primer3 target sequences. Design primers. Use a post processor to check the UNAfold Tms of the resulting primers:
design_primers.pl --config example_config.json \
--seq_fetcher 'Bio::SeqFetcher::Ensembl::TranscriptIDtocDNASeq::WithExons' \
--identifier 'ENSMUST00000014917' \
--pre_process 'Buckley::PrimerDesigner::PreProcess::OverlapExonBoundaries' \
--post_process 'Buckley::PrimerDesigner::PostProcess::UnafoldMelt'