+ if ((vCalcs[i]->getName() != "sharedsobs") && (vCalcs[i]->getName() != "sharedchao")) { m->mothurOut(vCalcs[i]->getName() + " is not a valid calculator with four groups. It will be disregarded. "); m->mothurOutEndLine(); }
+ else{
+ string filenamesvg = outputDir + getSimpleName(globaldata->inputFileName) + lookup[0]->getLabel() + ".venn." + vCalcs[i]->getName() + ".svg";
+ outputNames.push_back(filenamesvg);
+ openOutputFile(filenamesvg, outsvg);
+
+ if (m->control_pressed) { outsvg.close(); return outputNames; }
+
+ //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];
+ //cout << "num a = " << numA << endl;
+
+ //get estimates for numB
+ data = singleCalc->getValues(sabundB);
+ numB = data[0];
+ //cout << "num b = " << numB << endl;
+ //get estimates for numC
+ data = singleCalc->getValues(sabundC);
+ numC = data[0];
+ //cout << "num c = " << numC << endl;
+ //get estimates for numD
+ data = singleCalc->getValues(sabundD);
+ numD = data[0];
+//cout << "num d = " << numD << endl;
+
+ //get estimates for pairs
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[1]);
+ data = vCalcs[i]->getValues(subset);
+ sharedAB = data[0];
+ //cout << "num ab = " << sharedAB << endl;
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[2]);
+ data = vCalcs[i]->getValues(subset);
+ sharedAC = data[0];
+ //cout << "num ac = " << sharedAC << endl;
+ subset.clear();
+ subset.push_back(lookup[0]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedAD = data[0];
+ //cout << "num ad = " << sharedAD << endl;
+ subset.clear();
+ subset.push_back(lookup[1]); subset.push_back(lookup[2]);
+ data = vCalcs[i]->getValues(subset);
+ sharedBC = data[0];
+ //cout << "num bc = " << sharedBC << endl;
+ subset.clear();
+ subset.push_back(lookup[1]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedBD = data[0];
+ //cout << "num bd = " << sharedBD << endl;
+ subset.clear();
+ subset.push_back(lookup[2]); subset.push_back(lookup[3]);
+ data = vCalcs[i]->getValues(subset);
+ sharedCD = data[0];
+
+ //cout << "num cd = " << sharedCD << endl;
+ //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];
+ //cout << "num abc = " << sharedABC << endl;
+ 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];
+ //cout << "num acd = " << sharedACD << endl;
+ 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];
+ //cout << "num bcd = " << sharedBCD << endl;
+ 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];
+//cout << "num abd = " << sharedABD << endl;
+ //get estimate for all four
+ data = vCalcs[i]->getValues(lookup);
+ sharedABCD = data[0];
+ //cout << "num abcd = " << sharedABCD << endl << endl;