//make sure groups are valid. takes care of user setting groupNames that are invalid or setting groups=all
SharedUtil* util = new SharedUtil();
- util->setGroups(Groups, groupMap->namesOfGroups);
+ vector<string> nameGroups = groupMap->getNamesOfGroups();
+ util->setGroups(Groups, nameGroups);
delete util;
//sort groupNames so that the group title match the counts below, this is needed because the map object automatically sorts
//open input file
ifstream in;
m->openInputFile(namefile, in);
-
+
+ int total = 0;
while (!in.eof()) {
if (m->control_pressed) { break; }
out << firstCol << '\t' << names.size() << endl;
}
-
+ total += names.size();
}
in.close();
if (groupfile != "") { delete groupMap; }
- if (m->control_pressed) { remove(outputFileName.c_str()); return 0; }
+ if (m->control_pressed) { m->mothurRemove(outputFileName); return 0; }
+ m->mothurOutEndLine();
+ m->mothurOut("Total number of sequences: " + toString(total)); m->mothurOutEndLine();
m->mothurOutEndLine();
m->mothurOut("Output File Name: "); m->mothurOutEndLine();
m->mothurOut(outputFileName); m->mothurOutEndLine();