bioperl / bioperl-live-redmine

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

Error in FASTA sequence retrival using Bio::DB::FASTA->subseq() #111

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: Justin Chu (Justin Chu) Original Redmine Issue: 3233, https://redmine.open-bio.org/issues/3233 Original Date: 2011-05-19 Original Assignee: Chris Fields


When retrieving a sequence from fasta files with headers like ‘>gi|49175990:4183373-4187596’ using subseq() or even seq(), no sequence is retrieved, despite seeing the ID when get_all_ids() is called. I ended up parsing all my headers replacing colons and minus signs with something else but I don’t think that this sort of thing should have to be done in the first place.

This is my first bug report with bioperl and I’ve only been using perl itself for 2 weeks but I think that this bug may be in part due to the colon followed by the numbers and minus sign mucking up this regular expression found in the subseq() sub:

$id =~ /^(.):([\d])(?:,|-|..)([\d]+)$/

If it isn’t due to this I’m sorry that I couldn’t be of more help. ———- BioPerl 1.6.1-2 Perl 5.10.1 Debian 2.30.2

cjfields commented 8 years ago

Original Redmine Comment Author Name: Dave Messina Original Date: 2011-05-19T19:22:20Z


Hey Justin,

Can you test this with a more current version of BioPerl?

e.g. version 1.6.9 available here: https://github.com/bioperl/bioperl-live

cjfields commented 8 years ago

Original Redmine Comment Author Name: Justin Chu Original Date: 2011-05-19T19:59:39Z


Hi Dave,

Sorry that I posted this bug report without the using the latest version, I had the older version installed because I got bioperl originally off the aptitude package manager in Debian.

At any rate, I just installed the newest version of bioperl from your link, but unfortunately there doesn’t seem to be any difference.

cjfields commented 8 years ago

Original Redmine Comment Author Name: Dave Messina Original Date: 2011-05-19T20:17:26Z


Not at all, Justin. Thanks for taking the time to report this (and to dig around for the problem!)

Chris, I’m kicking this to you since it looks like it might be related to #3172.

cjfields commented 8 years ago

Original Redmine Comment Author Name: Chris Fields Original Date: 2011-06-16T21:29:35Z


I can test this out with some faked data, but it helps to have something concrete to work with demonstrating the issue (particularly for downstream addition of test cases). Justin, can you post some example seqs and code that trigger this bug?

cjfields commented 8 years ago

Original Redmine Comment Author Name: Justin Chu Original Date: 2011-06-16T21:58:43Z


Try the attached files. The “:1-2” in the header seems to mess up something. For me It outputs the expected name but it doesn’t recognize the ID later on returning nothing as the sequence and giving an error in the concatenation with the end line character.

cjfields commented 8 years ago

Original Redmine Comment Author Name: Justin Chu Original Date: 2011-06-16T21:59:15Z


Try the attached files. The “:1-2” in the header seems to mess up something. For me It outputs the expected name but it doesn’t recognize the ID later on returning nothing as the sequence and giving an error in the concatenation with the end line character.