From 37c9aad7e18aef35fb15a27b074eefd5fc9c972d Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 15 Nov 2017 10:39:47 +0000 Subject: [PATCH] JAL-2805 functional binding on loading associated trees --- src/jalview/ext/forester/io/ForesterTreeParser.java | 12 ++++++++++++ src/jalview/gui/TreePanel.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/jalview/ext/forester/io/ForesterTreeParser.java b/src/jalview/ext/forester/io/ForesterTreeParser.java index 4e21b9d..85960e0 100644 --- a/src/jalview/ext/forester/io/ForesterTreeParser.java +++ b/src/jalview/ext/forester/io/ForesterTreeParser.java @@ -1,5 +1,7 @@ package jalview.ext.forester.io; +import jalview.ext.archaeopteryx.AptxBinding; +import jalview.ext.archaeopteryx.AptxNodeAssociation; import jalview.ext.archaeopteryx.ArchaeopteryxInit; import jalview.gui.Desktop; import jalview.gui.JvOptionPane; @@ -55,7 +57,17 @@ public class ForesterTreeParser implements ExternalTreeParserI String[] AptxArgs = new String[] { "-c", "_aptx_jalview_configuration_file", filePath }; MainFrame aptx = Archaeopteryx.main(AptxArgs); + + AptxNodeAssociation bindAptxNodes = new AptxNodeAssociation( + viewport.getAlignment().getSequencesArray(), + aptx.getMainPanel().getCurrentTreePanel().getPhylogeny()); + + bindAptxNodes.associateLeavesToSequences(); + new AptxBinding(aptx, viewport, bindAptxNodes.getAlignmentWithNodes(), + bindAptxNodes.getNodesWithAlignment()); + ArchaeopteryxInit.bindFrameToJalview(aptx); + return aptx; diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index 55e3a1b..e8f78d8 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -519,7 +519,7 @@ public void buildTreeCanvas(AlignmentPanel ap) { * @param e */ @Override - public void sortByTree_actionPerformed() + public void sortByTree_actionPerformed()// modify for Aptx { if (treeCanvas.applyToAllViews) -- 1.7.10.2