[Bioperl-l] Script taxonomy2tree version 1.4 crashed on 110 species

Chris Fields cjfields at uiuc.edu
Sat Dec 16 06:28:47 UTC 2006


On Dec 15, 2006, at 6:45 PM, Gabriel Valiente wrote:

>> I don't think that can be true. Your error message contains 'Must  
>> supply
>> a Bio::Taxon'. Bio::Taxon only exists in 1.5.2 (or cvs live).
>>
>> If you uninstall the fink installation and install 1.5.2 using  
>> cpan (with root privileges by going sudo cpan) that should at  
>> least get rid of the error messages...
>>
>>
>>> The tree is not correct (I've parsed it from R to have a double
>>> check) but don't know yet what the problem is with it.
>>
>> ... But if the tree is wrong anyway... Let me know what you find out.
>
> I've uninstalled the fink installation and used the cvs instead,  
> and the error message is gone. However, on a larger set of 190  
> species, which are all present in the NCBI taxonomy, the resulting  
> tree has only 178 taxa. I suspect, something must be wrong with the  
> merge_lineage method in the major rewrite of the taxonomy2tree  
> script. Can someone please check this? I'm attaching the 190  
> species call to the script. Thanks,
>
> Gabriel

I can confirm that.  It is definitely dropping them in merge_lineage 
(); if you add a call to get_leaf_nodes to check how many are present  
after each merge_lineage() call, you can see it dropping nodes along  
the trace.

in taxonomy2tree.pl:

my $ct;
my ($treect, $mergect) = 0;
for my $name (@species) {
   my $ncbi_id = $db->get_taxonid($name);
   if ($ncbi_id) {
     #print "Species: $name\n\tTaxID: $ncbi_id\n";
     #$ids{$ncbi_id}++;
     my $node = $db->get_taxon(-taxonid => $ncbi_id);

     if ($tree) {
       $tree->merge_lineage($node);

     }
     else {
       $tree = Bio::Tree::Tree->new(-node => $node);
     }
     printf("%-3d: Nodes: %-4d\n",$ct,scalar($tree->get_leaf_nodes));
   }
   else {
     warn "no NCBI Taxonomy node for species ",$name,"\n";
   }
   $ct++;
}

chris




More information about the Bioperl-l mailing list