]> git.donarmstrong.com Git - mothur.git/blobdiff - nmdscommand.cpp
mods to seq.errror
[mothur.git] / nmdscommand.cpp
index 0661f24b09d4494d658a6044fdce1fafe0b5582f..6596859c8c13f0e86b501d8ba62e9601ff4bf45a 100644 (file)
@@ -25,8 +25,7 @@ vector<string> NMDSCommand::getValidParameters(){
 //**********************************************************************************************************************
 NMDSCommand::NMDSCommand(){    
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["nmds"] = tempOutNames;
                outputTypes["stress"] = tempOutNames;
@@ -64,10 +63,10 @@ vector<string> NMDSCommand::getRequiredFiles(){
 
 NMDSCommand::NMDSCommand(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
@@ -159,8 +158,8 @@ void NMDSCommand::help(){
                m->mothurOut("The nmds command parameters are phylip, axes, mindim, maxdim, maxiters, iters and epsilon."); m->mothurOutEndLine();
                m->mothurOut("The phylip parameter allows you to enter your distance file."); m->mothurOutEndLine();
                m->mothurOut("The axes parameter allows you to enter a file containing a starting configuration."); m->mothurOutEndLine();
-               m->mothurOut("The maxdim parameter allows you to select how maximum dimensions to use. Default=2"); m->mothurOutEndLine();
-               m->mothurOut("The mindim parameter allows you to select how minimum dimensions to use. Default=2"); m->mothurOutEndLine();
+               m->mothurOut("The maxdim parameter allows you to select the maximum dimensions to use. Default=2"); m->mothurOutEndLine();
+               m->mothurOut("The mindim parameter allows you to select the minimum dimensions to use. Default=2"); m->mothurOutEndLine();
                m->mothurOut("The maxiters parameter allows you to select the maximum number of iters to try with each random configuration. Default=500"); m->mothurOutEndLine();
                m->mothurOut("The iters parameter allows you to select the number of random configuration to try. Default=10"); m->mothurOutEndLine();
                m->mothurOut("The epsilon parameter allows you to select set an acceptable stopping point. Default=1e-12."); m->mothurOutEndLine();
@@ -178,7 +177,7 @@ NMDSCommand::~NMDSCommand(){}
 int NMDSCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                cout.setf(ios::fixed, ios::floatfield);
                cout.setf(ios::showpoint);