]> git.donarmstrong.com Git - mothur.git/blobdiff - consensusseqscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / consensusseqscommand.cpp
index 513566f0c4fd75990f781e2b4a482332cfe5ac12..482bac5dd40a62b58cb6b0eace303baab1fdeddb 100644 (file)
@@ -26,8 +26,7 @@ vector<string> ConsensusSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 ConsensusSeqsCommand::ConsensusSeqsCommand(){  
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["name"] = tempOutNames;
@@ -64,11 +63,11 @@ vector<string> ConsensusSeqsCommand::getRequiredFiles(){
 //***************************************************************************************************************
 ConsensusSeqsCommand::ConsensusSeqsCommand(string option)  {
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                
                //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
@@ -184,7 +183,7 @@ ConsensusSeqsCommand::~ConsensusSeqsCommand(){      /*      do nothing      */      }
 int ConsensusSeqsCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                readFasta();