- //run last label if you need to
- if (needToRun == true) {
- if (sabund != NULL) { delete sabund; }
- sabund = (input->getSAbundVector(lastLabel));
-
- m->mothurOut(sabund->getLabel()); m->mothurOutEndLine();
-
- //create catchall input file from mothur's inputfile
- string filename = process(sabund);
- string outputPath = m->getPathName(filename);
-
- //create system command
- string catchAllCommand = "";
- #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- catchAllCommand += catchAllCommandExe + filename + " " + outputPath + " 1";
- #else
- if (outputPath.length() > 0) { outputPath = outputPath.substr(0, outputPath.length()-1); }
- catchAllCommand += catchAllCommandExe + "\"" + filename + "\" \"" + outputPath + "\" 1";
- catchAllCommand = "\"" + catchAllCommand + "\"";
- #endif
-
- //run catchall
- system(catchAllCommand.c_str());
-
- remove(filename.c_str());
-
- filename = m->getRootName(filename); filename = filename.substr(0, filename.length()-1); //rip off extra .
-
- outputNames.push_back(filename + "_Analysis.csv"); outputTypes["csv"].push_back(filename + "_Analysis.csv");
- outputNames.push_back(filename + "_BestModelsAnalysis.csv"); outputTypes["csv"].push_back(filename + "_BestModelsAnalysis.csv");
- outputNames.push_back(filename + "_BestModelsFits.csv"); outputTypes["csv"].push_back(filename + "_BestModelsFits.csv");
- outputNames.push_back(filename + "_BubblePlot.csv"); outputTypes["csv"].push_back(filename + "_BubblePlot.csv");
-
- createSummaryFile(filename + "_BestModelsAnalysis.csv", sabund->getLabel(), out);
-
- delete sabund;
- }
-
- out.close();
- delete read;
- delete input; globaldata->ginput = NULL;
-
- if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) {remove(outputNames[i].c_str()); } return 0; }
-