+ //open each groups summary file
+ string newLabel = "";
+ int numLines = 0;
+ map<string, vector<string> > files;
+ for (int i=0; i<outputNames.size(); i++) {
+ vector<string> thisFilesLines;
+
+ ifstream temp;
+ m->openInputFile(outputNames[i], temp);
+
+ //read through first line - labels
+ m->getline(temp);
+ m->gobble(temp);
+
+ //for each label
+ while (!temp.eof()) {
+
+ string thisLine = "";
+ string tempLabel;
+
+ for (int j = 0; j < 5; j++) {
+ temp >> tempLabel;
+
+ //save for later
+ if (j == 1) { thisLine += groups[i] + "\t" + tempLabel + "\t"; }
+ else{ thisLine += tempLabel + "\t"; }
+ }
+
+ thisLine += "\n";
+
+ thisFilesLines.push_back(thisLine);
+
+ m->gobble(temp);
+ }
+
+ files[outputNames[i]] = thisFilesLines;
+
+ numLines = thisFilesLines.size();
+
+ temp.close();
+ remove(outputNames[i].c_str());
+ }
+
+ //for each label
+ for (int k = 0; k < numLines; k++) {
+
+ //grab summary data for each group
+ for (int i=0; i<outputNames.size(); i++) {
+ out << files[outputNames[i]][k];
+ }
+ }
+
+
+ out.close();
+
+ //return combine file name
+ return combineFileName;
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CatchAllCommand", "combineSummmary");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+int CatchAllCommand::createSummaryFile(string file1, string label, ofstream& out) {
+ try {