[Biococoa-dev] more on BCCodon

John Timmer jtimmer at bellatlantic.net
Mon Sep 6 14:27:14 EDT 2004

> Hi,
> While editing the BCCodon file (as discussed yesterday), I realized
> that BCCodon is actually a sequence of three bases. Would it be an idea
> to make BCCodon a subclass of BCSequence (or BCSequenceDNA)? The method
> tripletString can than just return [self sequenceString];

The problem with codons is that they don't really fit neatly into the
defined classes.  There's always a few methods in the Symbol and Sequence
classes that don't make any sense when applied to a codon.  Given that, it
seemed more useful to have a BCSequenceCodon, so I specifically avoided
using it as a superclass.  While I'm on my flights later this week, I'm
going to try to figure out a way to squeeze them in as a subclass of
BCSymbol, but I'm not optimistic.

I'd originally had a codon contain a BCSequence for holding the bases it
encompassed, but that turned out to be terminally slow, as it took two
ObjC_msgSend calls in order to look up each base or 6 to do anything useful
with the actual codon, so that was removed as part of my optimization.



This mind intentionally left blank

More information about the Biococoa-dev mailing list