bioperl / bioperl-live-redmine

Legacy tickets migrated from the OBF Redmine issue tracker: http://redmine.open-bio.org
0 stars 0 forks source link

Bio::Tools::Primer3 - Exception raised with Primer3 2.3.X #152

Closed cjfields closed 8 years ago

cjfields commented 9 years ago

Author Name: Aurélien Bernard (Aurélien Bernard) Original Redmine Issue: 3457, https://redmine.open-bio.org/issues/3457 Original Date: 2014-01-15 Original Assignee: Bioperl Guts


Hi BioPerl users/developpers,

First of all, I’m sorry if I picked the wrong Category (I didn’t find a Bio-Tools category).

_Some information about my configuration:_

+Bug description:+

The following exception raises when I try to parse a standard Primer3 2.3.6 result file with Bio::Tools::Primer3

——————- EXCEPTION: Bio::Root::Exception ——————- MSG: No target sequence STACK: Error::throw STACK: Bio::Root::Root::throw /usr/share/perl5/Bio/Root/Root.pm:472 STACK: Bio::Tools::Primer3::next_primer /usr/share/perl5/Bio/Tools/Primer3.pm:316

_Explanation:_

In the last version of Primer3, the “SEQUENCE” entry/key of the Primer3 input file is replaced by a _“SEQUENCETEMPLATE” entry/key.

If I have a SEQUENCE=ACGT\* line in addition of the _SEQUENCETEMPLATE=ACGT\* line, then Bio::Tools::Primer3 works as expected (but there is a duplicated information in my Primer3 input file).

However, if I only use the requested _SEQUENCETEMPLATE line alone, then Bio::Tools::Primer3 raises the above exception.

_Possible fix:_

I had a look at the code of this module on the webCVS and IMHO, the problem comes from an if statement in the _readfile method (line 271):

if (uc($return) eq "SEQUENCE") {

This line search for the SEQUENCE key/entry only.

A simple fix should be to search for both the SEQUENCE and the _SEQUENCETEMPLATE keys to be compatible with most Primer3 2.X result files.

Thanks in advance for the correction,

Best regards,

A.B

cjfields commented 9 years ago

Original Redmine Comment Author Name: Chris Fields Original Date: 2014-01-15T17:10:05Z


The problem is, the parameters used by Primer3 v1 differ considerably from v2 and up; in other words, it was a major API change. This (among other things re: the original module) necessitated a redesigned Primer3 module and wrapper released under a separate CPAN distribution:

https://metacpan.org/pod/Bio::Tools::Primer3Redux

This release should work for all versions of Primer3.

cjfields commented 9 years ago

Original Redmine Comment Author Name: Aurélien Bernard Original Date: 2014-01-16T08:00:28Z


Chris Fields wrote:

The problem is, the parameters used by Primer3 v1 differ considerably from v2 and up; in other words, it was a major API change. This (among other things re: the original module) necessitated a redesigned Primer3 module and wrapper released under a separate CPAN distribution:

https://metacpan.org/pod/Bio::Tools::Primer3Redux

This release should work for all versions of Primer3.

Will this new module be integrated into BioPerl soon ?

cjfields commented 8 years ago

This issue is closed based on the comments above