[Fwd: Re: [Bioperl-l] About Bio::DB::GenBank!]
wxu
wxu at msi.umn.edu
Tue Sep 9 10:52:22 EDT 2003
Hi Jonathan,
Thank you very much for your help. I reinstalled v1.2.2, and it works fine
now.
Thanks again,
Wayne
--
Wayne Xu
Computational Genomics Specialist www.msi.umn.edu/user_support/compgen
Supercomputing Institute
550 Walter Library
117 Pleasant Street SE
University of Minnesota
Minneapolis, Minnesota 55455
email: wxu at msi.umn.edu help email: help at msi.umn.edu
phone: 612-624-1447 help phone: 612-626-0802
fax: 612-624-8861
-----Original Message-----
From: yaofx [mailto:yaofx at xymu.net]
Sent: Monday, September 08, 2003 7:57 PM
To: wxu at msi.umn.edu
Cc: bioperl-l at bioperl.org
Subject: [Fwd: Re: [Bioperl-l] About Bio::DB::GenBank!]
-------- Original Message -------- Subject: Re: [Bioperl-l] About
Bio::DB::GenBank!
Date: Fri, 01 Aug 2003 13:18:22 -0400
From: Jonathan Manning <jmanning at genome.wi.mit.edu>
Organization: Whitehead Institute Center for Genome Research
To: yaofx <yaofx at xymu.net>
CC: bioperl <bioperl-l at bioperl.org>
References: <3F2A6D86.9040006 at xymu.net>
I just encountered the same error. It looks like both Bio::DB::GenBank
and Bio::DB::GenPept search the protein database. So, Bio::DB::GenBank
is not returning anything when you query for an accession.
To verify this, change:
my $gb = new Bio::DB::GenBank;
to:
my $gb = new Bio::DB::GenBank(-format => 'fasta',
-verbose => 1);
For me, this prints:
url is
http://www.ncbi.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=protein&i
d=AC068609&tool=bioperl&retmode=text&usehistory=n
Sure enough, visiting this gives me a blank page. However, if I
substitute 'db=nucleotide' for 'db=protein' in that url, it works.
This bug seems to exist in 1.2 and 1.2.1, but I think is fixed in 1.2.2.
(at least in the CVS head I checked...)
Either upgrade to 1.2.2 or edit Bio/DB/GenBank.pm and change 'protein'
to 'nucleotide' in the BEGIN block.
~Jonathan
yaofx wrote:
> Hello,
>
> I have installed Perl 5.6.1 for WIN32, and Bioperl version 1.2.1.
> The following is the script ,which can retrieve data from GenBank by
> sequences' gi,
> but can not get the results by accession number.
> I replace "get_Stream_by_id" with ""get_Stream_by_acc", also failed.
>
> The error message is :
>
> ------------- EXCEPTION -------------
> MSG: WebDBSeqI Error - check query sequences!
>
> STACK Bio::DB::WebDBSeqI::get_seq_stream
> c:/Perl/site/lib/Bio/DB/WebDBSeqI.pm:46
> 4
> STACK Bio::DB::WebDBSeqI::get_Stream_by_id
> c:/Perl/site/lib/Bio/DB/WebDBSeqI.pm:
> 259
> STACK toplevel web_gi2seq_vi.pl:50
>
> --------------------------------------
>
> BTW, I don't change any code about Bioperl package.
> What's matter with it? and how will i do next?
>
> Thanks in advance for any kind of help
>
> Fengxia
>
>
> #!/usr/bin/perl
>
> $idlist = $ARGV[0];
>
> if (@ARGV != 1){
> print "USAGE: perl web_id2seq.pl <ID list file>\n";
> exit(1);
> }
>
> $faoutfile = $idlist."_fa.txt";
> (unlink $faoutfile) if (-e $faoutfile);
>
> open (INPUT,$idlist);
>
> while ($line = <INPUT>){
> chomp ($line);
> $line =~ s/\r//;
> push (@querylist,$line);
> }
> $list = join ",", at querylist;
> close INPUT;
>
> use Bio::SeqIO;
> use Bio::DB::GenBank;
> my $gb = new Bio::DB::GenBank;
>
> my $seqout = new Bio::SeqIO(-file => ">$faoutfile", -format => 'fasta');
> my $seqio = $gb->get_Stream_by_id([$list]);
>
> while($seq = $seqio->next_seq ) {
> $seqout->write_seq($seq);
> }
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
Jonathan Manning <jmanning at genome.wi.mit.edu>
Whitehead Institute Center for Genome Research
Finishing Process Analyst / Data Analyst
More information about the Bioperl-l
mailing list