[Bioperl-l] retreive GenBank Seq - the same script always
worked before but now ...
Heikki Lehvaslaiho
heikki at ebi.ac.uk
Fri Jun 13 10:21:06 EDT 2003
Qunfeng,
NCBI has changed the URL for the servise. This has been fixed in the
CVS but but we have not had time to make a fix release of bioperl.
You can copy latest Bio::DB::{GenBank&NCBIHelper&WebDBSeqI} from WebCVS
and replace the older ones:
http://cvs.bioperl.org/cgi-bin/viewcvs/viewcvs.cgi/bioperl-live/Bio/DB/?cvsroot=bioperl
For your script to work, you need to remove '-format=>genbank' which
then defaults to the right format. This is in my opinion a bug in
Bio::DB::GenBank.
Jason, shouldn't the format string be bioperlish 'genbank' rather than
'gb' required by NCBI eutils ?
-Heikki
On Thu, 2003-06-12 at 21:52, Qunfeng Dong wrote:
> 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);
> }
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki_at_ebi ac uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________
More information about the Bioperl-l
mailing list