X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tree.cpp;h=8e459810589cbc23e9f443884406028382e4e212;hb=28d6f2bddc5c0718ae7f63648be3130a35fb0f02;hp=7da3cef3718502640d61377bccbaae0d8e4213d3;hpb=aa9238c0a9e6e7aa0ed8b8b606b08ad4fd7dcfe3;p=mothur.git diff --git a/tree.cpp b/tree.cpp index 7da3cef..8e45981 100644 --- a/tree.cpp +++ b/tree.cpp @@ -70,10 +70,11 @@ void Tree::addNamesToCounts() { //go through each leaf and update its pcounts and pgroups for (int i = 0; i < numLeaves; i++) { + string name = tree[i].getName(); - + map::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 dupNames; @@ -131,8 +132,7 @@ void Tree::addNamesToCounts() { tree[i].setGroup(nodeGroups); }//end else - }//end for - + }//end for } catch(exception& e) { m->errorOut(e, "Tree", "addNamesToCounts"); @@ -713,6 +713,10 @@ void Tree::parseTreeFile() { } } 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");