X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=tree.cpp;h=7da3cef3718502640d61377bccbaae0d8e4213d3;hp=eca53d5527bbdda6dbc97ddc0c9f4e7766e15d25;hb=aa9238c0a9e6e7aa0ed8b8b606b08ad4fd7dcfe3;hpb=182db2b6f1747bc1e0b8cd3eceec8751abdd31d5 diff --git a/tree.cpp b/tree.cpp index eca53d5..7da3cef 100644 --- a/tree.cpp +++ b/tree.cpp @@ -166,7 +166,7 @@ void Tree::setIndex(string searchName, int index) { } } /*****************************************************************/ -void Tree::assembleTree() { +int Tree::assembleTree() { try { //if user has given a names file we want to include that info in the pgroups and pcount info. @@ -174,9 +174,13 @@ void Tree::assembleTree() { //build the pGroups in non leaf nodes to be used in the parsimony calcs. for (int i = numLeaves; i < numNodes; i++) { + if (m->control_pressed) { return 1; } + tree[i].pGroups = (mergeGroups(i)); tree[i].pcount = (mergeGcounts(i)); } + + return 0; } catch(exception& e) { m->errorOut(e, "Tree", "assembleTree");