initialSharedRarefact();
initialSummary();
initialSharedSummary();
+ initialVennSingle();
+ initialVennShared();
+ initialTreeGroups();
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function ValidCalculator. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
}
cout << endl;
return false; }
- //not a valid paramter
+ }else if (parameter == "vennsingle") {
+ //is it valid
+ if ((vennsingle.find(calculator)) != (vennsingle.end())) {
+ return true;
+ }else {
+ cout << calculator << " is not a valid estimator for the venn command in single mode and will be disregarded. Valid estimators are ";
+ for (it = vennsingle.begin(); it != vennsingle.end(); it++) {
+ cout << it->first << ", ";
+ }
+ cout << endl;
+ return false; }
+ }else if (parameter == "vennshared") {
+ //is it valid
+ if ((vennshared.find(calculator)) != (vennshared.end())) {
+ return true;
+ }else {
+ cout << calculator << " is not a valid estimator for the venn command in shared mode and will be disregarded. Valid estimators are ";
+ for (it = vennshared.begin(); it != vennshared.end(); it++) {
+ cout << it->first << ", ";
+ }
+ cout << endl;
+ return false; }
+ }else if (parameter == "treegroup") {
+ //is it valid
+ if ((treegroup.find(calculator)) != (treegroup.end())) {
+ return true;
+ }else {
+ cout << calculator << " is not a valid estimator for the tree.groups command in shared mode and will be disregarded. Valid estimators are ";
+ for (it = treegroup.begin(); it != treegroup.end(); it++) {
+ cout << it->first << ", ";
+ }
+ cout << endl;
+ return false; }
+
+ //not a valid parameter
}else { return false; }
}
/********************************************************************/
void ValidCalculators::initialSingle() {
try {
-
- single["sobs"] = "sobs";
- single["chao"] = "chao";
- single["ace"] = "ace";
- single["jack"] = "jack";
- single["shannon"] = "shannon";
- single["npshannon"] = "npshannon";
- single["simpson"] = "simpson";
- single["bootstrap"] = "bootstrap";
- single["default"] = "default";
+ single["sobs"] = "sobs";
+ single["chao"] = "chao";
+ single["ace"] = "ace";
+ single["jack"] = "jack";
+ single["shannon"] = "shannon";
+ single["npshannon"] = "npshannon";
+ single["simpson"] = "simpson";
+ single["bergerparker"] = "bergerparker";
+ single["bootstrap"] = "bootstrap";
+ single["geom"] = "geom";
+ single["logsd"] = "logsd";
+ single["qstat"] = "qstat";
+ single["bstick"] = "bstick";
single["nseqs"] = "nseqs";
+ single["default"] = "default";
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
shared["sharedsorest"] = "sharedsorest";
shared["sharedthetayc"] = "sharedthetayc";
shared["sharedthetan"] = "sharedthetan";
+ shared["sharedkstest"] = "sharedkstest";
+ shared["sharedbdiversity"] = "sharedbdiversity";
shared["sharednseqs"] = "sharednseqs";
+ shared["sharedochiai"] = "sharedochiai";
+ shared["sharedanderberg"] = "sharedanderberg";
+ shared["sharedkulczynski"] = "sharedkulczynski";
+ shared["sharedkulczynskicody"] = "sharedkulczynskicody";
+ shared["sharedlennon"] = "sharedlennon";
+ shared["sharedmorisitahorn"] = "sharedmorisitahorn";
+ shared["sharedbraycurtis"] = "sharedbraycurtis";
shared["default"] = "default";
}
catch(exception& e) {
summary["shannon"] = "shannon";
summary["npshannon"] = "npshannon";
summary["simpson"] = "simpson";
+ summary["bergerparker"] = "bergerparker";
+ summary["geom"] = "geom";
summary["bootstrap"] = "bootstrap";
+ summary["logsd"] = "logsd";
+ summary["qstat"] = "qstat";
+ summary["bstick"] = "bstick";
summary["nseqs"] = "nseqs";
summary["default"] = "default";
}
sharedsummary["sharedsorest"] = "sharedsorest";
sharedsummary["sharedthetayc"] = "sharedthetayc";
sharedsummary["sharedthetan"] = "sharedthetan";
+ sharedsummary["sharedkstest"] = "sharedkstest";
+ sharedsummary["sharedbdiversity"] = "sharedbdiversity";
sharedsummary["sharednseqs"] = "sharednseqs";
+ sharedsummary["sharedochiai"] = "sharedochiai";
+ sharedsummary["sharedanderberg"] = "sharedanderberg";
+ sharedsummary["sharedkulczynski"] = "sharedkulczynski";
+ sharedsummary["sharedkulczynskicody"] = "sharedkulczynskicody";
+ sharedsummary["sharedlennon"] = "sharedlennon";
+ sharedsummary["sharedmorisitahorn"] = "sharedmorisitahorn";
+ sharedsummary["sharedbraycurtis"] = "sharedbraycurtis";
sharedsummary["default"] = "default";
}
catch(exception& e) {
}
}
+
+/********************************************************************/
+void ValidCalculators::initialVennSingle() {
+ try {
+ vennsingle["sobs"] = "sobs";
+ vennsingle["chao"] = "chao";
+ vennsingle["ace"] = "ace";
+ vennsingle["jack"] = "jack";
+ vennsingle["default"] = "default";
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the ValidCalculator class function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
+
/********************************************************************/
+void ValidCalculators::initialVennShared() {
+ try {
+ vennshared["sharedsobs"] = "sharedsobs";
+ vennshared["sharedchao"] = "sharedchao";
+ vennshared["sharedace"] = "sharedace";
+ vennshared["default"] = "default";
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the ValidCalculator class function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
+
+/********************************************************************/
+void ValidCalculators::initialTreeGroups() {
+ try {
+ treegroup["sharedjabund"] = "sharedjabund";
+ treegroup["sharedsorensonabund"] = "sharedsorensonabund";
+ treegroup["sharedjclass"] = "sharedjclass";
+ treegroup["sharedsorclass"] = "sharedsorclass";
+ treegroup["sharedjest"] = "sharedjest";
+ treegroup["sharedsorest"] = "sharedsorest";
+ treegroup["sharedthetayc"] = "sharedthetayc";
+ treegroup["sharedthetan"] = "sharedthetan";
+ treegroup["sharedmorisitahorn"] = "sharedmorisitahorn";
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialTreeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the ValidCalculator class function initialTreeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
+
+
+/********************************************************************/
+