+//**********************************************************************************************************************
+vector<string> GetListCountCommand::setParameters(){
+ try {
+ CommandParameter plist("list", "InputTypes", "", "", "none", "none", "none","otu",false,true, true); parameters.push_back(plist);
+ CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel);
+ CommandParameter parasort("sort", "Multiple", "name-otu", "otu", "", "", "","",false,false); parameters.push_back(parasort);
+ 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, "GetListCountCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetListCountCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The get.otulist command parameters are list, sort and label. list is required, unless you have a valid current list file.\n";
+ helpString += "The label parameter allows you to select what distance levels you would like a output files created for, and are separated by dashes.\n";
+ helpString += "The sort parameter allows you to select how you want the output displayed. Options are otu and name.\n";
+ helpString += "If otu is selected the output will be otu number followed by the list of names in that otu.\n";
+ helpString += "If name is selected the output will be a sequence name followed by its otu number.\n";
+ helpString += "The get.otulist command should be in the following format: get.otulist(list=yourlistFile, label=yourLabels).\n";
+ helpString += "Example get.otulist(list=amazon.fn.list, label=0.10).\n";
+ helpString += "The default value for label is all lines in your inputfile.\n";
+ helpString += "The get.otulist command outputs a .otu file for each distance you specify listing the bin number and the names of the sequences in that bin.\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetListCountCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetListCountCommand::getOutputPattern(string type) {
+ try {
+ string pattern = "";
+
+ if (type == "otu") { pattern = "[filename],[tag],otu"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true; }
+
+ return pattern;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetListCountCommand", "getOutputPattern");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+GetListCountCommand::GetListCountCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["otu"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetListCountCommand", "GetListCountCommand");
+ exit(1);
+ }
+}