[Bioperl-l] Getting taxa from gi

shalabh sharma shalabh.sharma7 at gmail.com
Wed Sep 28 15:53:07 EDT 2011

Hi All,
        I know this has been discussed before, but this is kind of a new
problem that i am facing.
I want to get taxonomy (full linage) information from the huge list of GI's.
I am using Bio::DB:Genbak for this with perl-5.12.3.
Here is my small script.

#! /usr/local/perl-5.12.3/bin/perl -w
use strict;
use warnings;
use Bio::DB::GenBank;

my @ids = qw( CP000490 );
my $gbh = Bio::DB::GenBank->new();

foreach my $id( @ids ) {
# say "* ID: $id";
 my $seq = $gbh->get_Seq_by_acc( $id );
 my $org = $seq->species;
 #print "$org\n";
 my $class = join'-', $org->classification;
 print "$class\n";

The output is: Paracoccus denitrificans
which is fine but i also want to get the taxa id, and if possible taxa ids
for all the linage classification.

ideally i would like to get something like this: 318586 - - - - - - - 1224 -

I would really appreciate your help.


Shalabh Sharma
Scientific Computing Professional Associate (Bioinformatics Specialist)
Department of Marine Sciences
University of Georgia
Athens, GA 30602-3636

More information about the Bioperl-l mailing list