]> git.donarmstrong.com Git - mothur.git/blobdiff - errorchecking.cpp
fixed xp user bug with rarefact commands and cluster error checking
[mothur.git] / errorchecking.cpp
index 4eef3b041aaf724e87efb980c6115c9cc78036ce..728d4d27303a3c3b9d9ad602693ba4b309a36202 100644 (file)
@@ -23,21 +23,21 @@ ErrorCheck::ErrorCheck() {
 /******************************************************/
 
 void ErrorCheck::refresh() {
-       columnfile = globaldata->getColumnFile();
-       phylipfile = globaldata->getPhylipFile();
-       listfile = globaldata->getListFile();
-       rabundfile = globaldata->getRabundFile();
-       sabundfile = globaldata->getSabundFile();
-       namefile = globaldata->getNameFile();
-       groupfile = globaldata->getGroupFile();
-       orderfile = globaldata->getOrderFile();
-       fastafile = globaldata->getFastaFile();
-       treefile = globaldata->getTreeFile();
-       cutoff = globaldata->getCutOff();
-       format = globaldata->getFormat();
-       method = globaldata->getMethod();
-       randomtree = globaldata->getRandomTree();
-       sharedfile = globaldata->getSharedFile();
+       //columnfile = globaldata->getColumnFile();
+       //phylipfile = globaldata->getPhylipFile();
+       //listfile = globaldata->getListFile();
+       //rabundfile = globaldata->getRabundFile();
+       //sabundfile = globaldata->getSabundFile();
+       //namefile = globaldata->getNameFile();
+       //groupfile = globaldata->getGroupFile();
+       //orderfile = globaldata->getOrderFile();
+       //fastafile = globaldata->getFastaFile();
+       //treefile = globaldata->getTreeFile();
+       //cutoff = globaldata->getCutOff();
+       //format = globaldata->getFormat();
+       //method = globaldata->getMethod();
+       //randomtree = globaldata->getRandomTree();
+       //sharedfile = globaldata->getSharedFile();
 }
 
 /*******************************************************/
@@ -85,8 +85,6 @@ bool ErrorCheck::checkInput(string input) {
                                
                                //is it a valid parameter
                                if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
-
-
                                
                                if (parameter == "phylip" )             { phylipfile = value; }
                                if (parameter == "column" )             { columnfile = value; }
@@ -179,7 +177,7 @@ bool ErrorCheck::checkInput(string input) {
                        validateReadFiles();
                }
                
-               //are you trying to cluster before you have read something                      
+               //are you trying to cluster before you have read something      
                if (((commandName == "cluster") && (globaldata->gSparseMatrix == NULL)) ||
                        ((commandName == "cluster") && (globaldata->gListVector == NULL))) {
                                cout << "Before you use the cluster command, you first need to read in a distance matrix." << endl; 
@@ -198,9 +196,9 @@ bool ErrorCheck::checkInput(string input) {
                        }
                }
                
-               if ((commandName == "unifrac.weighted") || (commandName == "unifrac.unweighted")) {
+               if ((commandName == "unifrac.weighted") || (commandName == "unifrac.unweighted") || (commandName == "concensus")) {
                        if (globaldata->gTree.size() == 0) {//no trees were read
-                               cout << "You must execute the read.tree command, before you may execute the unifrac.weighted or unifrac.unweighted command." << endl; return false;  }
+                               cout << "You must execute the read.tree command, before you may execute the unifrac.weighted, unifrac.unweighted or concensus command." << endl; return false;  }
                }
                
                //check for valid method