+//**********************************************************************************************************************
+vector<string> ChimeraCheckCommand::setParameters(){
+ try {
+ CommandParameter ptemplate("reference", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(ptemplate);
+ CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(pfasta);
+ CommandParameter pname("name", "InputTypes", "", "", "none", "none", "none",false,false); parameters.push_back(pname);
+ CommandParameter psvg("svg", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(psvg);
+ CommandParameter pincrement("increment", "Number", "", "10", "", "", "",false,false); parameters.push_back(pincrement);
+ CommandParameter pksize("ksize", "Number", "", "7", "", "", "",false,false); parameters.push_back(pksize);
+ CommandParameter pprocessors("processors", "Number", "", "1", "", "", "",false,false); parameters.push_back(pprocessors);
+ 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, "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 += "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);
+ }
+}
+//**********************************************************************************************************************
+ChimeraCheckCommand::ChimeraCheckCommand(){
+ try {
+ abort = true; calledHelp = true;
+ setParameters();
+ vector<string> tempOutNames;
+ outputTypes["chimera"] = tempOutNames;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ChimeraCheckCommand", "ChimeraCheckCommand");
+ exit(1);
+ }
+}