Skip Menu |

This queue is for tickets about the Bio-LITE-Taxonomy-NCBI-Gi2taxid CPAN distribution.

Report information
The Basics
Id: 87485
Status: resolved
Priority: 0/
Queue: Bio-LITE-Taxonomy-NCBI-Gi2taxid

People
Owner: Nobody in particular
Requestors: carlos.borroto [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: (no value)

Attachments
Bio-LITE-Taxonomy-NCBI-Gi2taxid-0.07.tar.gz



Hi, When querying for a GI not present in the taxonomy map file I get this error: $ ./gi2taxid.pl 525338721 substr outside of string at /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line 160. Use of uninitialized value in unpack at /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line 160. Use of uninitialized value in left bitshift (<<) at /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line 161. Use of uninitialized value in bitwise or (|) at /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line 161. Use of uninitialized value in left bitshift (<<) at /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line 161. cborroto@rckblast02:~$ vim /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm I would expect to get 'undef' or an empty string. Thanks, Carlos
This is not accurate. If the GI is not present, you always get a taxid of 0. If you use a GI that is greater than the last GI in the map file you get the warning (not error) you are reporting (only in save_mem is off). Even with the warning, you get the taxid value of 0, so no damage here. If you expect wrong GIs and you don't like the extra warnings you can disable them by locally clobbering the warning handler. Something like this should work: my $taxid; { local $SIG{__WARN__} = sub {}; $taxid = $dict->get_taxid(5253387210000); } Hope this helps, M; On Wed Jul 31 10:18:17 2013, https://www.google.com/accounts/o8/id?id=AItOawkaiBTa6wo1zS2PwQSxUYeDKEQ9nakwy5E wrote: Show quoted text
> Hi, > > When querying for a GI not present in the taxonomy map file I get this > error: > $ ./gi2taxid.pl 525338721 > substr outside of string at > /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line > 160. > Use of uninitialized value in unpack at > /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line > 160. > Use of uninitialized value in left bitshift (<<) at > /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line > 161. > Use of uninitialized value in bitwise or (|) at > /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line > 161. > Use of uninitialized value in left bitshift (<<) at > /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line > 161. > cborroto@rckblast02:~$ vim > /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > > I would expect to get 'undef' or an empty string. > > Thanks, > Carlos
Subject: Re: [rt.cpan.org #87485]
Date: Tue, 27 Aug 2013 10:33:08 -0400
To: bug-Bio-LITE-Taxonomy-NCBI-Gi2taxid [...] rt.cpan.org
From: Carlos Borroto <carlos.borroto [...] gmail.com>
I didn't notice it was just a warning. It is also good to know that it will only happen on GIs greater than the last entry in the map file. I'm however surprised you feel this is not a valid bug in need of a fix. I think a fix should be fairly simple to implement. I don't like they idea of masking warnings, I think you agree it is not a safe thing to do. These particularly warnings are creating a lot of unnecessary noise in the output of my tool. If you feel ok with just returning 0 for missing GIs in the right range why not treat this case the same way? By the way, this happens in my case after updating genbank but failing to update the map file. While I'm taking the necessary precautions to avoid this corner case, again I feel is a valid case that should be taken care of properly. Thanks for you code, it's helping me a lot, Carlos On Tue, Aug 27, 2013 at 10:15 AM, Miguel Pignatelli via RT <bug-Bio-LITE-Taxonomy-NCBI-Gi2taxid@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87485 > > > This is not accurate. > If the GI is not present, you always get a taxid of 0. > If you use a GI that is greater than the last GI in the map file you get the warning (not error) you are reporting (only in save_mem is off). Even with the warning, you get the taxid value of 0, so no damage here. > > If you expect wrong GIs and you don't like the extra warnings you can disable them by locally clobbering the warning handler. Something like this should work: > > my $taxid; > { > local $SIG{__WARN__} = sub {}; > $taxid = $dict->get_taxid(5253387210000); > } > > Hope this helps, > > M; > > On Wed Jul 31 10:18:17 2013, https://www.google.com/accounts/o8/id?id=AItOawkaiBTa6wo1zS2PwQSxUYeDKEQ9nakwy5E wrote:
>> Hi, >> >> When querying for a GI not present in the taxonomy map file I get this >> error: >> $ ./gi2taxid.pl 525338721 >> substr outside of string at >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line >> 160. >> Use of uninitialized value in unpack at >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line >> 160. >> Use of uninitialized value in left bitshift (<<) at >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line >> 161. >> Use of uninitialized value in bitwise or (|) at >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line >> 161. >> Use of uninitialized value in left bitshift (<<) at >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm line >> 161. >> cborroto@rckblast02:~$ vim >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> I would expect to get 'undef' or an empty string. >> >> Thanks, >> Carlos
> >
I have just uploaded a new version containing a fix to this problem (it will probably take some time until it is available on cpan). I am also attaching the tarball for you to try if you don't want to wait. Please, let me know if this solves your issue or have any other problem with this module. Cheers, M; On Tue Aug 27 10:33:44 2013, carlos.borroto@gmail.com wrote: Show quoted text
> I didn't notice it was just a warning. It is also good to know that it > will only happen on GIs greater than the last entry in the map file. > > I'm however surprised you feel this is not a valid bug in need of a > fix. I think a fix should be fairly simple to implement. I don't like > they idea of masking warnings, I think you agree it is not a safe > thing to do. These particularly warnings are creating a lot of > unnecessary noise in the output of my tool. If you feel ok with just > returning 0 for missing GIs in the right range why not treat this case > the same way? > > By the way, this happens in my case after updating genbank but failing > to update the map file. While I'm taking the necessary precautions to > avoid this corner case, again I feel is a valid case that should be > taken care of properly. > > Thanks for you code, it's helping me a lot, > Carlos > > On Tue, Aug 27, 2013 at 10:15 AM, Miguel Pignatelli via RT > <bug-Bio-LITE-Taxonomy-NCBI-Gi2taxid@rt.cpan.org> wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=87485 > > > > > This is not accurate. > > If the GI is not present, you always get a taxid of 0. > > If you use a GI that is greater than the last GI in the map file you > > get the warning (not error) you are reporting (only in save_mem is > > off). Even with the warning, you get the taxid value of 0, so no > > damage here. > > > > If you expect wrong GIs and you don't like the extra warnings you can > > disable them by locally clobbering the warning handler. Something > > like this should work: > > > > my $taxid; > > { > > local $SIG{__WARN__} = sub {}; > > $taxid = $dict->get_taxid(5253387210000); > > } > > > > Hope this helps, > > > > M; > > > > On Wed Jul 31 10:18:17 2013, > > https://www.google.com/accounts/o8/id?id=AItOawkaiBTa6wo1zS2PwQSxUYeDKEQ9nakwy5E > > wrote:
> >> Hi, > >> > >> When querying for a GI not present in the taxonomy map file I get > >> this > >> error: > >> $ ./gi2taxid.pl 525338721 > >> substr outside of string at > >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > >> line > >> 160. > >> Use of uninitialized value in unpack at > >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > >> line > >> 160. > >> Use of uninitialized value in left bitshift (<<) at > >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > >> line > >> 161. > >> Use of uninitialized value in bitwise or (|) at > >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > >> line > >> 161. > >> Use of uninitialized value in left bitshift (<<) at > >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > >> line > >> 161. > >> cborroto@rckblast02:~$ vim > >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm > >> > >> I would expect to get 'undef' or an empty string. > >> > >> Thanks, > >> Carlos
> > > >
Subject: Bio-LITE-Taxonomy-NCBI-Gi2taxid-0.07.tar.gz

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #87485]
Date: Tue, 27 Aug 2013 14:09:07 -0400
To: bug-Bio-LITE-Taxonomy-NCBI-Gi2taxid [...] rt.cpan.org
From: Carlos Borroto <carlos.borroto [...] gmail.com>
I can confirm this indeed fix this corner case mishandling. Thanks! On Tue, Aug 27, 2013 at 11:01 AM, Miguel Pignatelli via RT <bug-Bio-LITE-Taxonomy-NCBI-Gi2taxid@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87485 > > > I have just uploaded a new version containing a fix to this problem (it will probably take some time until it is available on cpan). I am also attaching the tarball for you to try if you don't want to wait. > Please, let me know if this solves your issue or have any other problem with this module. > > Cheers, > > M; > > > On Tue Aug 27 10:33:44 2013, carlos.borroto@gmail.com wrote:
>> I didn't notice it was just a warning. It is also good to know that it >> will only happen on GIs greater than the last entry in the map file. >> >> I'm however surprised you feel this is not a valid bug in need of a >> fix. I think a fix should be fairly simple to implement. I don't like >> they idea of masking warnings, I think you agree it is not a safe >> thing to do. These particularly warnings are creating a lot of >> unnecessary noise in the output of my tool. If you feel ok with just >> returning 0 for missing GIs in the right range why not treat this case >> the same way? >> >> By the way, this happens in my case after updating genbank but failing >> to update the map file. While I'm taking the necessary precautions to >> avoid this corner case, again I feel is a valid case that should be >> taken care of properly. >> >> Thanks for you code, it's helping me a lot, >> Carlos >> >> On Tue, Aug 27, 2013 at 10:15 AM, Miguel Pignatelli via RT >> <bug-Bio-LITE-Taxonomy-NCBI-Gi2taxid@rt.cpan.org> wrote:
>> > <URL: https://rt.cpan.org/Ticket/Display.html?id=87485 > >> > >> > This is not accurate. >> > If the GI is not present, you always get a taxid of 0. >> > If you use a GI that is greater than the last GI in the map file you >> > get the warning (not error) you are reporting (only in save_mem is >> > off). Even with the warning, you get the taxid value of 0, so no >> > damage here. >> > >> > If you expect wrong GIs and you don't like the extra warnings you can >> > disable them by locally clobbering the warning handler. Something >> > like this should work: >> > >> > my $taxid; >> > { >> > local $SIG{__WARN__} = sub {}; >> > $taxid = $dict->get_taxid(5253387210000); >> > } >> > >> > Hope this helps, >> > >> > M; >> > >> > On Wed Jul 31 10:18:17 2013, >> > https://www.google.com/accounts/o8/id?id=AItOawkaiBTa6wo1zS2PwQSxUYeDKEQ9nakwy5E >> > wrote:
>> >> Hi, >> >> >> >> When querying for a GI not present in the taxonomy map file I get >> >> this >> >> error: >> >> $ ./gi2taxid.pl 525338721 >> >> substr outside of string at >> >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> line >> >> 160. >> >> Use of uninitialized value in unpack at >> >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> line >> >> 160. >> >> Use of uninitialized value in left bitshift (<<) at >> >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> line >> >> 161. >> >> Use of uninitialized value in bitwise or (|) at >> >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> line >> >> 161. >> >> Use of uninitialized value in left bitshift (<<) at >> >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> line >> >> 161. >> >> cborroto@rckblast02:~$ vim >> >> /usr/lib/perl5/site_perl/5.8.8/Bio/LITE/Taxonomy/NCBI/Gi2taxid.pm >> >> >> >> I would expect to get 'undef' or an empty string. >> >> >> >> Thanks, >> >> Carlos
>> > >> >
> > >