[Bioperl-l] Problem using Bio::DB::Query::GenBank;
Luba Pardo
lubapardo at gmail.com
Fri Feb 2 14:31:06 UTC 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',
-query=>$query_string
);
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
/usr/lib/perl5/site_perl/5.8.1/Bio/Root/Root.pm:359
STACK: Bio::DB::Query::WebQuery::_fetch_ids
/usr/lib/perl5/site_perl/5.8.1/Bio/DB/Query/WebQuery.pm:236
STACK: Bio::DB::Query::WebQuery::ids
/usr/lib/perl5/site_perl/5.8.1/Bio/DB/Query/WebQuery.pm:200
STACK: query.pl:27
------------------
Is that a problem if I try to use the $a1[$i] to replace the name of the
gene?
I thank before hand for the attention you may pay to this message
Regards,
Luba Pardo
More information about the Bioperl-l
mailing list