JAL-2844 added offset to x coord to make it equal 0 at the root node
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 28 Nov 2017 18:06:57 +0000 (18:06 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 28 Nov 2017 18:06:57 +0000 (18:06 +0000)
src/jalview/ext/archaeopteryx/JalviewBinding.java

index e382364..07d45c5 100644 (file)
@@ -241,7 +241,8 @@ public final class JalviewBinding
         //
         // System.out.println(relativeTreeWidth);
 
-        double threshold = x / longestBranch;
+        float xRoot = tree.getRoot().getXcoord();
+        double threshold = ((double) x - xRoot) / longestBranch;
         System.out.println(threshold);
         List<PhylogenyNode> foundNodes = getNodesAboveThreshold(threshold,
                 longestBranch, tree.getRoot());