X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=venn.cpp;h=2c40c25ed7fadfcc50958ba1a1c87e124a939cf6;hb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2;hp=6402adff9ec9f0787f331e81046ee3ca4569bec7;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/venn.cpp b/venn.cpp index 6402adf..2c40c25 100644 --- a/venn.cpp +++ b/venn.cpp @@ -19,14 +19,10 @@ Venn::Venn(){ try { globaldata = GlobalData::getInstance(); - format = globaldata->getFormat(); + } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the Venn class Function Venn. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the Venn class function Venn. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "Venn", "Venn"); exit(1); } } @@ -59,11 +55,7 @@ void Venn::getPic(SAbundVector* sabund, vector vCalcs) { } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the Venn class Function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the Venn class function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "Venn", "getPic"); exit(1); } } @@ -305,9 +297,7 @@ void Venn::getPic(vector lookup, vector vCalcs outsvg << ""; outsvg << ""; outsvg << ""; -//cout << "numA = " << numA[0] << " numB = " << numB[0] << " numC = " << numC[0] << endl; -//cout << "sharedAB = " << sharedAB[0] << " sharedAC = " << sharedAC[0] << " sharedBC = " << sharedBC[0] << endl; -//cout << "sharedAwithBC = " << sharedAwithBC[0] << " sharedBwithAC = " << sharedBwithAC[0] << " sharedCwithAB = " << sharedCwithAB[0] << endl; + //place labels within overlaps outsvg << "" + toString(numA[0]-sharedAwithBC[0]) + "\n"; outsvg << "getGroup().length() / 2)) + "\" y=\"150\">" + lookup[0]->getGroup() + "\n"; @@ -374,7 +364,7 @@ void Venn::getPic(vector lookup, vector vCalcs //make a file for each calculator for(int i=0;igetName() != "sharedsobs") && (vCalcs[i]->getName() != "sharedchao")) { cout << vCalcs[i]->getName() << " is not a valid calculator with four groups. It will be disregarded. " << endl; } + if ((vCalcs[i]->getName() != "sharedsobs") && (vCalcs[i]->getName() != "sharedchao")) { mothurOut(vCalcs[i]->getName() + " is not a valid calculator with four groups. It will be disregarded. "); mothurOutEndLine(); } else{ string filenamesvg = getRootName(globaldata->inputFileName) + lookup[0]->getLabel() + ".venn." + vCalcs[i]->getName() + ".svg"; openOutputFile(filenamesvg, outsvg); @@ -507,11 +497,7 @@ void Venn::getPic(vector lookup, vector vCalcs } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the Venn class Function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the Venn class function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "Venn", "getPic"); exit(1); } }