From: amwaterhouse Date: Tue, 6 Dec 2005 12:07:06 +0000 (+0000) Subject: hasDistances added X-Git-Tag: Release_2_07~50 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4b268a681aa223713eff460b2be60f1c64a42774;p=jalview.git hasDistances added --- 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; + } + }