]> git.donarmstrong.com Git - mothur.git/blobdiff - tree.cpp
fixed catchall hangup if it can't find the exe
[mothur.git] / tree.cpp
index 114b4de0d6e2c408479ae8c03b65d2b1300bb9b8..08ee850f75a485e6f10830e1c244cc26bd4107f5 100644 (file)
--- a/tree.cpp
+++ b/tree.cpp
@@ -401,7 +401,7 @@ void Tree::getSubTree(Tree* copy, vector<string> Groups) {
                
                int nextSpot = numLeaves;
                populateNewTree(copy->tree, root, nextSpot);
-               
+                               
        }
        catch(exception& e) {
                m->errorOut(e, "Tree", "getCopy");
@@ -420,6 +420,10 @@ int Tree::populateNewTree(vector<Node>& oldtree, int node, int& index) {
                        tree[rc].setParent(index);
                        tree[lc].setParent(index);
                        
+                       tree[index].setBranchLength(oldtree[node].getBranchLength());
+                       tree[rc].setBranchLength(oldtree[oldtree[node].getLChild()].getBranchLength());
+                       tree[lc].setBranchLength(oldtree[oldtree[node].getRChild()].getBranchLength());
+                       
                        return (index++);
                }else { //you are a leaf
                        int indexInNewTree = globaldata->gTreemap->getIndex(oldtree[node].getName());