+ if ((vCalcs[i]->getName() != "sharedsobs") && (vCalcs[i]->getName() != "sharedchao")) { cout << vCalcs[i]->getName() << " is not a valid calculator with four groups. It will be disregarded. " << endl; }
+ else{
+ string filenamesvg = getRootName(globaldata->inputFileName) + lookup[0]->getLabel() + ".venn." + vCalcs[i]->getName() + ".svg";
+ openOutputFile(filenamesvg, outsvg);
+
+
+ //in essence you want to run it like a single
+ if (vCalcs[i]->getName() == "sharedsobs") {
+ singleCalc = new Sobs();
+ }else if (vCalcs[i]->getName() == "sharedchao") {
+ singleCalc = new Chao1();
+ }
+
+ //get estimates for numA
+ data = singleCalc->getValues(sabundA);
+ numA = data[0];
+
+ //get estimates for numB
+ data = singleCalc->getValues(sabundB);
+ numB = data[0];
+
+ //get estimates for numC
+ data = singleCalc->getValues(sabundC);
+ numC = data[0];
+
+ //get estimates for numD
+ data = singleCalc->getValues(sabundD);
+ numD = data[0];
+
+
+ //get estimates for pairs
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[1]);
+ data = vCalcs[i]->getValues(subset);
+ sharedAB = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[2]);
+ data = vCalcs[i]->getValues(subset);
+ sharedAC = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedAD = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[1]); subset.push_back(lookup[2]);
+ data = vCalcs[i]->getValues(subset);
+ sharedBC = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[1]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedBD = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[2]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedCD = data[0];
+
+
+ //get estimates for combos of 3
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[1]); subset.push_back(lookup[2]);
+ data = vCalcs[i]->getValues(subset);
+ sharedABC = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[2]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedACD = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[1]); subset.push_back(lookup[2]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedBCD = data[0];
+
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[1]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedABD = data[0];
+
+ //get estimate for all four
+ data = vCalcs[i]->getValues(lookup);
+ sharedABCD = data[0];
+