]> git.donarmstrong.com Git - mothur.git/blobdiff - errorchecking.cpp
minor bugs fixes and added line and label options to read.otu's parselist and shared...
[mothur.git] / errorchecking.cpp
index 8556c27266ab0c2fa56bd4c9ddeb644e1d81e0b8..1d60a4a35a8e7252e8f318a4997f91abdf102a51 100644 (file)
@@ -102,7 +102,7 @@ bool ErrorCheck::checkInput(string input) {
                                if (parameter == "fileroot" )           { fileroot = value; }
                                if (parameter == "line" )                       { line = value; }
                                if (parameter == "label" )                      { label = value; }
-                               if (parameter == "randomtree" )         { randomtree = value;   }
+                               if (parameter == "random" )                     { randomtree = value;   }
 
                        }
                        
@@ -133,14 +133,13 @@ bool ErrorCheck::checkInput(string input) {
                                if (parameter == "fileroot" )           { fileroot = value; }
                                if (parameter == "line" )                       { line = value; }
                                if (parameter == "label" )                      { label = value; }
-                               if (parameter == "randomtree" )         { randomtree = value;   }
+                               if (parameter == "random" )                     { randomtree = value;   }
 
                        }
                }
                
                //make sure the user does not use both the line and label parameters
                if ((line != "") && (label != "")) { cout << "You may use either the line or label parameters, but not both." << endl; return false; }
-       
                
                if (commandName == "read.dist") { 
                        validateReadFiles();
@@ -172,9 +171,9 @@ bool ErrorCheck::checkInput(string input) {
                
                if (commandName == "parsimony") {
                        //are you trying to use parsimony without reading a tree or saying you want random distribution
-                       if (randomtree == "0")  {
-                               if ((globaldata->getTreeFile() == "") || (globaldata->getGroupFile() == "")) {
-                                       cout << "You must read a treefile and a groupfile or set the randomtree parameter to 1, before you may execute the parsimony command." << endl; return false;  }
+                       if (randomtree == "")  {
+                               if (globaldata->gTree.size() == 0) {
+                                       cout << "You must read a treefile and a groupfile or set the randomtree parameter to the output filename you wish, before you may execute the parsimony command." << endl; return false;  }
                        }
                }