[Biococoa-dev] BCSequenceRecord

Charles Parnot charles.parnot at gmail.com
Sat Jul 9 00:25:35 EDT 2005

> What I am suggesting is that we keep the BCSequence class just for  
> managing the sequence, such as creating, inserting, etc, and thus  
> keep it very lightweight. To store any annotations and features we  
> create a new class BCSequenceRecord. This is what will be created  
> in the IO classes, and it will have a BCSequence object in one of  
> its key-value pairs. So we remove NSMutableDictionary *annotations  
> from BCAbstractSequence and move it to BCSequenceRecord.
> The advantage is that when you are just dealing with sequences, you  
> want it to be as small as possible, and don't have the additional  
> luggage of all the annotations.
> Does that make more sense?
> - Koen.

You are suggesting to add yet another hierarchy of classes, 6  
total ??!?? ;-)

Anyway, we already had that discussion and the bottom line was: the  
annotations would be just one ivar = 4 bytes when nil, slightly more  
when empty dictionary, which is anyway very small compared to the  
sequence array of char.

What we should provide are 'annotation-free' methods when spitting  
out subsequences, alignements, etc... e.g. having a optional last  
argument, e.g.:

- (BCSequence *)subsequenceWithRange:(NSRange)aRange keepAnnotations: 


Help science move fast forward:

Charles Parnot
charles.parnot at gmail.com

More information about the Biococoa-dev mailing list