[Bioperl-l] Changes to Bio::SeqI broke Bio::Graphics

Ewan Birney birney@ebi.ac.uk
Sat, 9 Nov 2002 12:53:50 +0000 (GMT)


On Fri, 8 Nov 2002, Lincoln Stein wrote:

> >
> > Why? So that they looked like sequence features? I still think it is wrong
> > to have Bio::SeqI inherieting from Bio::RangeI.
> 
> When rendering the features of a sequence, it looks nice to have a single 
> feature that goes all the way across the whole sequence labeled with the 
> display_id of the sequence.  When Bio::SeqI had start() and end() features, 
> this was sufficient to pass the sequence object to the drawing code and get 
> the desired effect.
> 

I think this is changing the sequence interface for a specific use case. I
would claim a better pattern here is:

 
  Bio::SeqFeature::SequenceExtent

which is-a Bio::SeqFeatureI and has-a Bio::SeqI and chains the call to
"end" to "length" and also "has_tags" etc to something sensible in
Bio::AnnotationCollection.

I am happy to write this. Does this sound like a better solution?