[Bioperl-l] Bio::DB::GenBank batch retrieval question

Chris Chalfant CHALFANT_CHRIS_M@Lilly.com
Thu, 07 Mar 2002 08:21:20 -0500

When I use Bio::DB::GenBank::get_Stream_by_acc to retrieve a set of
accession numbers and include an invalid accession number in with
several valid accession numbers, I get no sequences back from Entrez.
For example, the code below returns no output (though I get output if I
remove the "bogus" accession).

Is this the expected behavior or am I using the code incorrectly?  If
this is the correct behavior, how would you suggest requesting genbank
records for a list which may include invalid accession numbers?


my @accessions = qw(AB000095 AB000220 bogus);
my $gb = new Bio::DB::GenBank;
my $seqio = $gb->get_Stream_by_acc(\@accessions);

while (my $record = $seqio->next_seq) {
  print $record->primary_id, "\n";



Chris Chalfant
Eli Lilly and Company