From: kjvdheide Date: Thu, 9 Nov 2017 16:08:46 +0000 (+0000) Subject: JAL-2794 Made HashMap with Nodes as keys and sequences as values as well X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1af7c9c8ada5eadac1b16ed9a37280b09c50660b;p=jalview.git JAL-2794 Made HashMap with Nodes as keys and sequences as values as well --- 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;