[Open-bio-l] Re: [Bioperl-l] seq namespace method

Matthew Pocock matthew_pocock@yahoo.co.uk
Thu, 18 Jul 2002 11:21:03 +0100


(oops - hit r not R)

> Lincoln Stein wrote:
> I liked the compromise you published earlier yesterday:
> 
>     - Bio::PrimarySeqI inherits/implements IdentifiableI.
>         This is its "one true" name.
>     - The cloud of other identifiers is attached to Bio::Seq via
>     its AnnotationCollectionI.
> 
> I will work on IdentifierCollectionI as a separate interface.
> 
> Lincoln

All sounds sensible. One small thing. Do you want to make all 
Bio::PrimarySeqI objects implement IdentifiableI, or should it be 
implementation-specific? Not every implementation (or even every 
instance of a given implementation) will have data that can be used to 
construct a meaningfull identifier. To avoid generating 'made up' 
identifiers or passing undefs arround, I would be happier to see code like:

if($seq->ISA("IdentifiableI")) {
   $id = $seq->identifier();
}

This could be the general pattern for any entity that could be 
identifiable e.g.

$seq->ISA("IdentifiableI")
$phylogeny->ISA("IdentifiableI");
$expression->ISA("IdentifiableI");
$cluster->ISA("IdentifiableI");
$alignment->ISA("IdentifiableI");
$feature->ISA("IdentifiableI");
$applicationRunner->ISA("IdentifiableI");

Matthew