<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
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.
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/bioperl/bioperl-live/issues" class="">https://github.com/bioperl/bioperl-live/issues</a><br class="">
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">chris<br class="">
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 12, 2016, at 1:43 PM, Karsten Sieber <karsten.sieber@gmail.com> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_default">
<div class=""><font face="tahoma, sans-serif" class=""><font class="">I have experienced that Bio::DB::Taxonomy::entrez->get_taxon() dies when pulling the taxon object for taxon ids corresponding to
</font><i style="" class="">some</i><font class=""> of the top level taxons (</font><a href="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=" target="_blank" class="" id="LPlnk806221" style="">http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Root&id=1&lvl=3&keep=1&srchmode=1&unlock</a><font class="">).
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.</font></font></div>
<div style="" class=""><font face="tahoma, sans-serif" class=""><br class="">
</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">Best,</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">Karsten</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class=""><br class="">
</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">## $db->get_taxon() working as intended:<br class="">
</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">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";'</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">2</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">Pass:<span class="" style="white-space:pre">
</span>Bacteria</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class=""><br class="">
</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">## $db->get_taxon() fails to pull the taxon object for viruses</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">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";'</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">10239</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">Can't call method "children" on an undefined value at /Users/ksieber/perl5/lib/perl5/Bio/DB/Taxonomy/<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__entrez.pm&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=fbHa8Njtvh9VmSnzJxiEUTW9NWDwMMwQAzhgZDO41GQ&m=pyzlnewy3JQAzQAXdMbyIEDQJldmqMGriUvXgB_TnqA&s=XO4VBOr7Fvxi15KqCkfoXBtyszWsDf5rF0zuMRnYgIA&e=" class="">entrez.pm</a>
line 361.</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class=""><br class="">
</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">## $db->get_taxon() fails with unclassified</font></div>
<div style="" class="">
<div class=""><font face="tahoma, sans-serif" class="">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";'<br class="">
</font></div>
<div class=""><font face="tahoma, sans-serif" class="">12908</font></div>
<div class=""><font face="tahoma, sans-serif" class="">Can't call method "children" on an undefined value at /Users/ksieber/perl5/lib/perl5/Bio/DB/Taxonomy/<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__entrez.pm&d=CwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=fbHa8Njtvh9VmSnzJxiEUTW9NWDwMMwQAzhgZDO41GQ&m=pyzlnewy3JQAzQAXdMbyIEDQJldmqMGriUvXgB_TnqA&s=XO4VBOr7Fvxi15KqCkfoXBtyszWsDf5rF0zuMRnYgIA&e=" class="">entrez.pm</a>
line 361</font></div>
</div>
<div style="" class=""><font face="tahoma, sans-serif" class=""><br class="">
</font></div>
<span style="" class=""><font face="tahoma, sans-serif" class="">## fresh Bio::Perl install from the github repo 07.11.2016</font></span>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="" class=""><font face="tahoma, sans-serif" class="">perl -MBio::Perl -e 'print Bio::Perl->VERSION . "\n";'</font></div>
<div style="" class=""><font face="tahoma, sans-serif" class="">1.006924</font></div>
</div>
</div>
_______________________________________________<br class="">
Bioperl-l mailing list<br class="">
Bioperl-l@mailman.open-bio.org<br class="">
http://mailman.open-bio.org/mailman/listinfo/bioperl-l</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>