[Bioperl-l] Bio::DB::EMBL

Hilmar Lapp hilmarl@yahoo.com
Wed, 04 Apr 2001 10:19:06 -0700


Jason Stajich wrote:
> > >
> > > I've just committed Bio::DB::EMBL which has four methods for
> > > retrieving entries:
> > >
> > > get_Seq_by_id()
> > > get_Seq_by_acc()
> > > get_Seq_by_version()
> > > get_Stream_by_batch()
> > >
> > >
> > > Design issues:
> > >
> > > The get_Seq_by_version() is a new method and should probably be added
> > > into
> > >

I agree with Ewan's suggestion here. get_Seq_by_acc_version()
sounds more intuitive (to me).

As for the interface, I'm not sure. I think if we put it there,
implementors should at least be able to fake it if the underlying
DB doesn't provide for versioned seqs. E.g., for those
get_Seq_by_acc_version() is the same as calling get_Seq_by_acc().
Would that make sense?

> > > get_Stream_by_batch() is in Bio::DB::NCBIHelper but I rather not
> > > inherit from it. ;-) Bio::DB::WebDBSeqI again?
> >
> I'm cool moving it, will just have to see how we can implement this for
> DB::SwissProt which does not allow batch retrieval ( can fake it I guess
> and iterate through the list).

Exactly. If we put it into an interface, almost all inheriting
classes should be able to provide a sensible implementation. This
means that if the DB doesn't have a special batch interface, the
implementation will have to fake it, which I guess implies
downloading and temporarily storing the entries (the method is
supposed to return a SeqIO stream, right?). One could write a
wrapper module though.

As for EMBL.pm, imposing a limit is not particularly clean and
convenient; at least if the limit is exceeded the method should
throw an exception.

	Hilmar
-- 
-----------------------------------------------------------------
Hilmar Lapp                              email: hilmarl@yahoo.com
GNF, San Diego, Ca. 92122                phone: +1 858 812 1757
-----------------------------------------------------------------