[Bioperl-l] How to extract organism information from blast report?
Stefano Ghignone
ste.ghi at libero.it
Wed Jul 2 00:10:56 EDT 2003
Hi!
This code retrieves the binomial name of the organism from a GenBank format sequence by its accession no.
use Bio::Seq;
use Bio::SeqIO;
use Bio::DB::GenBank;
my $accnum = $ARGV[0];
my @args = (-retrivaltype => 'tempfile', -format => 'GenBank');
my $gb = Bio::DB::GenBank->new(@args);
my $seqio = $gb->get_Stream_by_acc($accnum);
while( my $orgn = $seqio->next_seq() ) {
my $species = $orgn->species();
printf "\t%s\n", $species->binomial('FULL');}
You can use it as a subrutine in a major script (ex. "Running Remote Blast" in Pasteur Institute Bioperl Course, Exercise 4.4) to which you can pass $hit->accession object from a blast report as the argument, and then manage the object $species->binomial('FULL').
The problem is that the code was functioning only with bioperl v. 1.0 (as I reported in #1460 bug report), and not with the current 1.2.1 distribution.
I hope the problem will be resolved with the next release.
Ciao!
Stefano Ghignone
More information about the Bioperl-l
mailing list