hasDistances added
authoramwaterhouse <Andrew Waterhouse>
Tue, 6 Dec 2005 12:07:06 +0000 (12:07 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 6 Dec 2005 12:07:06 +0000 (12:07 +0000)
src/jalview/analysis/NJTree.java

index 0683265..40dfc9b 100755 (executable)
@@ -60,6 +60,10 @@ public class NJTree
     Object leaves = null;\r
     int start;\r
     int end;\r
+    boolean hasDistances = true; // normal case for jalview trees\r
+       boolean hasBootstrap = false; // normal case for jalview trees\r
+\r
+    private boolean hasRootDistance = true;\r
 \r
     /**\r
      * Creates a new NJTree object.\r
@@ -81,6 +85,11 @@ public class NJTree
     public NJTree(SequenceI[] seqs, NewickFile treefile)\r
     {\r
         top = treefile.getTree();\r
+\r
+        hasDistances = treefile.HasDistances();\r
+        hasBootstrap = treefile.HasBootstrap();\r
+        hasRootDistance = treefile.HasRootDistance();\r
+\r
         maxheight = findHeight(top);\r
 \r
         SequenceIdMatcher algnIds = new SequenceIdMatcher(seqs);\r
@@ -1134,6 +1143,27 @@ public class NJTree
     {\r
         return top;\r
     }\r
+    /**\r
+     *\r
+     * @return true if tree has real distances\r
+     */\r
+    public boolean isHasDistances() {\r
+      return hasDistances;\r
+    }\r
+\r
+    /**\r
+     *\r
+     * @return true if tree has real bootstrap values\r
+     */\r
+    public boolean isHasBootstrap() {\r
+      return hasBootstrap;\r
+    }\r
+\r
+  public boolean isHasRootDistance()\r
+  {\r
+    return hasRootDistance;\r
+  }\r
+\r
 }\r
 \r
 \r