//go through each leaf and update its pcounts and pgroups
for (int i = 0; i < numLeaves; i++) {
+
string name = tree[i].getName();
-
+
map<string, string>::iterator itNames = globaldata->names.find(name);
-
+
if (itNames == globaldata->names.end()) { m->mothurOut(name + " is not in your name file, please correct."); m->mothurOutEndLine(); exit(1); }
else {
vector<string> dupNames;
tree[i].setGroup(nodeGroups);
}//end else
- }//end for
-
+ }//end for
}
catch(exception& e) {
m->errorOut(e, "Tree", "addNamesToCounts");
}
}
/*****************************************************************/
-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.
//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");
}
}
filehandle.close();
+
+ //for (int i = 0; i < globaldata->Treenames.size(); i++) {
+//cout << globaldata->Treenames[i] << endl; }
+//cout << globaldata->Treenames.size() << endl;
}
catch(exception& e) {
m->errorOut(e, "Tree", "parseTreeFile");