[Bioperl-l] Bio::*Taxonomy* changes (Chris Fields)

Gabriel Valiente valiente at lsi.upc.edu
Fri Jul 28 13:53:10 UTC 2006


> Would be nice to know how you use Bio::Taxonomy.  You are the first  
> here who
> seems to have a use for it.

I'm using it to obtain a reference taxonomy for a set of organisms,  
against which to assess a phylogeny obtained by the usual protocol  
(fetch rRNA sequences, align them, obtain a distance matrix,  
cluster). Roughly:

use Bio::DB::Taxonomy;

my $nodesfile = "nodes.dmp";
my $namesfile = "names.dmp";
my $db = new Bio::DB::Taxonomy(-source => 'flatfile',
                                -directory => "./db/",
                                -nodesfile => $nodesfile,
                                -namesfile => $namesfile);

my @species = (...);

for my $ncbi_name (@species) {
   my $ncbi_id = $db->get_taxonid($ncbi_name);
   my $node = $db->get_Taxonomy_Node(-taxonid => $ncbi_id);
   my @lineage = get_lineage_nodes($node);
   # ...
}

Here, get_lineage_nodes could be added as a method to  
Bio::Taxonomy::Node or equivalent:

sub get_lineage_nodes{
   my $node = shift;
   my @lineage;
   while ($node->node_name ne "root") {
     $node = $node->get_Parent_Node;
     unshift @lineage, $node;
   }
   return @lineage;
}

I've also written a method to merge the full lineages of a set of  
Bio::Taxonomy::Node object into a Bio::Tree::Tree object. I'd be glad  
to contribute it as well, but I'm not sure where it would fit.

> As for branch lengths, I think you're confusing  
> 'taxonomy' (classification
> of organisms based on just about anything) with  
> 'phylogeny' (evolutionary
> relatedness).  Note in the Wikipedia article below the use of the term
> 'phylogenetic taxonomy', which is the classification of organisms  
> based on
> evolutionary relationships.
>
> http://en.wikipedia.org/wiki/Taxonomy
>
> http://en.wikipedia.org/wiki/Phylogeny
>
> NCBI has a disclaimer about the Taxonomy database that is related  
> to this:
>
> http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/index.cgi? 
> chapter=how
> cite
>
> There are HOWTOs on tree manipulation, population genetics, and  
> PAML on the
> wiki which might be a good start for Bioperl phylogenetic methods:
>
> http://www.bioperl.org/wiki/HOWTO:Trees
>
> http://www.bioperl.org/wiki/HOWTO:PAML
>
> http://www.bioperl.org/wiki/HOWTO:PopGen

Thanks a lot. Let me check it and get back to the discussion later on.

Gabriel

> Chris
>
>> -----Original Message-----
>> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
>> bounces at lists.open-bio.org] On Behalf Of Gabriel Valiente
>> Sent: Friday, July 28, 2006 7:10 AM
>> To: bioperl-l at lists.open-bio.org
>> Subject: Re: [Bioperl-l] Bio::*Taxonomy* changes (Chris Fields)
>>
>>>>> At the moment it seems to me that the Bio::Taxonomy modules
>>>>> (excluding
>>>>> Node) aren't really usable.
>>
>> I've been using Bio::Taxonomy and Bio::DB::Taxonomy a lot, they are
>> very useful modules. Whatever Bio::Taxon or Bio::Taxonomy::Taxon
>> turns out to be, please do keep the Bio::DB::Taxonomy functionality.
>>
>> BTW, does anybody know how to include branch lengths in
>> Bio::DB::Taxonomy?
>>
>> Thanks a lot,
>>
>> Gabriel
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list