]> git.donarmstrong.com Git - mothur.git/blobdiff - engine.cpp
added otu.association command. added calcSpearman, calcKendall and calcPearson functi...
[mothur.git] / engine.cpp
index a80eba4292f8ca32abb9a612cd7ef3cb7f8226a4..ea1c0e14dc9f89fe0157d24828a2e9552297389c 100644 (file)
@@ -186,11 +186,13 @@ bool InteractEngine::getInput(){
                                        mout->names.clear();
                                        mout->saveNextLabel = "";
                                        mout->printedHeaders = false;
+                                       mout->commandInputsConvertError = false;
                                        mout->currentBinLabels.clear();
                                        mout->binLabelsInFile.clear();
                                                        
                                        Command* command = cFactory->getCommand(commandName, options);
-                                       quitCommandCalled = command->execute();
+                                       if (mout->commandInputsConvertError) { quitCommandCalled = 2; }
+                                       else { quitCommandCalled = command->execute(); }
                                                        
                                        //if we aborted command
                                        if (quitCommandCalled == 2) {  mout->mothurOut("[ERROR]: did not complete " + commandName + "."); mout->mothurOutEndLine(); }
@@ -370,12 +372,14 @@ bool BatchEngine::getInput(){
                                        mout->names.clear();
                                        mout->saveNextLabel = "";
                                        mout->printedHeaders = false;
+                                       mout->commandInputsConvertError = false;
                                        mout->currentBinLabels.clear();
                                        mout->binLabelsInFile.clear();
 
                                                        
                                        Command* command = cFactory->getCommand(commandName, options);
-                                       quitCommandCalled = command->execute();
+                                       if (mout->commandInputsConvertError) { quitCommandCalled = 2; }
+                                       else { quitCommandCalled = command->execute(); }
                                                        
                                        //if we aborted command
                                        if (quitCommandCalled == 2) {  mout->mothurOut("[ERROR]: did not complete " + commandName + "."); mout->mothurOutEndLine(); }
@@ -406,7 +410,7 @@ bool BatchEngine::getInput(){
 /***********************************************************************/
 string BatchEngine::getNextCommand(ifstream& inputBatchFile) {
        try {
-               
+                       
                string nextcommand = "";
                
                if (inputBatchFile.eof()) { nextcommand = "quit()"; }
@@ -537,12 +541,13 @@ bool ScriptEngine::getInput(){
                                        mout->names.clear();
                                        mout->saveNextLabel = "";
                                        mout->printedHeaders = false;
+                                       mout->commandInputsConvertError = false;
                                        mout->currentBinLabels.clear();
                                        mout->binLabelsInFile.clear();
 
-                                                       
                                        Command* command = cFactory->getCommand(commandName, options);
-                                       quitCommandCalled = command->execute();
+                                       if (mout->commandInputsConvertError) { quitCommandCalled = 2; }
+                                       else { quitCommandCalled = command->execute(); }
                                        
                                        //if we aborted command
                                        if (quitCommandCalled == 2) {  mout->mothurOut("[ERROR]: did not complete " + commandName + "."); mout->mothurOutEndLine(); }