]> git.donarmstrong.com Git - mothur.git/blobdiff - parsimonycommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / parsimonycommand.cpp
index c97e92ed7253cf1cdf00882a6e1155c1b86fe60a..c0de504f32f379651d15fc95767821ec9abd56c7 100644 (file)
@@ -24,8 +24,7 @@ vector<string> ParsimonyCommand::getValidParameters(){
 //**********************************************************************************************************************
 ParsimonyCommand::ParsimonyCommand(){  
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["parsimony"] = tempOutNames;
                outputTypes["psummary"] = tempOutNames;
@@ -61,11 +60,11 @@ vector<string> ParsimonyCommand::getRequiredFiles(){
 ParsimonyCommand::ParsimonyCommand(string option)  {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                Groups.clear();
                        
                //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
@@ -186,7 +185,7 @@ void ParsimonyCommand::help(){
 int ParsimonyCommand::execute() {
        try {
        
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
        
                Progress* reading;
                reading = new Progress("Comparing to random:", iters);