[Biococoa-dev] BCSequence
Koen van der Drift
kvddrift at earthlink.net
Tue Aug 24 20:05:34 EDT 2004
On Aug 23, 2004, at 5:51 PM, John Timmer wrote:
> Okay, I'm about to commit a major update to BCSequence that eliminates
> the
> sequence string and reworks some of the related methods and
> initializers. I
> also took the time to reorganize the methods a bit to make navigating
> the
> file a bit easier.
>
John,
A few comments.
You put this in the header for the molecularWeight method:
/*!
@method - (float) molecularWeight
@abstract returns the predicted molecular weight of the sequence
@discussion calculates the predicted molecular mass of the
sequence, based on
* average isotope use. Subclasses calculate based on the loss of
atoms (ie -
* H20 in peptide bond formation) and use averages for symbols that
represent more
* than 1 individual symbol.
*/
It's better if we make the method as follows:
- (float) molecularWeight (int) mode
where in mode we pass a enumerated constant monoisotopic or average.
You cannot predict in advance if a client needs the monoisotopic or
average mass.
Also we should always add water for any sequence (only one
watermolecule is necessary for a whole sequence), so we might as well
put it in the same method instead of delegating it to the subclasses.
The masses in the plist are actually residue masses, so without H2O. I
will make these changes tonight.
You added the method length, but there is alreasy a method
numberOfSymbols. However, because the naming of the first one is more
logical, I will remove the numberOfSymbols method as well.
I'll wait for some input before I commit my changes.
Otherwise, a great improvement! I started with a BCSequenceProtein
class, but see that most of the sequence manipulation is already in
BCSequence. Not sure right now what else should go in that class. As
Alex already suggested, additional functionality (pI calculations,
digests, etc) should be in helper classes, such as BCProteinTools.
- Koen.
More information about the Biococoa-dev
mailing list