[Bioperl-l] Database Retrieval

Chris Fields cjfields at uiuc.edu
Tue Aug 8 14:16:20 UTC 2006


On Aug 8, 2006, at 8:42 AM, Hilmar Lapp wrote:

>
>> ...
>> 'Front-end' classes that return appropriate objects (SeqI, LocationI,
>> etc) could be built around the DB class; the key is the consistent
>> interface.  So we would need a RandomAccessI-like interface for
>> LocationI, Annotation::References, etc.
>
> Sounds like a good idea. Do you feel like coding up prototypes?
> That'd be great.

I could work on that.  RandomAccessI is a pretty simple interface  
class with a few abstract methods:

get_Seq_by_id
get_Seq_by_acc
get_Seq_by_version

Other RandomAccessI-implementing modules add 'get_Stream*' methods,  
including 'get_Stream_by_query'.

Using that, we could have get_Location(s)*, get_Ref(s)*, get_Taxon/ 
Taxa*, etc.  Most of these would only use a unique ID or query, though.

Would we want to lump all these together in one non-specific  
interface class or split them up into several specific interfaces?   
Many of the latter will likely have only a few methods, but at least  
they would be consistent, so I think the latter.

> ...
> Yes, sure - but: one should keep in mind that bioperl as a library
> and as a project offers certain promises in return of the hassle to
> install and learn it, one of which is to offer implementations of
> common tasks as reusable code in well-defined and consistent APIs.
> Just keep that in mind as the long term picture ...

Agreed.  The only caveat: I think the 'backend' DB-specific class  
would, by necessity, have to use a DB-specific interface that allowed  
maximum access to the database.  The 'front-end' class which gets the  
raw data into Bioperlish objects must have a consistent Bioperl  
interface; this is something we really need to enforce.

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign






More information about the Bioperl-l mailing list