private PhylogenyNode rootNode;
- private final Map<SequenceI, PhylogenyNode> alignmentBoundNodes;
+ private final Map<SequenceI, PhylogenyNode> alignmentWithNodes;
- private final Map<PhylogenyNode, SequenceI> nodesBoundAlignment;
+ private final Map<PhylogenyNode, SequenceI> nodesWithAlignment;
public ArchaeopteryxTreeBuilder(final TreeBuilder calculatedTree)
{
sequences = jalviewTree.getSequences();
distances = ForesterMatrix.convertJalviewToForester(
jalviewTree.getDistances(), sequences);
+
aptxTree = new Phylogeny();
rootNode = new PhylogenyNode();
- alignmentBoundNodes = new HashMap<>(distances.getSize());
- nodesBoundAlignment = new HashMap<>(distances.getSize());
+
+ int amountOfSequences = distances.getSize();
+ alignmentWithNodes = new HashMap<>(amountOfSequences);
+ nodesWithAlignment = new HashMap<>(amountOfSequences);
}
Sequence seq = ForesterDataConversions
.createForesterSequence(sequence, true);
PhylogenyNode sequenceNode = new PhylogenyNode(sequence.getName());
+
NodeData nodeData = sequenceNode.getNodeData();
nodeData.setSequence(seq);
- nodesBoundAlignment.put(sequenceNode, sequence);
- alignmentBoundNodes.put(sequence, sequenceNode);
+ nodesWithAlignment.put(sequenceNode, sequence);
+ alignmentWithNodes.put(sequence, sequenceNode);
rootNode.addAsChild(sequenceNode);
}
@Override
public Map<SequenceI, PhylogenyNode> getAlignmentBoundNodes()
{
- return alignmentBoundNodes;
+ return alignmentWithNodes;
}
@Override
public Map<PhylogenyNode, SequenceI> getNodesBoundAlignment()
{
- return nodesBoundAlignment;
+ return nodesWithAlignment;
}
private Phylogeny clusterNodes()