Fwd: [Biococoa-dev] sequence wrappers

Alexander Griekspoor mek at mekentosj.com
Thu Dec 16 08:00:26 EST 2004


>
> On Dec 16, 2004, at 7:34 AM, Alexander Griekspoor wrote:
>
>> Hmm, that doesn't make sense to me, BCAnnotation and BCFeature 
>> objects yes, but not special BCAnnotationS and BCFeatureS objects. 
>> These can simply be contained in an array or dictionary, no need for 
>> a collection object IMHO...
>>
>
> The advantage would be that we can have more descriptive convenience 
> methods:
>
> addFeature: (id)feature forKey: (id)key
>
>  instead of the less descriptive method from NSMutableDictionary:
>
> - (void)setObject:(id)anObject forKey:(id)aKey
>
No, those should be part of the annotated sequence object! It then 
internally uses the normal mutablearray methods to add it to the list 
(thus hidden from the user): [myBCAnnotatedSequence addFeature: 
myFeature forKey: myKey];
I don't see why you would want to do all this outside the context of 
the annotatedSequence.
You can always make the array of the BCAnnotatedSequence accessible 
(either directly or not) through accessors, but also those can be made 
nicely by adding these methods to  the BCAnnotatedSequence class which 
again internally use a classical NSMutableArray:

addFeature: (id)feature forKey: (id)key
addFeatures: (NSArray *)features forKeys: (id)key
or the addFeaturesWithKeys (Null terminated list)
removeFeature: (id)feature forKey: (id)key
(NSArray *)features
etc

> BTW, what's the difference between BCFeature and BCFeatureS ?
Tell me if I'm wrong but you want to have
- a bcfeature object, respresenting a single feature
AND
- a bcfeatures object, representing a collection of features

I strongly argue to only implement the first and dump the second...
Alex

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

	Claiming that the Macintosh is inferior to Windows
	because most people use Windows, is like saying
	that all other restaurants serve food that is
	inferior to McDonalds

*********************************************************


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

           LabAssistant - Get your life organized!
           http://www.mekentosj.com/labassistant

*********************************************************




More information about the Biococoa-dev mailing list