[Bioperl-l] extract taxonomy from Bio::Tree::NodeI objects...

mark alston (TGAC) mark.alston at BBSRC.AC.UK
Tue Jul 13 10:47:04 UTC 2010


Hi,
BioPerl newbie question coming up...
I want to feed my BioPerl program the name of a bug and extract taxonomic information. Simples.
Here's my script after days of effort (I joke not):
#########################################################################
use Bio::DB::Taxonomy ;
my $entrez_dbh = new Bio::DB::Taxonomy (-source => 'entrez');

my $entrezBug = $entrez_dbh->get_taxon(-name => 'Cronobacter sakazakii ATCC BAA-894') ;
my $bugTree = Bio::Tree::Tree->new(-node => $entrezBug) ;

my @taxa = $bugTree->get_nodes ;                       ### returns an array of Bio::Tree:NodeI objects

foreach my $nodelet (@taxa)
{ print $nodelet->to_string() . "\t" ;  }
#########################################################################

This outputs:
131567 2              1224       1236       91347    543         413496 28141    290339

If I feed these to the NCBI taxonomy browser as 'taxonomy id' they make sense because
2 corresponds to: bacteria (superkingdom)
1224  corresponds to: proteobacteria (phylum)
etc etc
290339 corresponds to: Cronobacter sakazakii ATCC BAA-894 (species)


But how can I get the things I've underlined out via BioPerl?
Many thanks,
Mark

################################################
Dr Mark Alston,
Computer Biologist,
The Genome Analysis Centre,
Norwich Research Park,
Colney Lane, Norwich, NR4 7UH, UK.

tel                +44 (0)1603 450910
e-mail         mark.alston at bbsrc.ac.uk<mailto:mark.alston at bbsrc.ac.uk>
web            http://www.tgac.bbsrc.ac.uk<http://www.tgac.bbsrc.ac.uk/>
################################################





More information about the Bioperl-l mailing list