]> git.donarmstrong.com Git - mothur.git/blobdiff - tree.cpp
started shared utilities, updates to venn and heatmap added tree.groups command
[mothur.git] / tree.cpp
index 6aa1b829c91d59bcee681b906c6c31ab07f1c168..f93b9335749b4e79bb8c3e3c1be58684efc1cf65 100644 (file)
--- a/tree.cpp
+++ b/tree.cpp
@@ -511,8 +511,16 @@ void Tree::printBranch(int node) {
                        out << ",";
                        printBranch(tree[node].getRChild());
                        out << ")";
+                       //if there is a branch length then print it
+                       if (tree[node].getBranchLength() != -1) {
+                               out << ":" << tree[node].getBranchLength();
+                       }
                }else { //you are a leaf
-                       out << tree[node].getGroup() << ":" << tree[node].getBranchLength();
+                       out << tree[node].getGroup(); 
+                       //if there is a branch length then print it
+                       if (tree[node].getBranchLength() != -1) {
+                               out << ":" << tree[node].getBranchLength();
+                       }
                }
                
        }