[Bioperl-l] Re: Bio::PrimarySeqI

Ewan Birney birney@ebi.ac.uk
Tue, 20 Feb 2001 08:35:52 +0000 (GMT)


On Tue, 20 Feb 2001, Hilmar Lapp wrote:

> Ewan Birney wrote:
> > 
> > On Mon, 19 Feb 2001, Hilmar Lapp wrote:
> > 
> > > <warning: the following is very technical>
> > >
> > > I started some cleanup work and cruft busting, beginning with seq
> > > classes.
> > >
> > > Some points about Bio::PrimarySeqI (and possibly others):
> > > - Do we still need can_call_new()? First, we can create an object
> > > of the same type by ref($self)->new() instead of $self->new().
> > > Second, every object can now accept $self->new(). The second may
> > > not necessarily be true for implementing classes that do not
> > > inherit from RootI, but the first is always true. (Isn't it?)
> > 
> > We need can-call-new. Some people (who are fronting databases) have
> > very thin wrappers over database handles implementing PrimarySeq, and we
> > shouldn't (in my view) burden them with having to catch ->new calls in a
> > fancy way to handle trunc/revcom etc...
> > 
> 
> Hmm. Do you mean people may have wrappers that do not implement a
> new() method?

Nope - they have a new method, but the new method is for example


   $primary_seq_implementor = 
     Bio::EnsEMBL::DBSQL::DBPrimarySeq->new($database_handle,$db_id);


This new function cannot be used for trunc/revcom/translate.


(ie, the new is specific to the implementation)


> 
> If so, I'll have to revert the code in PrimarySeqI ...
> 
> 	Hilmar
> -- 
> -----------------------------------------------------------------
> Hilmar Lapp                              email: hlapp@gmx.net
> GNF, San Diego, Ca. 92122                phone: +1 858 812 1757
> -----------------------------------------------------------------
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------