[Bioperl-l] Problem using Bio::DB::Query::GenBank;

Luba Pardo lubapardo at gmail.com
Fri Feb 2 09:31:06 EST 2007

Hello, (I am using bioperl-1.5.2_100, linux machine)
I am trying to get the ids of a list of genes using the module
Bio::DB::Query:GenBank. I have the following code:

use Bio::DB::Query::GenBank;
use strict;
use warnings;

open (READER_1,"list.txt") || die "\n I can't open the file READER_1 !!\n";
my @a1=<READER_1>;
close (READER_1);

for (my $i=0; $i<=$#a1;$i=$i+1 ) {
        my @a1_s=split/\s+/,$a1[$i];

my $query_string = ' Homo Sapiens[Organism] AND $a1[$i] ';
   my $query = Bio::DB::Query::GenBank->new(-db=>'Protein',

   my $count = $query->count;
   my @ids   = $query->ids;

print " gene: $a1[$i] first id is $ids[0]  o no? \n";

I want to tell the program to get all the genes contained in the file
list.txt and to retrieve the ids from GenBank. However the program gives me
the following error:

------------EXCEPTION: Bio::Root::Exception -------------
MSG: Id list has been truncated even after maxids requested
STACK: Error::throw
STACK: Bio::Root::Root::throw
STACK: Bio::DB::Query::WebQuery::_fetch_ids
STACK: Bio::DB::Query::WebQuery::ids
STACK: query.pl:27
Is that a problem if I try to use the $a1[$i] to replace the name of the
I thank before hand for the attention you may pay to this message
Luba Pardo

More information about the Bioperl-l mailing list