[Bioperl-l] LWP in Bio::DB::GenBank.pm

Jason Stajich jason@chg.mc.duke.edu
Sat, 25 Nov 2000 18:49:44 -0500 (EST)


My solution was a bit simplistic, I guess I should have delved into the
intricacies of LWP::UserAgent.  Using a stream seems like the right way to
go.

Hilmar, have you made any progress on the concept of a single class for DB
remote access with GenBank and GenPept inheriting off of it?  It would make
sense to try and do all the changes at the same time, and DB::SwissProt
might fit into that as well? It is just a different base url.  Perhaps we
need a class that is Bio::DB::WebDB.

I've also been thinking I'd like a Bio::DB::Blast which can pull sequences
out of local blast db's.  I'm sure someone has had experience with that - or
that functionality is already in Bio::Index and I'm just not aware.

-Jason

----- Original Message -----
From: "Aaron J Mackey" <ajm6q@virginia.edu>
To: "Hilmar Lapp" <hlapp@gmx.net>
Cc: "Jason Stajich" <jason@chg.mc.duke.edu>; "Ewan Birney"
<birney@ebi.ac.uk>; "Bioperl" <bioperl-l@bioperl.org>
Sent: Saturday, November 25, 2000 2:34 PM
Subject: Re: [Bioperl-l] LWP in Bio::DB::GenBank.pm


>
> Sorry, should have been more specific:
>
> >From the perldoc pages of LWP::UserAgent:
>
>        The request() method can process the content of the
>        response in one of three ways: in core, into a file, or
>        into repeated calls to a subroutine.  You choose which one
>        by the kind of value passed as the second argument to
>        request().
>
> Seems like the callback should be usable here in order to enable
> streaming, pipe-lined processing.
>
> -Aaron
>
> On Sat, 25 Nov 2000, Aaron J Mackey wrote:
>
> >
> > LWP::Request is capable of returning a filehandle/stream ... read the
> > documentation.
> >
> > -Aaron
> >
> > On Fri, 24 Nov 2000, Hilmar Lapp wrote:
> >
> > > Due to the migration of DB::GenBank.pm to using LWP for making the
> > > queries, the result is retrieved as one string. This can be a bad
idea,
> > > especially if the user requested batch retrieval of a number of
> > > sequences, and each of them is large (there is even not a chance to
> > > process these one after the other, with disposing of each sequence
once
> > > it is processed). That is, there is also no chance for a
> > > large-seq-specialized class to hook in, and any processing will only
> > > start after everything has been downloaded (and slurped into memory).
> > >
> > > We need to decide whether we want to particularly discourage asking
for
> > > a number of sequences simultaneously, or whether there is a
possibility
> > > to return a true stream.
> > >
> > > Hilmar
> > >
> >
> >
>
> --
>  o ~   ~   ~   ~   ~   ~  o
> / Aaron J Mackey           \
> \  Dr. Pearson Laboratory  /
>  \ University of Virginia  \
>  /  (804) 924-2821          \
>  \  amackey@virginia.edu    /
>   o ~   ~   ~   ~   ~   ~  o
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>