X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=heatmapsim.cpp;fp=heatmapsim.cpp;h=9a1255037c4312291238b613d39929c7b50549b5;hb=74844a60d80c6dd06e3fb02ee9b928424f9019b0;hp=b29e98b68c4af0824d4effbffa753ede522309c7;hpb=a218321731df14d231bbc08e79906f757cf1540d;p=mothur.git diff --git a/heatmapsim.cpp b/heatmapsim.cpp index b29e98b..9a12550 100644 --- a/heatmapsim.cpp +++ b/heatmapsim.cpp @@ -22,18 +22,21 @@ //********************************************************************************************************************** HeatMapSim::HeatMapSim(string dir) : outputDir(dir) { globaldata = GlobalData::getInstance(); + m = MothurOut::getInstance(); } //********************************************************************************************************************** -void HeatMapSim::getPic(vector lookup, vector calcs) { +vector HeatMapSim::getPic(vector lookup, vector calcs) { try { EstOutput data; vector sims; + vector outputNames; //make file for each calculator selected for (int m = 0; m < calcs.size(); m++) { string filenamesvg = outputDir + getRootName(getSimpleName(globaldata->inputFileName)) + lookup[0]->getLabel() + calcs[m]->getName() + ".heatmap.sim.svg"; openOutputFile(filenamesvg, outsvg); + outputNames.push_back(filenamesvg); //svg image outsvg << "\n"; @@ -94,15 +97,15 @@ void HeatMapSim::getPic(vector lookup, vector } - + return outputNames; } catch(exception& e) { - errorOut(e, "HeatMapSim", "getPic"); + m->errorOut(e, "HeatMapSim", "getPic"); exit(1); } } //********************************************************************************************************************** -void HeatMapSim::getPic(vector< vector > dists, vector groups) { +string HeatMapSim::getPic(vector< vector > dists, vector groups) { try { vector sims; @@ -161,9 +164,11 @@ void HeatMapSim::getPic(vector< vector > dists, vector groups) { outsvg << "\n\n"; outsvg.close(); + return filenamesvg; + } catch(exception& e) { - errorOut(e, "HeatMapSim", "getPic"); + m->errorOut(e, "HeatMapSim", "getPic"); exit(1); } } @@ -202,7 +207,7 @@ void HeatMapSim::printLegend(int y, float maxSim) { } catch(exception& e) { - errorOut(e, "HeatMapSim", "printLegend"); + m->errorOut(e, "HeatMapSim", "printLegend"); exit(1); } }