From 4b268a681aa223713eff460b2be60f1c64a42774 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 6 Dec 2005 12:07:06 +0000 Subject: [PATCH] hasDistances added --- src/jalview/analysis/NJTree.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index 0683265..40dfc9b 100755 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -60,6 +60,10 @@ public class NJTree Object leaves = null; int start; int end; + boolean hasDistances = true; // normal case for jalview trees + boolean hasBootstrap = false; // normal case for jalview trees + + private boolean hasRootDistance = true; /** * Creates a new NJTree object. @@ -81,6 +85,11 @@ public class NJTree public NJTree(SequenceI[] seqs, NewickFile treefile) { top = treefile.getTree(); + + hasDistances = treefile.HasDistances(); + hasBootstrap = treefile.HasBootstrap(); + hasRootDistance = treefile.HasRootDistance(); + maxheight = findHeight(top); SequenceIdMatcher algnIds = new SequenceIdMatcher(seqs); @@ -1134,6 +1143,27 @@ public class NJTree { return top; } + /** + * + * @return true if tree has real distances + */ + public boolean isHasDistances() { + return hasDistances; + } + + /** + * + * @return true if tree has real bootstrap values + */ + public boolean isHasBootstrap() { + return hasBootstrap; + } + + public boolean isHasRootDistance() + { + return hasRootDistance; + } + } -- 1.7.10.2