+ 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::getOutputFileNameTag(string type, string inputName=""){
+ try {
+ string outputFileName = "";
+ map<string, vector<string> >::iterator it;
+
+ //is this a type this command creates
+ it = outputTypes.find(type);
+ if (it == outputTypes.end()) { m->mothurOut("[ERROR]: this command doesn't create a " + type + " output file.\n"); }
+ else {
+ if (type == "otu") { outputFileName = "otu"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; }
+ }
+ return outputFileName;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetListCountCommand", "getOutputFileNameTag");
+ 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);
+ }
+}
+//**********************************************************************************************************************
+GetListCountCommand::GetListCountCommand(string option) {
+ try {
+ abort = false; calledHelp = false;
+ allLines = 1;
+