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::SeqIO unable to parse "PIR" format sequence with no description line #144

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: Tom O (Tom O) Original Redmine Issue: 3417, https://redmine.open-bio.org/issues/3417 Original Date: 2013-02-22 Original Assignee: Bioperl Guts


Hello,

I am using the default the BioPerl package with BioLinux 6.0. The package report its self as version 1.6.1-1ubuntu1 from “apt-cache showpkg bioperl”.

I have another application that I use that writes “PIR” format, although it probably does not strictly adhere to the format (http://www.bioinformatics.nl/tools/crab\_pir.html), as the description line is blank, as in:

P1;Some Sequence

ASDFASDFASDFASDFAS

Bioperl is unable to correctly parse this file, using the option ‘pir’ option to the -format flag when reading the file.

If a change is made to the regex around line 116 in the Bio/SeqIO/pir.pm module, the file can be correctly parsed:

—- pir.pm.pld 2013-02-22 13:13:03.643584000 +0000 **+ pir.pm 2013-02-22 13:14:07.149848013 +0000 @ -114,7 +114,7@ if( $line eq ‘>’ ) { # handle the very first one having no comment return unless $line = $self->_readline; }

my ( $type,$id );

Thanks

Tom

cjfields commented 8 years ago

Original Redmine Comment Author Name: Chris Fields Original Date: 2013-03-03T05:48:51Z


If the application in question uses PIR but doesn’t adhere to the format, does that make the bug ours or the application used? In other words, shouldn’t you request the application authors fix the output so that it gives correct PIR?

cjfields commented 8 years ago

Original Redmine Comment Author Name: Tom O Original Date: 2013-03-03T12:02:22Z


Dear Chris,

That is a good point and I have made a request to the authors of the other program but I dont expect them to update it any time soon.

I dont know enough about the PIR format to know if the description line is mandatory (as it appears to be) or if valid PIR files can have a blank description (as the aplication I use seems to think). If the description line is mandatory in PIR files, close this as an issue.

Tom