Skip to content

Instantly share code, notes, and snippets.

@rbuels
Created September 13, 2012 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbuels/3716713 to your computer and use it in GitHub Desktop.
Save rbuels/3716713 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Bio::DB::Taxonomy;
my @gis;
while(<>) {
chomp;
push @gis, $_;
}
my $remote_entrez_tax_db = Bio::DB::Taxonomy->new(-source => "entrez");
my @matching_nodes = $remote_entrez_tax_db->get_Taxonomy_Node( -gi => \@gis );
for my $node ( @matching_nodes ) {
print $node->ncbi_taxid, "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment