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;
.println("new alignment sequences vector value is null");
}
- tree.UpdatePlaceHolders((List<SequenceI>) evt.getNewValue());
+ tree.updatePlaceHolders((List<SequenceI>) evt.getNewValue());
treeCanvas.nameHash.clear(); // reset the mapping between canvas
// rectangles and leafnodes
repaint();
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);
}
NewickFile fout = new NewickFile(tree.getTopNode());
try
{
- cap.setText(fout.print(tree.isHasBootstrap(), tree.isHasDistances(),
- tree.isHasRootDistance()));
+ cap.setText(fout.print(tree.hasBootstrap(), tree.hasDistances(),
+ tree.hasRootDistance()));
Desktop.addInternalFrame(cap, newTitle, 500, 100);
} catch (OutOfMemoryError oom)
{
{
jalview.io.NewickFile fout = new jalview.io.NewickFile(
tree.getTopNode());
- String output = fout.print(tree.isHasBootstrap(),
- tree.isHasDistances(), tree.isHasRootDistance());
+ String output = fout.print(tree.hasBootstrap(),
+ tree.hasDistances(), tree.hasRootDistance());
java.io.PrintWriter out = new java.io.PrintWriter(
new java.io.FileWriter(choice));
out.println(output);
}
/**
- * 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