[Bioperl-l] PrimarySeqI and IdentifiableI

Hilmar Lapp hlapp@gnf.org
Fri, 6 Sep 2002 09:49:03 -0700


> -----Original Message-----
> From: Ewan Birney [mailto:birney@ebi.ac.uk]
> Sent: Friday, September 06, 2002 12:32 AM
> To: Hilmar Lapp
> Cc: Bioperl
> Subject: Re: [Bioperl-l] PrimarySeqI and IdentifiableI
> 
> 
> On Thu, 5 Sep 2002, Hilmar Lapp wrote:
> 
[...]
> > 
> > I'll have to fix Bio::Seq anyway (I guess there's little doubt it 
> > should be Identifiable), but if we decide to separate IdentifiableI 
> > (and DescribableI) from PrimarySeqI, I'll fix that right away, too.
> 
> It is a good question - I would say that they should 
> implement the methods
> but could easily pass back "" strings. What is the other solution - A
> composition solution? Then clients have to test whether
> 
> $seq->identifier() is undef?
> 

No, not composition (although that's an option too). By separation I
rather meant that then you can't assume that if obj->isa("Bio::PrimarySeqI")
is true $obj->isa("Bio::IdentifiableI") will be true, too.
You'd have to test for this separately before safely calling the
IdentifiableI methods. So, a PrimarySeqI implementation could opt
not to implement IdentifiableI.

Right now having tested for isa("Bio::PrimarySeqI") implies having
tested for isa("Bio::IdentifiableI").

	-hilmar