]> git.donarmstrong.com Git - mothur.git/blobdiff - errorchecking.cpp
added get.rabund and get.sabund command and fixed bug introduced by line by line...
[mothur.git] / errorchecking.cpp
index 39fb17e47a4e2f72692f5d5be15f19866fca2bef..06524921a4db4670bdb4a7253977178f468c9b19 100644 (file)
@@ -246,10 +246,18 @@ bool ErrorCheck::checkInput(string input) {
                        else {cout << "Not a valid clustering method.  Valid clustering algorithms are furthest, nearest or average." << endl; return false; }
                }
                
-               if ((commandName == "collect.single") || (commandName == "rarefaction.single") || (commandName == "summary.single") ){ 
+               if ((commandName == "collect.single") || (commandName == "rarefaction.single") || (commandName == "summary.single")){ 
                        if ((globaldata->getListFile() == "") && (globaldata->getRabundFile() == "") && (globaldata->getSabundFile() == "")) { cout << "You must read a list, sabund or rabund before you can use the collect.single, rarefaction.single or summary.single commands." << endl; return false; }
                }
                
+               if (commandName == "get.rabund") {
+                       if (globaldata->getListFile() == "") { cout << "You must read a listfile before you can use the get.rabund command." << endl; return false; }
+               }
+               
+               if (commandName == "get.sabund") {
+                       if ((globaldata->getListFile() == "") && (globaldata->getRabundFile() == "")) { cout << "You must read a list or rabund before you can use the get.sabund command." << endl; return false; }
+               }
+               
                if ((commandName == "collect.shared") || (commandName == "rarefaction.shared") || (commandName == "summary.shared") || (commandName == "bootstrap.shared") || (commandName == "dist.shared")){ 
                        if (globaldata->getSharedFile() == "") {
                                if (globaldata->getListFile() == "") { cout << "You must read a list and a group, or a shared before you can use the collect.shared, rarefaction.shared, summary.shared, tree.shared, bootstrap.shared or dist.shared commands." << endl; return false; }