Andrew Couperthwaite | 12 Sep 23:15

Bio::DB::Query::GenBank question

Hi,

I'm having difficulty using  the Bio::DB::Query::GenBank module.  The  
sample script on the page
http://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/DB/Query/GenBank.html 
  doesn't seem to work.

I'm trying to use this and the Bio::DB::GenBank module to find and  
download a set of sequences from GenBank...
I'm rather new to bioperl, can anyone point me in the right direction?

Thanks,
-Andrew
Jason Stajich | 13 Sep 08:42

Re: Bio::DB::Query::GenBank question

Hi Andrew -

a) what is the exact script code you are trying, what are the error  
messages?
b) what version of bioperl?

The first thing we'll suggest is: did you get the latest code from SVN  
yet or a nightly build?

-jason
On Sep 12, 2008, at 2:17 PM, Andrew Couperthwaite wrote:

> Hi,
>
> I'm having difficulty using  the Bio::DB::Query::GenBank module.   
> The sample script on the page
http://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/DB/Query/GenBank.html 
>  doesn't seem to work.
>
> I'm trying to use this and the Bio::DB::GenBank module to find and  
> download a set of sequences from GenBank...
> I'm rather new to bioperl, can anyone point me in the right direction?
>
> Thanks,
> -Andrew
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l <at> lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

(Continue reading)

Andrew Couperthwaite | 15 Sep 21:05

Re: Bio::DB::Query::GenBank question

the code i'm starting with is this:
=====
use Bio::DB::Query::GenBank;
use Bio::DB::GenBank

my $query_string = 'Oryza[Organism] AND EST[Keyword]';
    my $query = Bio::DB::Query::GenBank->new(-query =>  
'Oryza[Organism] AND EST[Keyword]',
    											-db=>'nucleotide');
    my $count = $query->count;
    my @ids   = $query->ids;
    # get a genbank database handle
    my $gb = Bio::DB::GenBank->new();
    my $stream = $gb->get_Stream_by_query($query);

    while (my $seq = $stream->next_seq) {
       # do something with the sequence object
       print "hello";
    }
=====
It doesn't produce any error messages, it simply doesn't enter the  
while loop.  It seems as though it isn't getting any results from  
genbank?/isn't contacting genbank?

We are running version 1.5.2.  Haven't updated since late May.

-Andrew

On 13-Sep-08, at 12:42 AM, Jason Stajich wrote:

(Continue reading)

Jason Stajich | 15 Sep 21:25

Re: Bio::DB::Query::GenBank question

Try removing the line
my @ids = $query->ids;

I don't think GenBank supports this part of the query API now or you  
have to execute the query first before you can ask for the number of  
IDs from that object.  I don't remember exactly what changed  
specifically, but I actually get an error with that line:
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Id list has been truncated even after maxids requested
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/lib/perl5/Bio/Root/Root.pm:357
STACK: Bio::DB::Query::WebQuery::_fetch_ids /usr/local/lib/perl5/Bio/ 
DB/Query/WebQuery.pm:237
STACK: Bio::DB::Query::WebQuery::ids /usr/local/lib/perl5/Bio/DB/Query/ 
WebQuery.pm:201
STACK: query.pl:9
-----------------------------------------------------------

This is the query script I use that works fine for me for my downloads.

http://fungalgenomes.org/~stajich/scripts/download_query_genbank.pl

I'm using SVN code so it is possible things are changed since 1.5.2.

-jason
On Sep 15, 2008, at 12:05 PM, Andrew Couperthwaite wrote:

> the code i'm starting with is this:
> =====
> use Bio::DB::Query::GenBank;
(Continue reading)

Brian Osborne | 16 Sep 04:22

Re: Bio::DB::Query::GenBank question

Jason,

I added that script to scripts/, hope you don't mind!

Brian O.

On Sep 15, 2008, at 3:25 PM, Jason Stajich wrote:

> This is the query script I use that works fine for me for my  
> downloads.

Gmane