From 1af7c9c8ada5eadac1b16ed9a37280b09c50660b Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Thu, 9 Nov 2017 16:08:46 +0000 Subject: [PATCH] JAL-2794 Made HashMap with Nodes as keys and sequences as values as well --- .../ext/archaeopteryx/ArchaeopteryxTreeConverter.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java b/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java index 58c5728..640c3ec 100644 --- a/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java +++ b/src/jalview/ext/archaeopteryx/ArchaeopteryxTreeConverter.java @@ -31,6 +31,8 @@ public class ArchaeopteryxTreeConverter // implements PhylogenyFactory private final Map alignmentBoundNodes; + private final Map nodesBoundAlignment; + public ArchaeopteryxTreeConverter(final TreeBuilder calculatedTree) { jalviewTree = calculatedTree; @@ -39,8 +41,8 @@ public class ArchaeopteryxTreeConverter // implements PhylogenyFactory jalviewTree.getDistances(), sequences); aptxTree = new Phylogeny(); rootNode = new PhylogenyNode(); - alignmentBoundNodes = new HashMap<>( - distances.getSize()); + alignmentBoundNodes = new HashMap<>(distances.getSize()); + nodesBoundAlignment = new HashMap<>(distances.getSize()); } @@ -71,6 +73,7 @@ public class ArchaeopteryxTreeConverter // implements PhylogenyFactory NodeData nodeData = sequenceNode.getNodeData(); nodeData.setSequence(seq); + nodesBoundAlignment.put(sequenceNode, sequence); alignmentBoundNodes.put(sequence, sequenceNode); rootNode.addAsChild(sequenceNode); } @@ -90,6 +93,11 @@ public class ArchaeopteryxTreeConverter // implements PhylogenyFactory return alignmentBoundNodes; } + public Map getNodesBoundAlignment() + { + return nodesBoundAlignment; + } + private Phylogeny clusterNodes() { return aptxTree; -- 1.7.10.2