]> git.donarmstrong.com Git - mothur.git/blobdiff - errorchecking.cpp
added the Calculators Thomas made in the fall. Added parameter and command error...
[mothur.git] / errorchecking.cpp
index b9b3100b20f6b840f5f296964a7dc6f8aefd5d3d..59095f76e3bf46c652361e7b270f1c9ca8ebc7a1 100644 (file)
@@ -83,8 +83,10 @@ bool ErrorCheck::checkInput(string input) {
                                splitAtComma(value, optionText);
                                splitAtEquals(parameter, value);
                                
-                               //is it a valid parameter for the command
-                               if (validParameter->isValidParameter(parameter, commandName) != true) { return false; }
+                               //is it a valid parameter
+                               if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
+
+
                                
                                if (parameter == "phylip" )             { phylipfile = value; }
                                if (parameter == "column" )             { columnfile = value; }
@@ -114,9 +116,9 @@ bool ErrorCheck::checkInput(string input) {
                        if (errorFree)  { //gets the last parameter and value
                                value = optionText;
                                splitAtEquals(parameter, value);
-                               
-                               //is it a valid parameter for the command
-                               if (validParameter->isValidParameter(parameter, commandName) != true) { return false; }
+                               //is it a valid parameter
+                               if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
+       
                                
                                if (parameter == "phylip" )             { phylipfile = value; }
                                if (parameter == "column" )             { columnfile = value; }                         
@@ -442,7 +444,7 @@ void ErrorCheck::validateReadPhil() {
                }else if (sabundfile != "") { 
                        if ((listfile != "") || (rabundfile != "")) { 
                                cout << "When executing a read.otu you must enter ONLY ONE of the following: list, rabund or sabund." << endl; errorFree = false; }
-               }else if ((listfile == "") && (rabundfile == "") && (sabundfile == "")) {
+               }else if ((listfile == "") && (rabundfile == "") && (sabundfile == "") && (sharedfile == "")) {
                            cout << "When executing a read.otu you must enter one of the following: list, rabund or sabund." << endl; errorFree = false; 
                }