[Biococoa-dev] Symbols, codons and functional groups

Charles PARNOT charles.parnot at stanford.edu
Sat Mar 5 18:49:21 EST 2005

At 10:50 AM -0500 3/4/05, John Timmer wrote:
>....<snip>...Anyway, as an aside, i've been thinking that the symbol set structure would
>allow for a nice encapsulation of a genetic code.  The problem is that
>codons aren't symbols (since they have both amino acid and nucleotide
>information).  Any suggestions on how to adapt things?

I thought of that too at some point.
And my idea was: codons could simply be symbols, to benefit from the BCSymbol/BCSequence/BCSymbolSet design. At this point, symbols are one char, but a subclass could add  an ivar.
Then, in BCSequence et al., we should distinguish between countSymbols and length.

At 5:12 PM -0500 3/5/05, Koen van der Drift wrote:
>I am thinking about adding a class that will take care of functional groups on sequences, eg methyl, phosphate, etc. My first thought was to make it a subclass of BCSymbol. However, it will then also inherit the representedBy code, etc. That is not so useful for functional groups (or maybe they are?). So, what I plan to do is to make a new, abstract root class for symbols, maybe called BCRoot. Then BCSymbol and BCFunctionalGroup wll inherit from BCRoot. The BCRoot class will have a lot of the code of BCSymbol, eg for name, mass, etc. However, some things will be in BCSymbol, eg initializeSymbolRelationships. The functional groups can be attached to the sequence, using the not-yet-existing BCFeature class. The BCFunctionalGroup can also have an ivar pointing to the symbol it is attached to.
>What do you guys think? For proteins functional groups are very important, and the probably need their own class. What about DNA/RNA? Are functional groups important, eg when digesting?

Functional groups can be useful for DNA and RNA as well. Methylation(s), ddNTP, dephosphorylation

I see a connection with codons here: we may need symbols with more than one char. These could be subclasses, either of the current root class (codons) or of DNA, RNA, protein symbols. Or we could have a symbol class that handles symbols with more than one char.

The ' representedBy' method could be useful for functional groups too.

If we use suclasses, then maybe we need a 'sequenceType' method, so symbolSet can contain symbols of different classes and just need to check the sequenceType compatibility...
so that BCSymbol>>BCSymbolSet>>BCSequenceXXX of the same type always go together.

>Also, when looking at the code of BCSymbol, I noticed that we use the initializer initWithSymbol:(unichar)aChar. Maybe we can change this to initWithChar, or even add that method? When using the word 'symbol' I would expect a BCSymbol, not a char. I remember we discussed this earlier, but I forgot why we eventually decided to use initWithSymbol instead of initWithChar.

Not sure about that (I was not there), I'd say that 'initWithChar' is more logical.


Help science go fast forward:

Charles Parnot
charles.parnot at stanford.edu

Room  B157 in Beckman Center
279, Campus Drive
Stanford University
Stanford, CA 94305 (USA)

Tel +1 650 725 7754
Fax +1 650 725 8021

More information about the Biococoa-dev mailing list