]> git.donarmstrong.com Git - mothur.git/blobdiff - heatmapsimcommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / heatmapsimcommand.cpp
index 7ab178c528f40b6c5b9456880545c104701debf8..28b0221ba8458cb1a760fade14426ea6a7123568 100644 (file)
@@ -34,8 +34,7 @@ vector<string> HeatMapSimCommand::getValidParameters(){
 //**********************************************************************************************************************
 HeatMapSimCommand::HeatMapSimCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["svg"] = tempOutNames;
        }
@@ -71,14 +70,14 @@ vector<string> HeatMapSimCommand::getRequiredFiles(){
 HeatMapSimCommand::HeatMapSimCommand(string option)  {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                labels.clear();
                Groups.clear();
                Estimators.clear();
                        
                //allow user to run help
-               if(option == "help") { validCalculator = new ValidCalculators(); help(); abort = true; }
+               if(option == "help") { validCalculator = new ValidCalculators(); help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -273,7 +272,7 @@ HeatMapSimCommand::~HeatMapSimCommand(){}
 int HeatMapSimCommand::execute(){
        try {
        
-               if (abort == true)  { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                heatmap = new HeatMapSim(outputDir);