[Biococoa-dev] mass calculator bug

John Timmer jtimmer at bellatlantic.net
Mon Aug 30 21:05:14 EDT 2004

> On Aug 30, 2004, at 2:25 AM, Alexander Griekspoor wrote:
>>> What I am trying to get at is to see if it is possible to have a
>>> separate method to test the entrySymbol and selfSymbol that goes in
>>> BCNucleotideDNA and BCAminoAcid  (or BCSequenceDNA and
>>> BCSequenceProtein). Then we can keep all the rangeOfSubsequence in
>>> BCSequence.
>> Perhaps it's indeed a good plan to let BCSymbol have the
>> isRepresentedBySymbol method that BCNucleotideDNA overrides to check
>> for ambiguous bases as well, that way BCSequence could have the
>> general methods.

Actually, I checked something in that takes full advantage of code in both
classes.  The problem was that I had _strict versions that checked for
equality with ==, and regular methods that worked with ambiguous bases.  I
eventually realized that the _strict version was a a good general testing

I took the _strict code, modified it slightly to work with all BCSymbols,
and used that for the range methods in the superclass.  I overrode the range
methods in the DNA subclass to test for ambiguous bases, and I
re-implemented the _strict versions in order to have them call up to the
super's regular method.

I haven't tested the code to make sure it works yet, but it compiles just

This mind intentionally left blank

More information about the Biococoa-dev mailing list