]> git.donarmstrong.com Git - mothur.git/blobdiff - deconvolutecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / deconvolutecommand.cpp
index dd05afdd0243132497fdab828c384b287ff0b61c..6c04c1255ab94010da7cacfb409d497b4f0354d4 100644 (file)
@@ -24,8 +24,7 @@ vector<string> DeconvoluteCommand::getValidParameters(){
 //**********************************************************************************************************************
 DeconvoluteCommand::DeconvoluteCommand(){      
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["name"] = tempOutNames;
@@ -61,10 +60,10 @@ vector<string> DeconvoluteCommand::getRequiredFiles(){
 /**************************************************************************************/
 DeconvoluteCommand::DeconvoluteCommand(string option)  {       
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -153,7 +152,7 @@ void DeconvoluteCommand::help(){
 int DeconvoluteCommand::execute() {    
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
 
                //prepare filenames and open files
                string outNameFile = outputDir + m->getRootName(m->getSimpleName(inFastaName)) + "names";