+ 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, "ChimeraCheckCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string ChimeraCheckCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "The chimera.check command reads a fastafile and referencefile and outputs potentially chimeric sequences.\n";
+ helpString += "This command was created using the algorythms described in CHIMERA_CHECK version 2.7 written by Niels Larsen. \n";
+ helpString += "The chimera.check command parameters are fasta, reference, processors, ksize, increment, svg and name.\n";
+ helpString += "The fasta parameter allows you to enter the fasta file containing your potentially chimeric sequences, and is required unless you have a valid current fasta file. \n";
+ helpString += "You may enter multiple fasta files by separating their names with dashes. ie. fasta=abrecovery.fasta-amzon.fasta \n";
+ helpString += "The reference parameter allows you to enter a reference file containing known non-chimeric sequences, and is required. \n";
+ helpString += "The processors parameter allows you to specify how many processors you would like to use. The default is 1. \n";
+#ifdef USE_MPI
+ helpString += "When using MPI, the processors parameter is set to the number of MPI processes running. \n";
+#endif
+ helpString += "The increment parameter allows you to specify how far you move each window while finding chimeric sequences, default is 10.\n";
+ helpString += "The ksize parameter allows you to input kmersize, default is 7. \n";
+ helpString += "The svg parameter allows you to specify whether or not you would like a svg file outputted for each query sequence, default is False.\n";
+ helpString += "The name parameter allows you to enter a file containing names of sequences you would like .svg files for.\n";
+ helpString += "You may enter multiple name files by separating their names with dashes. ie. fasta=abrecovery.svg.names-amzon.svg.names \n";
+ helpString += "If the save parameter is set to true the reference sequences will be saved in memory, to clear them later you can use the clear.memory command. Default=f.";
+ helpString += "The chimera.check command should be in the following format: \n";
+ helpString += "chimera.check(fasta=yourFastaFile, reference=yourTemplateFile, processors=yourProcessors, ksize=yourKmerSize) \n";
+ helpString += "Example: chimera.check(fasta=AD.fasta, reference=core_set_aligned,imputed.fasta, processors=4, ksize=8) \n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ChimeraCheckCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string ChimeraCheckCommand::getOutputPattern(string type) {
+ try {
+ string pattern = "";
+
+ if (type == "chimera") { pattern = "[filename],chimeracheck.chimeras"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true; }
+
+ return pattern;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ChimeraCheckCommand", "getOutputPattern");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+ChimeraCheckCommand::ChimeraCheckCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["chimera"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ChimeraCheckCommand", "ChimeraCheckCommand");
+ exit(1);
+ }
+}
+//***************************************************************************************************************