Re: Taxonomy->get_taxon() bug
"Fields, Christopher J" <[email protected]> Wed, 13 Jul 2016 01:41:22 +0000
| Newsgroups | gmane.comp.lang.perl.bio.general |
|---|---|
| Message-ID | <[email protected]> |
Yep, I can confirm this with the latest. Can you file this as a bug? I recall there is some munging of taxa in the classification but I don’t recall where to be honest. https://github.com/bioperl/bioperl-live/issues Thanks, chris On Jul 12, 2016, at 1:43 PM, Karsten Sieber <[email protected]> wrote: I have experienced that Bio::DB::Taxonomy::entrez->get_taxon() dies when pulling the taxon object for taxon ids corresponding to some of the top level taxons (http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Root&id=1&lvl=3&keep=1&srchmode=1&unlock<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ncbi.nlm.nih.gov_Taxonomy_Browser_wwwtax.cgi-3Fmode-3DRoot-26id-3D1-26lvl-3D3-26keep-3D1-26srchmode-3D1-26unlock&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=fbHa8Njtvh9VmSnzJxiEUTW9NWDwMMwQAzhgZDO41GQ&m=pyzlnewy3JQAzQAXdMbyIEDQJldmqMGriUvXgB_TnqA&s=H71HjixwaUTPNDGI0eusgXdt2zFkZygCxa3WDAk8WYw&e=>). Specifically, I have found that get_taxon() dies when querying taxon ids corresponding to "cellular organisms" (131567), viroids (12884), viruses (10239), unclassified (12908), and "other sequences" (28384). Below is code demonstrating the error. I think this is a bug because get_taxon() should always return a taxon object for a valid taxon id. Best, Karsten ## $db->get_taxon() working as intended: perl -MBio::DB::Taxonomy -we '$db=Bio::DB::Taxonomy->new(-source=>"entrez"); @taxonids=$db->get_taxonids("bacteria"); print join(" : ", @taxonids)."\n"; $taxon=$db->get_taxon(@taxonids); print "Pass:\t"; print $taxon->scientific_name."\n";' 2 Pass: Bacteria ## $db->get_taxon() fails to pull the taxon object for viruses perl -MBio::DB::Taxonomy -we '$db=Bio::DB::Taxonomy->new(-source=>"entrez"); @taxonids=$db->get_taxonids("viruses"); print join(" : ", @taxonids)."\n"; $taxon=$db->get_taxon(@taxonids); print "Pass:\t"; print $taxon->scientific_name."\n";' 10239 Can't call method "children" on an undefined value at /Users/ksieber/perl5/lib/perl5/Bio/DB/Taxonomy/entrez.pm<https://urldefense.proofpoint.com/v2/url?u=http-3A__entrez.pm&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=fbHa8Njtvh9VmSnzJxiEUTW9NWDwMMwQAzhgZDO41GQ&m=pyzlnewy3JQAzQAXdMbyIEDQJldmqMGriUvXgB_TnqA&s=XO4VBOr7Fvxi15KqCkfoXBtyszWsDf5rF0zuMRnYgIA&e=> line 361. ## $db->get_taxon() fails with unclassified perl -MBio::DB::Taxonomy -we '$db=Bio::DB::Taxonomy->new(-source=>"entrez"); @taxonids=$db->get_taxonids("unclassified"); print join(" : ", @taxonids)."\n"; $taxon=$db->get_taxon(@taxonids); print "Pass:\t"; print $taxon->scientific_name."\n";' 12908 Can't call method "children" on an undefined value at /Users/ksieber/perl5/lib/perl5/Bio/DB/Taxonomy/entrez.pm<https://urldefense.proofpoint.com/v2/url?u=http-3A__entrez.pm&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=fbHa8Njtvh9VmSnzJxiEUTW9NWDwMMwQAzhgZDO41GQ&m=pyzlnewy3JQAzQAXdMbyIEDQJldmqMGriUvXgB_TnqA&s=XO4VBOr7Fvxi15KqCkfoXBtyszWsDf5rF0zuMRnYgIA&e=> line 361 ## fresh Bio::Perl install from the github repo 07.11.2016 perl -MBio::Perl -e 'print Bio::Perl->VERSION . "\n";' 1.006924 _______________________________________________ Bioperl-l mailing list [email protected] http://mailman.open-bio.org/mailman/listinfo/bioperl-l _______________________________________________ Bioperl-l mailing list [email protected] http://mailman.open-bio.org/mailman/listinfo/bioperl-l