]> git.donarmstrong.com Git - mothur.git/blobdiff - getgroupscommand.cpp
*** empty log message ***
[mothur.git] / getgroupscommand.cpp
index 266fc5218f09dc5c935aa8552a85690cfac63bd9..635f68fc51a4151d7714d2934484cf4c44c1e16c 100644 (file)
@@ -27,8 +27,7 @@ vector<string> GetGroupsCommand::getValidParameters(){
 //**********************************************************************************************************************
 GetGroupsCommand::GetGroupsCommand(){  
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["taxonomy"] = tempOutNames;
@@ -67,10 +66,10 @@ vector<string> GetGroupsCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 GetGroupsCommand::GetGroupsCommand(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
@@ -222,7 +221,7 @@ void GetGroupsCommand::help(){
 int GetGroupsCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                groupMap = new GroupMap(groupfile);
                groupMap->readMap();
@@ -587,6 +586,8 @@ int GetGroupsCommand::fillNames(){
                                names.insert(seqs[i]);
                        }
                }
+               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "GetGroupsCommand", "fillNames");