import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.SimilarityParamsI;
import jalview.datamodel.SequenceGroup;
-import jalview.ext.archaeopteryx.ArchaeopteryxInit;
+import jalview.ext.archaeopteryx.AptxInit;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.beans.PropertyVetoException;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Open and calculate the selected tree or PCA on 'OK'
+ *
+ * @throws IOException
*/
protected void calculate_actionPerformed()
{
}
else
{
- createTree(substitutionMatrix, params);
+ try
+ {
+ createTree(substitutionMatrix, params);
+ } catch (IOException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
protected void createTree(String substitutionMatrix,
- SimilarityParamsI params)
+ SimilarityParamsI params) throws IOException
{
String treeAlgo = determineTreeAlgo();
TreeCalculator treeCalculator = new TreeCalculator(treeAlgo,
substitutionMatrix, params);
TreeBuilder calculatedTree = treeCalculator.makeTree(af.getViewport());
- ArchaeopteryxInit.createInstance(calculatedTree);
+ // AptxInit.createInstanceFromCalculation(calculatedTree);
TreeModel tree = new TreeModel(calculatedTree);
- openTreePanel(tree, treeAlgo, substitutionMatrix);
+ jalview.io.NewickFile newick = new jalview.io.NewickFile(
+ tree.getTopNode());
+ String output = newick.print(tree.hasBootstrap(), tree.hasDistances(),
+ tree.hasRootDistance());
+ AptxInit.createInstanceFromNhx(af.getTitle(), output,
+ af.getViewport());
+ // openTreePanel(tree, treeAlgo, substitutionMatrix);
}