[Biococoa-dev] Comments on BCAnnotation

Alexander Griekspoor mek at mekentosj.com
Thu Feb 24 05:17:11 EST 2005

>> After going through your code, Alex, here are my comments:
>> * we should make BCAnnotation and BCFeature immutable and thus not 
>> have any setter; for instance, the annotations would otherwise have 
>> to be physically copied every time a piece of sequence is copied and 
>> pasted or used for alignement, etc...
> you are definitly right. There is perhaps one problem, but perhaps it 
> isn't a real problem ;-)... what happens with the BCFeature positions 
> if i insert gaps into the sequence. If the positions have no set 
> method everybody has to know that this positions are the ones without 
> gaps.
> I'm also not sure wether we need a special BCSequence class for 
> alignment or not. Perhaps we need only a BCMutableSequence with the 
> corresponding BCSymbolSet including a gap-symbol. This is open for 
> discussion ....

Annotations can be immutable as they are position independent indeed, 
but per definition the range of a BCFeature of a mutable sequence 
(which ours is at the moment) should be mutable as well. Good thought 

> I committed a very very simple start for the BCAlignment class, please 
> take a look and tell me what you think we need.
> Next point are scoring matrices. I would suggest a handling similar to 
> your handling with the genetic code stuff. We store the PAM etc in 
> plists, but i think we need to be carfeul with storing the matrix in 
> the object. perhaps a int** is the best. Anyone a good idea ?

Again, that comes down to performance vs elegance I guess. A matrix 
object is very nice as it offers a so much richer experience.
It depends how often the matrix is accessed. Instantiating a matrix 
from a plist is a really nice idea, which brings me to a few options 
that might be something you like:
- We could implement a matrix object that can instantiate itself from a 
plist (class method) and has all the nice cocoa things you can think of 
(for instance asking it the cocoa way for a substitution score, a name 
accessor for use in popupbuttons etc). Now for alignments you can have 
an accessor which simply returns a classic C matrix representation that 
you can use in your alignment methods. Best of both worlds.
- Alternatively, we can a sort of matrix factory which does the plist 
conversion into a c type matrix.
You can guess which one I like most ;-)

                      ** 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

    The requirements said: Windows 2000 or better.
    So I got a Macintosh.


More information about the Biococoa-dev mailing list