+//**********************************************************************************************************************
+vector<string> ParseFastaQCommand::setParameters(){
+ try {
+ CommandParameter pfastq("fastq", "InputTypes", "", "", "none", "none", "none","",false,true,true); parameters.push_back(pfastq);
+ CommandParameter pfasta("fasta", "Boolean", "", "T", "", "", "","fasta",false,false); parameters.push_back(pfasta);
+ CommandParameter pqual("qfile", "Boolean", "", "T", "", "", "","qfile",false,false); parameters.push_back(pqual);
+ CommandParameter ppacbio("pacbio", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(ppacbio);
+ CommandParameter pformat("format", "Multiple", "sanger-illumina-solexa-illumina1.8+", "sanger", "", "", "","",false,false,true); parameters.push_back(pformat);
+ 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, "ParseFastaQCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string ParseFastaQCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The fastq.info command reads a fastq file and creates a fasta and quality file.\n";
+ helpString += "The fastq.info command parameters are fastq, fasta, qfile and format; fastq is required.\n";
+ helpString += "The fastq.info command should be in the following format: fastq.info(fastaq=yourFastaQFile).\n";
+ helpString += "The format parameter is used to indicate whether your sequences are sanger, solexa, illumina1.8+ or illumina, default=sanger.\n";
+ helpString += "The fasta parameter allows you to indicate whether you want a fasta file generated. Default=T.\n";
+ helpString += "The qfile parameter allows you to indicate whether you want a quality file generated. Default=T.\n";
+ helpString += "The pacbio parameter allows you to indicate .... When set to true, quality scores of 0 will results in a corresponding base of N. Default=F.\n";
+ helpString += "Example fastq.info(fastaq=test.fastaq).\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fastq), '=' and yourFastQFile.\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ParseFastaQCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string ParseFastaQCommand::getOutputPattern(string type) {
+ try {
+ string pattern = "";
+
+ if (type == "fasta") { pattern = "[filename],fasta"; }
+ else if (type == "qfile") { pattern = "[filename],qual"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true; }
+
+ return pattern;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ParseFastaQCommand", "getOutputPattern");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+ParseFastaQCommand::ParseFastaQCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["fasta"] = tempOutNames;
+ outputTypes["qfile"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ParseFastaQCommand", "ParseFastaQCommand");
+ exit(1);
+ }
+}