From: kjvdheide Date: Tue, 9 Jan 2018 14:23:43 +0000 (+0000) Subject: JAL-2805 added check for sequences already being present in tree nodes X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=41c664e5da66facb7c2af50a8ba81c327e0d1700;p=jalview.git JAL-2805 added check for sequences already being present in tree nodes --- diff --git a/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java b/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java index 4229b50..3711e81 100644 --- a/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java +++ b/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java @@ -59,9 +59,25 @@ public class LoadedTreeSequenceAssociation nodeSequence = algnIds.findIdMatch(nodeSequenceName); if (nodeSequence != null) { - + // is there already a sequence present for the node? + // If so, does it actually match Jalview's sequence? + if (treeNode.getSequence() != null) + { + if (treeNode.getSequence().getSequenceAsString() != nodeSequence + .getSequenceAsString()) + { + System.err.println( + "Sequence detected in tree node that does not match corresponding Jalview sequence:" + + nodeSequenceName); + // which sequence gets precedence? + + } + + } + else + { treeNode.setSequence(nodeSequence); - + } MappingUtils.putWithDuplicationCheck(alignmentWithNodes, nodeSequence, treeNode); MappingUtils.putWithDuplicationCheck(nodesWithAlignment, treeNode,