[Biococoa-dev] More on BCSymbolSets

Charles PARNOT charles.parnot at stanford.edu
Sat Mar 5 18:41:33 EST 2005

At 12:20 PM -0500 3/5/05, John Timmer wrote:
> >
>> On Mar 4, 2005, at 8:08 PM, John Timmer wrote:
>>>> But each set will only have nucleotides or amino acids. They are not
>>>> intended to mix.
>>> Okay, so we will have no user-defined sets, and I would go in, grab the
>>> first symbol, and test what type of symbol it is?  Wouldn't that get
>>> into
>>> issues like testing its class, which Charles indicated might not be
>>> the best
>>> way of determining this?
>> That's a good point. So we could move the BCSequenceType ivar to
>> BCSymbolSet.
>Yes, and just make the method that's now in BCSequence a convenience
>call-through to that.  To maintain key/value coding, we could just have the
>setter method do nothing.

We're getting close!

In the initializer, it is necessary to check that the BCSymbolSet is the right type before using it, right? So it would still be nice to have a sequenceType method for the BCAbstractSequence subclasses, which will always return the same value (no need for an ivar), and which does not rely on the BCSymbolSet (because, obviously, in the intializer, it has not been set yet). So the initializer in the superclass implementation can simply check that the BCSequence type and the BCSymbolSet type are compatible.


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