import jalview.analysis.AlignmentSorter;
import jalview.analysis.NJTree;
import jalview.analysis.scoremodels.ScoreModels;
+import jalview.analysis.scoremodels.SimilarityParams;
import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.ViewBasedAnalysisI;
import jalview.bin.Cache;
seqs = av.getSelectionGroup().getSequencesInOrder(
av.getAlignment());
}
- ScoreModelI sm = ScoreModels.getInstance().forName(pwtype);
- sm = configureScoreModel(sm);
- tree = new NJTree(seqs, seqStrings, type, pwtype, sm, start, end);
+ ScoreModelI sm = configureScoreModel(pwtype);
+ tree = new NJTree(av, type, sm, SimilarityParams.Jalview);
showDistances(true);
}
}
/**
- * If the score model is one that requires to get state data from the current
- * view, allow it to do so
+ * Gets the score model for the given name. If the score model is one that
+ * requires to get state data from the current view, allow it to do so
*
* @param sm
* @return
*/
- protected ScoreModelI configureScoreModel(ScoreModelI sm)
+ protected ScoreModelI configureScoreModel(String modelName)
{
+ ScoreModelI sm = ScoreModels.getInstance().forName(modelName);
if (sm instanceof ViewBasedAnalysisI)
{
try