+//**********************************************************************************************************************
+vector<string> ReverseSeqsCommand::setParameters(){
+ try {
+ CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "fastaQual", "none",false,false); parameters.push_back(pfasta);
+ CommandParameter pqfile("qfile", "InputTypes", "", "", "none", "fastaQual", "none",false,false); parameters.push_back(pqfile);
+ 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, "ReverseSeqsCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string ReverseSeqsCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The reverse.seqs command reads a fastafile and outputs a fasta file containing the reverse compliment.\n";
+ helpString += "The reverse.seqs command parameters fasta or qfile are required.\n";
+ helpString += "The reverse.seqs command should be in the following format: \n";
+ helpString += "reverse.seqs(fasta=yourFastaFile) \n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ReverseSeqsCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string ReverseSeqsCommand::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 == "fasta") { outputFileName = "rc" + m->getExtension(inputName); }
+ else if (type == "qfile") { outputFileName = "rc" + m->getExtension(inputName); }
+ 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, "ReverseSeqsCommand", "getOutputFileNameTag");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+ReverseSeqsCommand::ReverseSeqsCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["fasta"] = tempOutNames;
+ outputTypes["qfile"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ReverseSeqsCommand", "ReverseSeqsCommand");
+ exit(1);
+ }
+}