+//**********************************************************************************************************************
+vector<string> CollectCommand::setParameters(){
+ try {
+ CommandParameter plist("list", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(plist);
+ CommandParameter prabund("rabund", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(prabund);
+ CommandParameter psabund("sabund", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(psabund);
+ CommandParameter pshared("shared", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); 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); 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, iters=yourIters, freq=yourFreq, calc=yourEstimators).\n";
+ helpString += "Example collect(label=unique-.01-.03, iters=10000, 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);
+ }
+}
+//**********************************************************************************************************************
+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);
+ }
+}