+ CommandParameter plist("list", "InputTypes", "", "", "LRSS", "LRSS", "none","",false,false,true); parameters.push_back(plist);
+ CommandParameter prabund("rabund", "InputTypes", "", "", "LRSS", "LRSS", "none","",false,false,true); parameters.push_back(prabund);
+ CommandParameter psabund("sabund", "InputTypes", "", "", "LRSS", "LRSS", "none","",false,false,true); parameters.push_back(psabund);
+ CommandParameter pshared("shared", "InputTypes", "", "", "LRSS", "LRSS", "none","",false,false,true); parameters.push_back(pshared);
+ CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel);
+ CommandParameter pfreq("freq", "Number", "", "100", "", "", "","",false,false); parameters.push_back(pfreq);
+ CommandParameter pcalc("calc", "Multiple", "sobs-chao-nseqs-coverage-ace-jack-shannon-shannoneven-npshannon-heip-smithwilson-simpson-simpsoneven-invsimpson-bootstrap-geometric-qstat-logseries-bergerparker-bstick-goodscoverage-efron-boneh-solow-shen", "sobs-chao-ace-jack-shannon-npshannon-simpson", "", "", "","",true,false,true); parameters.push_back(pcalc);
+ CommandParameter pabund("abund", "Number", "", "10", "", "", "","",false,false); parameters.push_back(pabund);
+ CommandParameter psize("size", "Number", "", "0", "", "", "","",false,false); parameters.push_back(psize);
+ CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir);
+ CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir);
+
+ vector<string> myArray;
+ for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); }
+ return myArray;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string CollectCommand::getHelpString(){
+ try {
+ string helpString = "";
+ ValidCalculators validCalculator;
+ helpString += "The collect.single command parameters are list, sabund, rabund, shared, label, freq, calc and abund. list, sabund, rabund or shared is required unless you have a valid current file. \n";
+ helpString += "The collect.single command should be in the following format: \n";
+ helpString += "The freq parameter is used indicate when to output your data, by default it is set to 100. But you can set it to a percentage of the number of sequence. For example freq=0.10, means 10%. \n";
+ helpString += "collect.single(label=yourLabel, freq=yourFreq, calc=yourEstimators).\n";
+ helpString += "Example collect(label=unique-.01-.03, freq=10, calc=sobs-chao-ace-jack).\n";
+ helpString += "The default values for freq is 100, and calc are sobs-chao-ace-jack-shannon-npshannon-simpson.\n";
+ helpString += validCalculator.printCalc("single");
+ helpString += "The label parameter is used to analyze specific labels in your input.\n";
+ helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string CollectCommand::getOutputPattern(string type) {
+ try {
+ string pattern = "";
+
+ if (type == "sobs") { pattern = "[filename],sobs"; }
+ else if (type == "chao") { pattern = "[filename],chao"; }
+ else if (type == "nseqs") { pattern = "[filename],nseqs"; }
+ else if (type == "coverage") { pattern = "[filename],coverage"; }
+ else if (type == "ace") { pattern = "[filename],ace"; }
+ else if (type == "jack") { pattern = "[filename],jack"; }
+ else if (type == "shannon") { pattern = "[filename],shannon"; }
+ else if (type == "shannoneven") { pattern = "[filename],shannoneven"; }
+ else if (type == "npshannon") { pattern = "[filename],npshannon"; }
+ else if (type == "heip") { pattern = "[filename],heip"; }
+ else if (type == "smithwilson") { pattern = "[filename],smithwilson"; }
+ else if (type == "simpson") { pattern = "[filename],simpson"; }
+ else if (type == "simpsoneven") { pattern = "[filename],simpsoneven"; }
+ else if (type == "invsimpson") { pattern = "[filename],invsimpson"; }
+ else if (type == "bootstrap") { pattern = "[filename],bootstrap"; }
+ else if (type == "geometric") { pattern = "[filename],geometric"; }
+ else if (type == "qstat") { pattern = "[filename],qstat"; }
+ else if (type == "logseries") { pattern = "[filename],logseries"; }
+ else if (type == "bergerparker") { pattern = "[filename],bergerparker"; }
+ else if (type == "bstick") { pattern = "[filename],bstick"; }
+ else if (type == "goodscoverage") { pattern = "[filename],goodscoverage"; }
+ else if (type == "efron") { pattern = "[filename],efron"; }
+ else if (type == "boneh") { pattern = "[filename],boneh"; }
+ else if (type == "solow") { pattern = "[filename],solow"; }
+ else if (type == "shen") { pattern = "[filename],shen"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true; }
+
+ return pattern;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectCommand", "getOutputPattern");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+CollectCommand::CollectCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["sobs"] = tempOutNames;
+ outputTypes["chao"] = tempOutNames;
+ outputTypes["nseqs"] = tempOutNames;
+ outputTypes["coverage"] = tempOutNames;
+ outputTypes["ace"] = tempOutNames;
+ outputTypes["jack"] = tempOutNames;
+ outputTypes["shannon"] = tempOutNames;
+ outputTypes["shannoneven"] = tempOutNames;
+ outputTypes["npshannon"] = tempOutNames;
+ outputTypes["heip"] = tempOutNames;
+ outputTypes["smithwilson"] = tempOutNames;
+ outputTypes["simpson"] = tempOutNames;
+ outputTypes["simpsoneven"] = tempOutNames;
+ outputTypes["invsimpson"] = tempOutNames;
+ outputTypes["bootstrap"] = tempOutNames;
+ outputTypes["geometric"] = tempOutNames;
+ outputTypes["qstat"] = tempOutNames;
+ outputTypes["logseries"] = tempOutNames;
+ outputTypes["bergerparker"] = tempOutNames;
+ outputTypes["bstick"] = tempOutNames;
+ outputTypes["goodscoverage"] = tempOutNames;
+ outputTypes["efron"] = tempOutNames;
+ outputTypes["boneh"] = tempOutNames;
+ outputTypes["solow"] = tempOutNames;
+ outputTypes["shen"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectCommand", "CollectCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+CollectCommand::CollectCommand(string option) {
+ try {
+ abort = false; calledHelp = false;