+ validCalculator = new ValidCalculators();
+
+ int i;
+
+ if (format == "list") {
+ for (i=0; i<globaldata->Estimators.size(); i++) {
+ if (validCalculator->isValidCalculator("vennsingle", globaldata->Estimators[i]) == true) {
+ if (globaldata->Estimators[i] == "sobs") {
+ vennCalculators.push_back(new Sobs());
+ }else if (globaldata->Estimators[i] == "chao") {
+ vennCalculators.push_back(new Chao1());
+ }else if (globaldata->Estimators[i] == "ace") {
+ convert(globaldata->getAbund(), abund);
+ if(abund < 5)
+ abund = 10;
+ vennCalculators.push_back(new Ace(abund));
+ }else if (globaldata->Estimators[i] == "jack") {
+ vennCalculators.push_back(new Jackknife());
+ }
+ }
+ }
+ }else {
+ for (i=0; i<globaldata->Estimators.size(); i++) {
+ if (validCalculator->isValidCalculator("vennshared", globaldata->Estimators[i]) == true) {
+ if (globaldata->Estimators[i] == "sharedsobs") {
+ vennCalculators.push_back(new SharedSobsCS());
+ }else if (globaldata->Estimators[i] == "sharedchao") {
+ vennCalculators.push_back(new SharedChao1());
+ }else if (globaldata->Estimators[i] == "sharedace") {
+ vennCalculators.push_back(new SharedAce());
+ }
+ }
+ }
+ }
+
+ venn = new Venn();
+
+ //reset calc for next command
+ globaldata->setCalc("");
+