+#include "sequence.hpp"
+
+
+//**********************************************************************************************************************
+vector<string> MakeGroupCommand::setParameters(){
+ try {
+ CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none","group",false,true,true); parameters.push_back(pfasta);
+ CommandParameter pgroups("groups", "String", "", "", "", "", "","",false,false,true); parameters.push_back(pgroups);
+ CommandParameter poutput("output", "String", "", "", "", "", "","",false,false); parameters.push_back(poutput);
+ 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, "MakeGroupCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string MakeGroupCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The make.group command reads a fasta file or series of fasta files and creates a groupfile.\n";
+ helpString += "The make.group command parameters are fasta, groups and output. Fasta and group are required.\n";
+ helpString += "The output parameter allows you to specify the name of groupfile created. \n";
+ helpString += "The make.group command should be in the following format: \n";
+ helpString += "make.group(fasta=yourFastaFiles, groups=yourGroups). \n";
+ helpString += "Example make.group(fasta=seqs1.fasta-seq2.fasta-seqs3.fasta, groups=A-B-C)\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFiles).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "MakeGroupCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string MakeGroupCommand::getOutputPattern(string type) {
+ try {
+ string pattern = "";
+
+ if (type == "group") { pattern = "[filename],groups"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true; }
+
+ return pattern;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "MakeGroupCommand", "getOutputPattern");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+MakeGroupCommand::MakeGroupCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["group"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "MakeGroupCommand", "MakeGroupCommand");
+ exit(1);
+ }
+}