[Bioperl-l] Annotation of features

David Block dblock@gnf.org
Thu, 26 Sep 2002 08:47:13 -0700


On Thursday, September 26, 2002, at 01:22  AM, Ewan Birney wrote:

>
>
> On Wed, 25 Sep 2002, Hilmar Lapp wrote:
>
>> Currently the only annotation you can stick on SeqFeatureIs is
>> tag/value pairs. This is orthogonal to SeqIs.
>>
>> I just realized that SeqFeature::Generic does have annotation(). I
>> vote for propagating this method to the interface level.
>
> We have a real push me/pull you situation here:
>
>
> Some people make millions upon millions of features, and size and
> implementation overhead is a big issue
>
>
> Some people have things like genes which are almost as good as any other
> annotatable thing.
>
>
> What about officially allowing mix-ins - an implementation can be both a
> SeqFeatureI and a AnnotationI (ie, can annotation()) and clients can 
> test
> with ISA. What is the drawback of this?
>
>
I like Lincoln's compromise better.

Attributes are just stored in a hash, but once annotation() is called, 
an Annotation object is created.  This is very lazy, and it suits both 
use cases.  Millions of SeqFeatures are all still simple, but as soon as 
you want a full Gene object, you got it.

Now I guess we see who codes it. :0)
>
>
>
>>
>> SeqFeatureI's tag/value annotation should be transparently the same
>> as for SeqI. This means tag/value pairs should be annotated as
>> Bio::Annotation::SimpleValue instances added to the
>> AnnotationCollection.
>>
>> This may, however, create significant overhead when SeqFeatureIs are
>> instantiated (every tag/value pair amounts to an object).
>> Thoughts/comments?
>>
>> The problem could possibly be alleviated by writing an adaptor that
>> adapts SeqFeatureI to AnnotationCollectionI, and annotation() would
>> return an instance of that adaptor. In that case the implementation
>> could make sure that you only incur the overhead once you actually
>> request those values.
>>
>> I'd be glad to hear anyone's thoughts on this.
>>
>> 	-hilmar
>>
>> --
>> -------------------------------------------------------------
>> Hilmar Lapp                            email: lapp at gnf.org
>> GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
>> -------------------------------------------------------------
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l@bioperl.org
>> http://bioperl.org/mailman/listinfo/bioperl-l
>>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
David Block                                  dblock@gnf.org
GNF - San Diego, CA             http://www.gnf.org
Genome Informatics / Enterprise Programming
Weblog:      http://radio.weblogs.com/0104507/