[Bioperl-l] Issues on Bio::Tools::Primer3->next_primer
John M.C. Ma
manchunjohn-ma at uiowa.edu
Tue Jul 29 13:22:09 EDT 2008
Maybe I wasn't clear with my script fragment, I used Bioperl to run Primer3.
The following is as much Primer3-related as I can get:
[snips other use declarations and Ensembl scripts]
my $primer3_handle=Bio::Tools::Run::Primer3->new(-path=>'[Primer3 path]');
/*%gene_info is a hash that stores sequence information*/
[snips other options] )
Hope this helps.
On Tue, Jul 29, 2008 at 5:26 AM, Roy Chaudhuri <roy.chaudhuri at gmail.com>wrote:
> Hi John,
> I'm not sure if you want to run Primer3 using BioPerl, or just use BioPerl
> to parse an existing Primer3 output file.
> For the former you need to specify a target using the -seq argument when
> you create your Bio::Tools::Run::Primer3 object (the argument value should
> be a Bio::Seq object). It's also possible to add the sequence between the
> new() and run() methods using add_targets(), but you snipped out that
> section so I can't tell if you did that and there is some other problem. The
> run() method does not seem to check if a target sequence is present, hence
> you only get an error when you call next_primer() on the returned
> Bio::Tools::Primer3 object.
> If you just want to parse an existing Primer3 output file then you need to
> use Bio::Tools::Primer3, specifying the path to the ouput file using the
> -file argument to new(). The documentation to Bio::Tools::Run::Primer3:
> suggests that you can also provide a -file argument in that module, but
> there doesn't seem to be any evidence of that in the code.
> Hope this helps.
> Dr. Roy Chaudhuri
> Department of Veterinary Medicine
> University of Cambridge, U.K.
> I am trying a generic script to parse outputs for Primer3 results from
>> use Bio::Tools::Run::Primer3;
>> use Bio::Tools::Primer3;
>> use Bio::Seq::PrimedSeq;
>> my $primer3_handle=Bio::Tools::Run::Primer3->new(-path=>'foobar');
>> my $primer3_results=$primer3_handle->run();
>> my $primer_test=$primer3_results->next_primer;
>> Which is similar to what was on the docs, but when Perl gives the
>> error at running next_primer:
>> ------------- EXCEPTION: Bio::Root::Exception -------------
>> MSG: No target sequence
>> STACK: Error::throw
>> STACK: Bio::Root::Root::throw
>> STACK: Bio::Tools::Primer3::next_primer
>> STACK: /home/johnma/workspace/NCBI-test/NCBI-test.pl:208
>> Whereas line 208 is the line that contained the next_primer.
>> I tried to access the results manually by primer_results() and
>> fields, but the output of primer_results() is a hash and not very
>> for further processing. Is there a way that I can go back to
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
More information about the Bioperl-l