X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=venn.cpp;h=32ebb3c9c8b4f96b0ad556450e9505f08dc2546d;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=cd14785b776723d10672f6c5de11505bfc5bdafe;hpb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;p=mothur.git diff --git a/venn.cpp b/venn.cpp index cd14785..32ebb3c 100644 --- a/venn.cpp +++ b/venn.cpp @@ -17,7 +17,7 @@ //********************************************************************************************************************** -Venn::Venn(string o, bool n, string f) : outputDir(o), nseqs(n), inputfile(f) { +Venn::Venn(string o, bool n, string f, int fs) : outputDir(o), nseqs(n), inputfile(f), fontSize(fs) { try { m = MothurOut::getInstance(); } @@ -49,17 +49,17 @@ vector Venn::getPic(SAbundVector* sabund, vector vCalcs) { outsvg << "\n"; outsvg << ""; - outsvg << "Venn Diagram at distance " + sabund->getLabel() + "\n"; + outsvg << "Venn Diagram at distance " + sabund->getLabel() + "\n"; outsvg << ""; - outsvg << "" + toString(data[0]) + "\n"; + outsvg << "" + toString(data[0]) + "\n"; if (data.size() == 3) { - outsvg << "The lower bound of the confidence interval is " + toString(data[1]) + "\n"; - outsvg << "The upper bound of the confidence interval is " + toString(data[2]) + "\n"; + outsvg << "The lower bound of the confidence interval is " + toString(data[1]) + "\n"; + outsvg << "The upper bound of the confidence interval is " + toString(data[2]) + "\n"; } if (nseqs) { - outsvg << "The number of sequences represented is " + toString(sabund->getNumSeqs()) + "\n"; + outsvg << "The number of sequences represented is " + toString(sabund->getNumSeqs()) + "\n"; } outsvg << "\n\n"; @@ -113,18 +113,18 @@ vector Venn::getPic(vector lookup, vector\n"; outsvg << ""; - outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; + outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; outsvg << ""; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.24 * height)) + "\">" + lookup[0]->getGroup() + "\n"; - outsvg << "" + toString(data[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.24 * height)) + "\">" + lookup[0]->getGroup() + "\n"; + outsvg << "" + toString(data[0]) + "\n"; if (data.size() == 3) { - outsvg << "The lower bound of the confidence interval is " + toString(data[1]) + "\n"; - outsvg << "The upper bound of the confidence interval is " + toString(data[2]) + "\n"; + outsvg << "The lower bound of the confidence interval is " + toString(data[1]) + "\n"; + outsvg << "The upper bound of the confidence interval is " + toString(data[2]) + "\n"; } if (nseqs) { - outsvg << "The number of sequences represented is " + toString(sabund->getNumSeqs()) + "\n"; + outsvg << "The number of sequences represented is " + toString(sabund->getNumSeqs()) + "\n"; } outsvg << "\n\n"; @@ -193,35 +193,35 @@ vector Venn::getPic(vector lookup, vector"; - outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; + outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; outsvg << ""; outsvg << ""; - outsvg << "" + toString(numA[0] - shared[0]) + "\n"; - outsvg << "" + toString(numB[0] - shared[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.25 * height)) + "\">" + lookup[0]->getGroup() + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.25 * height)) + "\">" + lookup[1]->getGroup() + "\n"; - outsvg << "" + toString(shared[0]) + "\n"; - outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA[0]); + outsvg << "" + toString(numA[0] - shared[0]) + "\n"; + outsvg << "" + toString(numB[0] - shared[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.25 * height)) + "\">" + lookup[0]->getGroup() + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.25 * height)) + "\">" + lookup[1]->getGroup() + "\n"; + outsvg << "" + toString(shared[0]) + "\n"; + outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA[0]); if (numA.size() == 3) { outsvg << " the lci is " + toString(numA[1]) + " and the hci is " + toString(numA[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsA) + "; " + toString(uniqSeqsToA) + " sequences are not shared"; } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB[0]); + outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB[0]); if (numB.size() == 3) { outsvg << " the lci is " + toString(numB[1]) + " and the hci is " + toString(numB[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsB) + "; " + toString(uniqSeqsToB) + " sequences are not shared"; } outsvg << "\n"; - outsvg << "The number of sepecies shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(shared[0]); + outsvg << "The number of sepecies shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(shared[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedVal) + "; " + toString((sharedVal / (float)(numSeqsA + numSeqsB))*100) + "% of these sequences are shared"; } outsvg << "\n"; - outsvg << "Percentage of species that are shared in groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString((shared[0] / (float)(numA[0] + numB[0] - shared[0]))*100) + "\n"; + outsvg << "Percentage of species that are shared in groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString((shared[0] / (float)(numA[0] + numB[0] - shared[0]))*100) + "\n"; - outsvg << "The total richness for all groups is " + toString((float)(numA[0] + numB[0] - shared[0]))+ "\n";; + outsvg << "The total richness for all groups is " + toString((float)(numA[0] + numB[0] - shared[0]))+ "\n";; //close file @@ -380,58 +380,58 @@ vector Venn::getPic(vector lookup, vector"; - outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; + outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; outsvg << ""; outsvg << ""; outsvg << ""; //place labels within overlaps - outsvg << "" + toString(numA[0]-sharedAwithBC[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[0]->getGroup() + "\n"; - outsvg << "" + toString(sharedAB[0] - sharedABC) + "\n"; - outsvg << "" + toString(numB[0]-sharedBwithAC[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[1]->getGroup() + "\n"; - outsvg << "" + toString(sharedAC[0] - sharedABC) + "\n"; - outsvg << "" + toString(numC[0]-sharedCwithAB[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.52 * height)) + "\">" + lookup[2]->getGroup() + "\n"; - outsvg << "" + toString(sharedBC[0] - sharedABC) + "\n"; - outsvg << "" + toString(sharedABC) + "\n"; + outsvg << "" + toString(numA[0]-sharedAwithBC[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[0]->getGroup() + "\n"; + outsvg << "" + toString(sharedAB[0] - sharedABC) + "\n"; + outsvg << "" + toString(numB[0]-sharedBwithAC[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[1]->getGroup() + "\n"; + outsvg << "" + toString(sharedAC[0] - sharedABC) + "\n"; + outsvg << "" + toString(numC[0]-sharedCwithAB[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.52 * height)) + "\">" + lookup[2]->getGroup() + "\n"; + outsvg << "" + toString(sharedBC[0] - sharedABC) + "\n"; + outsvg << "" + toString(sharedABC) + "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedAB[0]); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedAB[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedABVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedAC[0]); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedAC[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedACVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedBC[0]); + outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedBC[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedBCVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and combined groups " + lookup[1]->getGroup() + lookup[2]->getGroup() + " is " + toString(sharedAwithBC[0]) + "\n"; - outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and combined groups " + lookup[0]->getGroup() + lookup[2]->getGroup() + " is " + toString(sharedBwithAC[0]) + "\n"; - outsvg << "The number of species shared between groups " + lookup[2]->getGroup() + " and combined groups " + lookup[0]->getGroup() + lookup[1]->getGroup() + " is " + toString(sharedCwithAB[0]) + "\n"; - outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA[0]); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and combined groups " + lookup[1]->getGroup() + lookup[2]->getGroup() + " is " + toString(sharedAwithBC[0]) + "\n"; + outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and combined groups " + lookup[0]->getGroup() + lookup[2]->getGroup() + " is " + toString(sharedBwithAC[0]) + "\n"; + outsvg << "The number of species shared between groups " + lookup[2]->getGroup() + " and combined groups " + lookup[0]->getGroup() + lookup[1]->getGroup() + " is " + toString(sharedCwithAB[0]) + "\n"; + outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA[0]); if (numA.size() == 3) { outsvg << " the lci is " + toString(numA[1]) + " and the hci is " + toString(numA[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsA) + "; " + toString(uniqSeqsToA) + " sequences are not shared"; } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB[0]); + outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB[0]); if (numB.size() == 3) { outsvg << " the lci is " + toString(numB[1]) + " and the hci is " + toString(numB[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsB) + "; " + toString(uniqSeqsToB) + " sequences are not shared"; } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC[0]); + outsvg << "The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC[0]); if (numC.size() == 3) { outsvg << " the lci is " + toString(numC[1]) + " and the hci is " + toString(numC[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsC) + "; " + toString(uniqSeqsToC) + " sequences are not shared"; } outsvg << "\n"; - outsvg << "The total richness of all the groups is " + toString(numA[0] + numB[0] + numC[0] - sharedAB[0] - sharedAC[0] - sharedBC[0] + sharedABC) + "\n"; - outsvg << "The total shared richness is " + toString(sharedABC); + outsvg << "The total richness of all the groups is " + toString(numA[0] + numB[0] + numC[0] - sharedAB[0] - sharedAC[0] - sharedBC[0] + sharedABC) + "\n"; + outsvg << "The total shared richness is " + toString(sharedABC); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedVal); } outsvg << "\n"; @@ -477,56 +477,56 @@ vector Venn::getPic(vector lookup, vector"; - outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; + outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; outsvg << ""; outsvg << ""; outsvg << ""; //place labels within overlaps - outsvg << "" + toString(numA[0]-sharedab[0]-sharedac[0]+sharedabc[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[0]->getGroup() + "\n"; - outsvg << "" + toString(sharedab[0] - sharedabc[0]) + "\n"; - outsvg << "" + toString(numB[0]-sharedab[0]-sharedbc[0]+sharedabc[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[1]->getGroup() + "\n"; - outsvg << "" + toString(sharedac[0] - sharedabc[0]) + "\n"; - outsvg << "" + toString(numC[0]-sharedac[0]-sharedbc[0]+sharedabc[0]) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.51 * height)) + "\">" + lookup[2]->getGroup() + "\n"; - outsvg << "" + toString(sharedbc[0] - sharedabc[0]) + "\n"; - outsvg << "" + toString(sharedabc[0]) + "\n"; + outsvg << "" + toString(numA[0]-sharedab[0]-sharedac[0]+sharedabc[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[0]->getGroup() + "\n"; + outsvg << "" + toString(sharedab[0] - sharedabc[0]) + "\n"; + outsvg << "" + toString(numB[0]-sharedab[0]-sharedbc[0]+sharedabc[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.19 * height)) + "\">" + lookup[1]->getGroup() + "\n"; + outsvg << "" + toString(sharedac[0] - sharedabc[0]) + "\n"; + outsvg << "" + toString(numC[0]-sharedac[0]-sharedbc[0]+sharedabc[0]) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.51 * height)) + "\">" + lookup[2]->getGroup() + "\n"; + outsvg << "" + toString(sharedbc[0] - sharedabc[0]) + "\n"; + outsvg << "" + toString(sharedabc[0]) + "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedab[0]); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedab[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedABVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedac[0]); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedac[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedACVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedbc[0]); + outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedbc[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedBCVal); } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA[0]); + outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA[0]); if (numA.size() == 3) { outsvg << " the lci is " + toString(numA[1]) + " and the hci is " + toString(numA[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsA); } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB[0]); + outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB[0]); if (numB.size() == 3) { outsvg << " the lci is " + toString(numB[1]) + " and the hci is " + toString(numB[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsB); } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC[0]); + outsvg << "The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC[0]); if (numC.size() == 3) { outsvg << " the lci is " + toString(numC[1]) + " and the hci is " + toString(numC[2]); } if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsC); } outsvg << "\n"; - outsvg << "The total richness of all the groups is " + toString(numA[0] + numB[0] + numC[0] - sharedab[0] - sharedac[0] - sharedbc[0] + sharedabc[0]) + "\n"; - outsvg << "The total shared richness is " + toString(sharedabc[0]); + outsvg << "The total richness of all the groups is " + toString(numA[0] + numB[0] + numC[0] - sharedab[0] - sharedac[0] - sharedbc[0] + sharedabc[0]) + "\n"; + outsvg << "The total shared richness is " + toString(sharedabc[0]); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedVal); } outsvg << "\n"; @@ -717,50 +717,50 @@ vector Venn::getPic(vector lookup, vector\n"; outsvg << "\n"; outsvg << ""; - outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; + outsvg << "Venn Diagram at distance " + lookup[0]->getLabel() + "\n"; - outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA); + outsvg << "The number of species in group " + lookup[0]->getGroup() + " is " + toString(numA); if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsA); } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB); + outsvg << "The number of species in group " + lookup[1]->getGroup() + " is " + toString(numB); if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsB); } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC); + outsvg << "The number of species in group " + lookup[2]->getGroup() + " is " + toString(numC); if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsC); } outsvg << "\n"; - outsvg << "The number of species in group " + lookup[3]->getGroup() + " is " + toString(numD); + outsvg << "The number of species in group " + lookup[3]->getGroup() + " is " + toString(numD); if (nseqs) { outsvg << ", and the number of squences is " + toString(numSeqsD); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedAB); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[1]->getGroup() + " is " + toString(sharedAB); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedABVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedAC); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedAC); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedACVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedAD); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedAD); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedADVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedBC); + outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedBC); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedBCVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedBD); + outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedBD); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedBDVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedCD); + outsvg << "The number of species shared between groups " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedCD); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedCDVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedABC); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[1]->getGroup() + " and " + lookup[2]->getGroup() + " is " + toString(sharedABC); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedABCVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[1]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedABD); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[1]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedABD); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedABDVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedACD); + outsvg << "The number of species shared between groups " + lookup[0]->getGroup() + ", " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedACD); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedACDVal); } outsvg << "\n"; - outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + ", " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedBCD); + outsvg << "The number of species shared between groups " + lookup[1]->getGroup() + ", " + lookup[2]->getGroup() + " and " + lookup[3]->getGroup() + " is " + toString(sharedBCD); if (nseqs) { outsvg << ", and the number of squences is " + toString(sharedBCDVal); } outsvg << "\n"; @@ -799,27 +799,27 @@ vector Venn::getPic(vector lookup, vector" + toString(numA) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.11 * height)) + "\">" + lookup[0]->getGroup() + "\n"; - outsvg << "" + toString(sharedAB) + "\n"; - outsvg << "" + toString(numB) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.11 * height)) + "\">" + lookup[1]->getGroup() + "\n"; - outsvg << "" + toString(sharedAC) + "\n"; - outsvg << "" + toString(numC) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.26 * height)) + "\">" + lookup[2]->getGroup() + "\n"; - outsvg << "" + toString(sharedBD) + "\n"; - outsvg << "" + toString(numD) + "\n"; - outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.26 * height)) + "\">" + lookup[3]->getGroup() + "\n"; - outsvg << "" + toString(sharedAD) + "\n"; - outsvg << "" + toString(sharedBC) + "\n"; - outsvg << "" + toString(sharedCD) + "\n"; - outsvg << "" + toString(sharedABD) + "\n"; - outsvg << "" + toString(sharedBCD) + "\n"; - outsvg << "" + toString(sharedACD) + "\n"; - outsvg << "" + toString(sharedABC) + "\n"; - outsvg << "" + toString(sharedABCD) + "\n"; + outsvg << "" + toString(numA) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.11 * height)) + "\">" + lookup[0]->getGroup() + "\n"; + outsvg << "" + toString(sharedAB) + "\n"; + outsvg << "" + toString(numB) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.11 * height)) + "\">" + lookup[1]->getGroup() + "\n"; + outsvg << "" + toString(sharedAC) + "\n"; + outsvg << "" + toString(numC) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.26 * height)) + "\">" + lookup[2]->getGroup() + "\n"; + outsvg << "" + toString(sharedBD) + "\n"; + outsvg << "" + toString(numD) + "\n"; + outsvg << "getGroup().length() / 2)) + "\" y=\"" + toString(int(0.26 * height)) + "\">" + lookup[3]->getGroup() + "\n"; + outsvg << "" + toString(sharedAD) + "\n"; + outsvg << "" + toString(sharedBC) + "\n"; + outsvg << "" + toString(sharedCD) + "\n"; + outsvg << "" + toString(sharedABD) + "\n"; + outsvg << "" + toString(sharedBCD) + "\n"; + outsvg << "" + toString(sharedACD) + "\n"; + outsvg << "" + toString(sharedABC) + "\n"; + outsvg << "" + toString(sharedABCD) + "\n"; - outsvg << "The total richness of all the groups is " + toString((float)(numA + numB + numC + numD + sharedAB + sharedAC + sharedAD + sharedBC + sharedBD + sharedCD + sharedABC + sharedABD + sharedACD + sharedBCD + sharedABCD)); + outsvg << "The total richness of all the groups is " + toString((float)(numA + numB + numC + numD + sharedAB + sharedAC + sharedAD + sharedBC + sharedBD + sharedCD + sharedABC + sharedABD + sharedACD + sharedBCD + sharedABCD)); if (nseqs) { outsvg << ", and the number of squences in the otus shared by all groups is " + toString(sharedVal); } outsvg << "\n";