[Biococoa-dev] mass calculator bug

John Timmer jtimmer at bellatlantic.net
Sat Aug 28 11:13:27 EDT 2004

The following was left over from when I started with a DNA sequence class
before deciding what would be generally useful and moved to the superclass -
I had used "sequenceArray" instead of "sequence", but forgot to change it in
this location.  The idea behind it (and a lot else that I code) is to
prevent a user from doing something stupid, accidentally or maliciously.
Since we can't control what's in the array the user is handing us when it's
a raw array (as opposed to when we're handed a sequence) we need to make
sure that its contents will work with all the methods we're using on the
contents - hence the test for BCSymbols.

> John,  you implemented this method setSequence as follows:
> - (void)setSequence:(NSMutableArray *)anArray
> {
>      [sequenceArray release];
>      sequenceArray = [[NSMutableArray alloc] init];
>      NSEnumerator *theEnumerator = [sequenceArray objectEnumerator];
>      id aSymbol;
>      while ( aSymbol = [theEnumerator nextObject] ) {
>          if ( [aSymbol isKindOfClass: [BCSymbol class]] )
>              [sequenceArray addObject: aSymbol];
>      }
> }

> Is it possible to move all the rangeOfSubsequence variants that are now
> in BCSequeneDNA to BCSequence? I think the same code can be useful for
> proteins as well.
Please do!  And please fix my experimentation with the adenosine @"A" -> 'A'
conversion.  And rename anything you feel is necessary, as long as you're
careful with the find and replace!

It looks like I won't have CVS access all weekend (Koen, if you're annoyed
at Earthlink, I'm annoyed at Verizon), so I'll be working on something new
instead of contributing to the work on sequences, copying, and coding.

Incidentally, have you done a "step into" in the debugger to see where
things actually error out? And what's the error message?



This mind intentionally left blank

More information about the Biococoa-dev mailing list