[Bioperl-l] retreive GenBank Seq - the same script always worked
before but now ...
Qunfeng Dong
qfdong at iastate.edu
Thu Jun 12 16:52:09 EDT 2003
Hello,
I have this simple perl script that takes a GenBank Acc# as input and retrieve
the GB format record from NCBI. However, it suddenly stop working and gave me
the following error msg when I tried to retrieve sequence U89959.
------------- EXCEPTION -------------
MSG: WebDBSeqI Error - check query sequences!
STACK
Bio::DB::WebDBSeqI::get_seq_stream /usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBS
eqI.pm:443
STACK
Bio::DB::WebDBSeqI::get_Stream_by_id /usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebD
BSeqI.pm:259
STACK toplevel ./getGB:16
--------------------------------------
Any idea what might go wrong?
---my script starts here--------------
#!/usr/bin/perl -w
#script: getGB
use Bio::SeqIO;
use Bio::Seq;
use Bio::DB::GenBank();
@ARGV==1 or die("usage: $0 <Accession Number>\n");
my $ac = shift @ARGV;
my $gb = new Bio::DB::GenBank(-retrievaltype => 'tempfile', -format
=> 'Genbank');
my $seqio = $gb->get_Stream_by_id([$ac]);
my $out = Bio::SeqIO->new(-format => 'Genbank');
while ( my $seq = $seqio->next_seq() ) {
$out->write_seq($seq);
}
More information about the Bioperl-l
mailing list