[Biococoa-dev] Design question

Koen van der Drift kvddrift at earthlink.net
Fri Aug 6 18:06:33 EDT 2004

Hi all,

Here are some of my thoughts about the framework design.

In the last few messages I missed any mention of a BCSequence class  
that more or less functions as the center of the framework. It's main  
member is then probably an NSString representing the sequence (DNA,  
RNA, protein). This is easy because they all are single character based  
sequences (unlike eg glycans).

Additionally this class could have an NSMutableArray member consisting  
of objects that represent each single base, amino acid. Whenever the  
NSString is edited, the NSMutableArray is updated, and vice versa. We  
could have a BCRootObject from which BCAminoAcid, BCNucleotide, etc  
derive. These nucleotide and amino acid classes can then store more  
info about themselves, eg long name, pI, MW, modifications,  
annotations, etc. Also BCFunctionalGroup (methyl, phosphate) could be  
based on BCRootObject.

Regarding the question whether the sequences should be 0-based or  
1-based, I suggest we use both :) The BCSequence can have an NSRange  
member that is 1-based (or two ints indicating the start and end  
position), and the NSString and NSMutableArray are both 0-based.

Another thing is that we should try to make the enzyme class (or any  
class that acts on a sequence) universal so it works both for DNA and  
proteins. Or at least have a base clase and put specific functionality  
in a DNAEnzyme and ProteinEnzyme class.

Here are some liks to naming conventions:


BTW, I am writing an app that among other things digests proteins  
(could you guess ;-), and can provide
code for that.

- Koen.

More information about the Biococoa-dev mailing list