]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / screenseqscommand.cpp
index 65b5956cce5c0a6418d5d9524218b35b0b335aa8..150a27e54273dfcf7c61d8c1582efe794e0362ba 100644 (file)
@@ -26,8 +26,7 @@ vector<string> ScreenSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 ScreenSeqsCommand::ScreenSeqsCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["name"] = tempOutNames;
@@ -67,10 +66,10 @@ vector<string> ScreenSeqsCommand::getRequiredFiles(){
 
 ScreenSeqsCommand::ScreenSeqsCommand(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
@@ -247,7 +246,7 @@ ScreenSeqsCommand::~ScreenSeqsCommand(){    /*      do nothing      */      }
 int ScreenSeqsCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //if the user want to optimize we need to no the 90% mark
                vector<unsigned long int> positions;