[Bioperl-l] naive question about Bio::Tools::Primer3
chad at dieselwurks.com
Tue Mar 15 11:31:21 EST 2005
> How do I best get the individual result lines from the primer3 output
> file, using Bio::Tools::Primer3?
> I'll include the script I tried and the file it parsed.
> When I run it, I get "HASH(0xccfc)".
> #!/usr/bin/perl -w
> use lib "/Users/Ned/Documents/Perl/bioperl_source/bioperl-1.4";
> use Bio::AlignIO;
> use Bio::Tools::Primer3;# read a primer3 output file
> my $primer3=Bio::Tools::Primer3->new(-file=>"p3test1.out");
> #put the left- and right-primer stuff into hashes.
> my $primer=$primer3->next_primer;
> print "The right primer in the stream is ",
> $primer->get_primer('-right_primer')->seq->seq, "\n";
> # to return results
> print $primer3->primer_results(0,'PRIMER_LEFT_INPUT');
I added a couple of examples into t/primer3.t on how this can be done.
Everything is fine in your script until the primer_results line.
The answer to your question is to *not* use the method primer_results()
because that method does not actually create Bio::Seq::PrimedSeq
objects. You should be accessing primers from the stream by the
Further to that I think that the method primer_results should be renamed
to _primer_results to indicate that it is a private method.
Does anybody object?
More information about the Bioperl-l