[Biococoa-dev] BCAlignment header added

Alexander Griekspoor mek at mekentosj.com
Tue Feb 22 19:12:45 EST 2005

> Another thing about the BCAnnotations ..
> I would suggest a BCAnnotable protocol with
> - (void)setAnnotation:(id)aAnnotation forKey:(id)key;
> - (id)annotationForKey:(id)key;
> - (class)classForKey:(id)key;
> this would lead us to a much sleeker structure. I think we will run 
> into performance problems, if we have to handle that complex structure 
> in every BCSequence object.
> and with the protocol everything could be annotable even the Alignment 
> or other things as well.

Great suggestion phil, it would mean that for instance the alignment 
object/factory/whatever is also able to generate BCAnnotation objects 
right? An official protocol would indeed be nice. I'll add it to the 
BCAnnotation class. The protocol would then become the following 
- (void)setAnnotation:(BCAnnotation *)aAnnotation forWithName:(NSString 
*) aName;
- (BCAnnotation *)annotationForName:(NSString *)aName;
- (id)contentForName: (NSString *) aName;
- (NSString *)dataTypeForName: (NSString *) aName;

and the identical methods for features. No clue yet how sets would fit 
in here, but I'll think about it.
perhaps the object supporting this protocol could also have the method: 
- (NSArray *)availableAnnotations; or something which would return an 
array of all available annotations it can provide (from a plist if 
necessary), like a way to vend them to the user.

Note that adding a protocol to the object, still means that all logic 
to handle, set, store, and manipulate the annotation in an object like 
BCAbstractSequence still has to be implemented by the class. The 
protocol will only ensure that all these objects have a uniform 
interface with respect to setting and getting annotations....

Any thoughts on this are welcome of course...
Now, I will quickly peek at your alignment code as I'm really curious, 
and then I really have to get some sleep...

> cheers
> Phil
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
                     ** Alexander Griekspoor **
              The Netherlands Cancer Institute
              Department of Tumorbiology (H4)
         Plesmanlaan 121, 1066 CX, Amsterdam
                    Tel:  + 31 20 - 512 2023
                    Fax:  + 31 20 - 512 2029
                    AIM: mekentosj at mac.com
                    E-mail: a.griekspoor at nki.nl
                Web: http://www.mekentosj.com

       Microsoft is not the answer,
       Microsoft is the question,
       NO is the answer


More information about the Biococoa-dev mailing list