JAL-2795 added back test loop for Aptx tree naming & initTreePanel
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 2 Nov 2017 17:58:05 +0000 (17:58 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 2 Nov 2017 17:58:05 +0000 (17:58 +0000)
src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java
src/jalview/gui/TreePanel.java

index 53cc2c2..93a9341 100644 (file)
@@ -49,9 +49,13 @@ public class ArchaeopteryxTreeConverter
 
   public Phylogeny buildAptxTree()
   {
-    // NeighborJoiningF foresterClustering = NeighborJoiningF
-    // .createInstance();
-    // aptxTree = foresterClustering.execute(distances);
+    // test loop
+    for (SequenceI sequence : sequences)
+    {
+      PhylogenyNode sequenceNode = new PhylogenyNode(sequence.getName());
+      rootNode.addAsChild(sequenceNode);
+    }
+    aptxTree.setRoot(rootNode);
 
 
     treeTitle = generateTreeName();
index f25000f..57cff8f 100755 (executable)
@@ -95,7 +95,7 @@ public class TreePanel extends GTreePanel
     this.treeType = treeType;
     this.substitutionMatrix = substitutionMatrix;
     this.tree = tree;
-    initNewTreePanel(ap, tree);
+    initTreePanel(ap, tree);
 
     // We know this tree has distances. JBPNote TODO: prolly should add this as
     // a userdefined default
@@ -115,7 +115,7 @@ public class TreePanel extends GTreePanel
   {
     super();
     this.treeTitle = theTitle;
-    initLoadedTreePanel(alignPanel, newtree, inputData);
+    initTreePanel(alignPanel, newtree, inputData);
   }
 
   public AlignmentI getAlignment()
@@ -128,7 +128,7 @@ public class TreePanel extends GTreePanel
     return treeCanvas.av;
   }
 
-  void initNewTreePanel(AlignmentPanel ap, TreeModel tree)
+  void initTreePanel(AlignmentPanel ap, TreeModel tree)
   {
     buildTreeCanvas(ap);
 
@@ -136,7 +136,7 @@ public class TreePanel extends GTreePanel
     tl.start();
 
   }
-  void initLoadedTreePanel(AlignmentPanel ap, 
+  void initTreePanel(AlignmentPanel ap, 
           NewickFile newTree, AlignmentView inputData)
   {
     buildTreeCanvas(ap);