removed accidental added enters, commented out broken memory test line
[jalview.git] / src / jalview / gui / CalculationChooser.java
index d0315a6..8b4c212 100644 (file)
@@ -28,7 +28,7 @@ import jalview.analysis.scoremodels.SimilarityParams;
 import jalview.api.analysis.ScoreModelI;
 import jalview.api.analysis.SimilarityParamsI;
 import jalview.datamodel.SequenceGroup;
-import jalview.ext.archaeopteryx.ArchaeopteryxTreeBuilder;
+import jalview.ext.archaeopteryx.ArchaeopteryxInit;
 import jalview.util.MessageManager;
 
 import java.awt.BorderLayout;
@@ -108,6 +108,11 @@ public class CalculationChooser extends JPanel
 
   List<String> tips = new ArrayList<>();
 
+  /*
+   * the most recently opened PCA results panel
+   */
+  private PCAPanel pcaPanel;
+
   /**
    * Constructor
    * 
@@ -479,9 +484,10 @@ public class CalculationChooser extends JPanel
       TreeBuilder calculatedTree = treeCalculator
               .makeTree(af.getViewport());
       TreeModel tree = new TreeModel(calculatedTree);
+
       openTreePanel(tree, treeAlgo, substitutionMatrix);
+      ArchaeopteryxInit.createInstance(calculatedTree);
 
-      ArchaeopteryxTreeBuilder aptxTree = new ArchaeopteryxTreeBuilder();
 
 
     }
@@ -489,6 +495,9 @@ public class CalculationChooser extends JPanel
     // closeFrame();
   }
 
+
+
+
   protected String determineTreeAlgo() // to be modified & expanded
   {
     String treeAlgorithm = neighbourJoining.isSelected()
@@ -561,7 +570,7 @@ public class CalculationChooser extends JPanel
               JvOptionPane.WARNING_MESSAGE);
       return;
     }
-    new PCAPanel(af.alignPanel, modelName, params);
+    pcaPanel = new PCAPanel(af.alignPanel, modelName, params);
   }
 
   /**
@@ -603,7 +612,6 @@ public class CalculationChooser extends JPanel
      */
     boolean matchGap = doPCA ? false : treeMatchGaps;
 
-
     return new SimilarityParams(includeGapGap, matchGap, includeGapResidue,
             matchOnShortestLength);
   }
@@ -620,4 +628,9 @@ public class CalculationChooser extends JPanel
     {
     }
   }
+
+  public PCAPanel getPcaPanel()
+  {
+    return pcaPanel;
+  }
 }