[Bioperl-l] Bio::DB::GenBank

Jason Stajich jason@cgt.mc.duke.edu
Fri, 19 Apr 2002 09:46:29 -0400 (EDT)


You are using genbank not genpept to retrieve ids that are for proteins.
0.7 may have been more flexible about this because the ncbi access point
may have been more flexible at that time.

Change GenBank to GenPept and it will work.

On Fri, 19 Apr 2002, Pedro A Reche Gallardo wrote:

> Hi, I was using the follwing script to retrive many proteins from the
> genbank database at the same time. The script was working fine with perl
> 5.05, and  bioperl is 0.7. This is the code:
> #!/usr/sbin/perl -w
> #
> # How to retrieve GenBank entries over the Web
> #
> #
> #
> use Bio::DB::GenBank;
> use Bio::SeqIO;
> my $gb = new Bio::DB::GenBank;
>
> my $seqout = new Bio::SeqIO(-fh => \*STDOUT, -format => 'fasta');
>
> my $seqio = $gb->get_Stream_by_batch([ qw(
> 16041831 13994242 14009490 7230618 7108749 13605922 7230620 15341249
> 14009488 14009486 14762236 12861474 11321634 8131948 6753344
> 16172015 16172015 15302083 14009484)]);
>
> while( defined ($seq = $seqio->next_seq )) {
>         $seqout->write_seq($seq);
> }
>
> However, recently I updated my perl to 5.6 and after I reinstalling the
> bioperl module the script does not longer work. This is the error I am
> getting.
>
> -------------------- EXCEPTION --------------------
> MSG: WebDBSeqI Error - check query sequences!
>
>
> STACK Bio::DB::WebDBSeqI::get_seq_stream
> /usr/local/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBSeqI.pm:300
> STACK Bio::DB::NCBIHelper::get_Stream_by_batch
> /usr/local/lib/perl5/site_perl/5.6.1/Bio/DB/NCBIHelper.pm:209
> STACK toplevel /usr1/par/bin/getgenbank.pl:13
> -------------------------------------------
> Does anyone know what is going on? Thanks in advance for any help.
>
> Cheers
>
>
> *******************************************************************
> PEDRO A. RECHE , pHD            TL: 617 632 3824
> Dana-Farber Cancer Institute,   FX: 617 632 4569
> Harvard Medical School,         EM: reche@research.dfci.harvard.edu
> 44 Binney Street, D1510A,       EM: reche@mifoundation.org
> Boston, MA 02115                URL:
> http://www.reche.org
> *******************************************************************
>
>

-- 
Jason Stajich
Duke University
jason@cgt.mc.duke.edu