From e1d12a58772f9928079c29062df3193213688b8d Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Thu, 2 Nov 2017 17:58:05 +0000 Subject: [PATCH] JAL-2795 added back test loop for Aptx tree naming & initTreePanel --- .../ext/archaeopteryx/ArchaeopteryxTreeConverter.java | 10 +++++++--- src/jalview/gui/TreePanel.java | 8 ++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java b/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java index 53cc2c2..93a9341 100644 --- a/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java +++ b/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java @@ -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(); diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index f25000f..57cff8f 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -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); -- 1.7.10.2