[Bioperl-l] What is the relationship between primer3 module andrun-primer3 module?

Wiersma, Paul WiersmaP at AGR.GC.CA
Fri May 12 00:13:12 UTC 2006


Li,

If you are only "a little confused" by the OO concepts in the primer3 modules than you are doing well.

To expand a little on Wenwu's explanations.  A Bio::Tools::Run:Primer3 object is a "wrapper" around the Primer3 program. All the commands and parameters that Primer3 needs for it to run are collected inside the object.  This includes a sequence (which you must supply as a sequence object) and parameters (most of which are already supplied by default but can be changed using the $primer3_object->add_targets method). Then, when everything is set the way you want it you 'run' the Primer3 program by using $primer3_object->run.  The "wrapper" collects all the run parameters and sends them off to the Primer3 executable.  Primer3 does the analysis and outputs the results to "stdout" in boulder-io format.  By redirecting the output (i.e. perl p3run_script.pl > out.txt) you will get the Primer3 output directly in the  boulder-io format ('tag'='value') stored in out.txt.  Because out.txt is not being closed between each sequence called in the script you get all of the results concatenated in out.txt.  However, if you supplied an output filename (-outfile=>$file_out) in the "wrapper", each line of output from Primer3 will be written to $file_out and at the end of Primer3 output the file will be closed.  Now if your script loops to another sequence it will open the same outfile again and overwrite.  

One last important detail for the "wrapper" object.  When Primer3 is executed the $primer3_object is designed to return a Bio::Tools::Primer3 object (the code is: my $results_object = $primer3_object->run).  $results_object is a Bio::Tools::Primer3 object and contains the results of your Primer3 run as well as having methods for getting at that information.  This includes finding out how many primer sets were found and the means to access the primer set results one at a time.  It does work as advertised.  Because all of the primer sets are based on the same sequence, Primer3 only outputs the SEQUENCE and PRIMER_SEQUENCE_ID one time instead of for each primer set.  That is why they only show up in $results_object as if they belonged with the first primer set (set '0') and they are not available for the other primer sets.

PAW

Paul A. Wiersma
Agriculture and Agri-Food Canada/Agriculture et Agroalimentaire Canada
Summerland, BC
wiersmap at agr.gc.ca
 
 



-----Original Message-----
From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of chen li
Sent: Wednesday, May 10, 2006 5:28 PM
To: bioperl-l at bioperl.org
Subject: [Bioperl-l] What is the relationship between primer3 module andrun-primer3 module?

First thank you all for replying my previous post
about primer3.

But now I am a little confused even after I read the
documents: What is the relationship between these two
modules? What is correct/standard way to use them to
do the batch-primer design? What I do is that I use
Bio::Tools::Run::Primer3 to design primers. Based on
Dr. Roy Chaudhuri's information I can set the
parameters using the following syntax:

$primer3->add_targets(PRIMER_PRODUCT_SIZE_RANGE=>'490-510');

Based on Paul A. Wiersma's explanation I can also
print out part of the primer results(because I don't
need all the information). But there is a little
trouble: PRIMER_SEQUENCE_ID can't be accessed using
this method. And Paul points out that
"PRIMER_SEQUENCE_ID and SEQUENCE are not part of the
individual 
results but only end up by default with
$results->primer_results(0)".  So it seems there is no
way to get around this problem using
Bio::Tools::Run::Primer3. And others suggest using
Bio::Tools::Primer3 to parse the results. So is true
that Bio::Tools::Run::Primer3 is for primer design and
Bio::Tools::Primer3 is for parsing the results from
Bio::Tools::Run::Primer3? But what I find is that I
get almost all the results (except PRIMER_SEQUENCE_ID
and SEQUENCE ) without providing a line code

use Bio::Tools::Primer3 

in the script.  How to explain this? Is it because the
following line code?

my $result=$primer3->run; 

The last question: which line code is used to invoke
program primer3.exe? How does Perl script call the
primer3.exe?

Once again thank you all very much,

Li 

 






__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list