[Biojava-l] Refactored Protease and Digest classes

Jones, Mike Mike.Jones@mpi.com
Wed, 17 Apr 2002 10:59:16 -0400

It was brought to my attention that the Digest class was not handling
the not cleave functionality correctly in the latest revision of biojava
v2.11. This tells a protease to not cleave at a peptide bond if some bad
residue is adjacent (C-Terminally) to the cleavage site. Example
Prolines are bad for tryptic cleavage sites. 

I refactored the code and resubmitted it to CVS. Much nicer and less
verbose code as I am not doing all of that ugly char comparisons and
indexOf != -1 stuff.

For Example:

Old Code

SymbolTokenization toke =
if (toke.tokenizeSymbol(sequence.symbolAt(j)).charAt(0) ==

New Code

 List cleaveSites = protease.getCleaveageResidues().toList();
 Symbol aa = sequence.symbolAt(j);