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

Lincoln Stein lstein@cshl.org
Sat, 20 Jul 2002 12:45:40 -0400


An alternative is to have a single "anonymous" identifier that is returned by 
all PrimarySeqI objects that do not have an identifier.  This way we could 
check to see if the identifier returned is "anonymous", otherwise we proceed.

The LSID might be:

	devnull:devnull:anonymous:1

Lincoln

On Thursday 18 July 2002 06:21 am, Matthew Pocock wrote:
> (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
>
> _______________________________________________
> Open-Bio-l mailing list
> Open-Bio-l@open-bio.org
> http://open-bio.org/mailman/listinfo/open-bio-l

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein@cshl.org			                  Cold Spring Harbor, NY
========================================================================