*/
package jalview.analysis;
+import jalview.analysis.scoremodels.PairwiseDistanceModel;
import jalview.analysis.scoremodels.ScoreMatrix;
import jalview.analysis.scoremodels.ScoreModels;
import jalview.datamodel.BinarySequence;
String sm = s_m;
if (sm != null)
{
- smtrx = (ScoreMatrix) ScoreModels.getInstance().forName(sm);
+ smtrx = (ScoreMatrix) ((PairwiseDistanceModel) ScoreModels
+ .getInstance()
+ .forName(sm)).getScoreModel();
}
if (smtrx == null)
{
// either we were given a non-existent score matrix or a scoremodel that
// isn't based on a pairwise symbol score matrix
- smtrx = (ScoreMatrix) ScoreModels.getInstance().forName(
- sm = (nucleotides ? "DNA" : "BLOSUM62"));
+ smtrx = ScoreModels.getInstance().getDefaultModel(!nucleotides);
}
details.append("PCA calculation using " + sm
+ " sequence similarity matrix\n========\n\n");