+vector<string> GetSAbundCommand::setParameters(){
+ try {
+ CommandParameter plist("list", "InputTypes", "", "", "LRSS", "LRSS", "none","sabund",false,false, true); parameters.push_back(plist);
+ CommandParameter pcount("count", "InputTypes", "", "", "none", "none", "none","",false,false, false); parameters.push_back(pcount);
+ CommandParameter prabund("rabund", "InputTypes", "", "", "LRSS", "LRSS", "none","sabund",false,false, true); parameters.push_back(prabund);
+ CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel);
+ 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, "GetSAbundCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetSAbundCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The get.sabund command parameters is list, rabund, count and label. list or rabund is required unless a valid current file exists.\n";
+ helpString += "The count parameter allows you to provide a count file associated with your list file. If you clustered with a countfile the list file only contains the unique sequences and you will want to add the redundant counts into the sabund file, providing the count file allows you to do so.\n";
+ helpString += "The label parameter allows you to select what distance levels you would like included in your .sabund file, and are separated by dashes.\n";
+ helpString += "The get.sabund command should be in the following format: get.sabund(label=yourLabels).\n";
+ helpString += "Example get.sabund().\n";
+ helpString += "The default value for label is all labels in your inputfile.\n";
+ helpString += "The get.sabund command outputs a .sabund file containing the labels you selected.\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetSAbundCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetSAbundCommand::getOutputPattern(string type) {
+ try {
+ string pattern = "";
+
+ if (type == "sabund") { pattern = "[filename],sabund"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true; }
+
+ return pattern;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetRAbundCommand", "getOutputPattern");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+GetSAbundCommand::GetSAbundCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["sabund"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetSAbundCommand", "GetSAbundCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+GetSAbundCommand::GetSAbundCommand(string option) {