- matrixEncode(matrix.isDNA() ? ResidueProperties.nucleotideIndex :
- ResidueProperties.aaIndex, matrix.getMatrix());
- }
-
- /**
- * DOCUMENT ME!
- */
- public void blosumEncode()
- {
- matrixEncode(ResidueProperties.aaIndex, ResidueProperties.getBLOSUM62());
+ if (isNa != smtrx.isDNA())
+ {
+ throw new InvalidSequenceTypeException("matrix "
+ + smtrx.getClass().getCanonicalName()
+ + " is not a valid matrix for "
+ + (isNa ? "nucleotide" : "protein") + "sequences");
+ }
+ matrixEncode(smtrx.isDNA() ? ResidueProperties.nucleotideIndex
+ : ResidueProperties.aaIndex, smtrx.getMatrix());