[Bioperl-l] AnnotationCollectionI and SeqFeatureI changes

Allen Day allenday at ucla.edu
Tue Nov 23 16:54:04 EST 2004

On Tue, 23 Nov 2004, Aaron J. Mackey wrote:

> > I didn't want to write the *_tag_* methods into 
> > Bio::SeqFeature::Annotated,
> > which precipitated their deprecation and mapping to 
> > Bio::AnnotationCollectionI.
> I read and re-read this sentence a few times, and it took awhile to 
> understand what it means.  Now that I've looked at the code, it seems 
> that Bio::SeqFeature::Annotated implements the Bio::SeqFeatureI 
> interface; Bio::SeqFeatureI calls for get_tag_values() to be 
> implemented; so instead of implementing get_tag_values for 
> Bio::SeqFeature::Annotated objects, you made Bio::SeqFeatureI inherit 
> from Bio::AnnotationCollectionI, and then reimplemented 
> get_tag_values() in AnnotationCollectionI to simply call 
> get_Annotations() (deprecating it in the process)?


> While it "works", I don't see why it had to be done this way; I'd 
> prefer a solution that didn't involve changing the definition of 
> Bio::SeqFeatureI (at least not yet).  Further, your "deprecations" seem 
> to indicate that you simply want Bio::SeqFeatureI to go away entirely, 
> and have us treat everything as an annotation collection (which may or 
> may not have a location on a sequence).  Is this the agreed-upon way of 
> the future?  What are you gaining, besides forcing my fingers to learn 
> get_Annotations($tag) instead of get_tag_values($tag)?

you've got the gist of it.  i want features to be AnotatableI, not be 
AnnotationCollectionI themselves.  the main payoffs i see here are:

[1] consistency amongst annotated objects.  why should SeqFeatureI do 
things differently?

[2] possibility of strong annotation typing (e.g.  
Bio::Annotation::OntologyTerm instead of a plaintext string).  this is the
main reson driving the changes.

> I'm all for sweeping change for consistency and logic, and 1.5 is meant 
> to be a developer's release on the road to 1.6, so this *might* be the 
> right time for it, as long as there is general agreement, and it 
> doesn't (significantly) break existing tools without great reason.

the current interface method shuffling has the higher goal of consistency,
and was the best i could come up with for shoehorning SeqFeatureI into
being AnnotatableI.  i'm open to suggestions if someone sees a better way.


> Thanks,
> -Aaron
> --
> Aaron J. Mackey, Ph.D.
> Dept. of Biology, Goddard 212
> University of Pennsylvania       email:  amackey at pcbi.upenn.edu
> 415 S. University Avenue         office: 215-898-1205
> Philadelphia, PA  19104-6017     fax:    215-746-6697

More information about the Bioperl-l mailing list