X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=heatmap.cpp;h=3dca535b8600e38f29cf87160ab5a487282280d5;hb=058715887611e00dc18324cb0bd4a4a8472530b3;hp=d05c700dd9dddfd9482ba6016c12f155e38362a9;hpb=74844a60d80c6dd06e3fb02ee9b928424f9019b0;p=mothur.git diff --git a/heatmap.cpp b/heatmap.cpp index d05c700..3dca535 100644 --- a/heatmap.cpp +++ b/heatmap.cpp @@ -44,6 +44,8 @@ string HeatMap::getPic(RAbundVector* rabund) { for(int i=0;isize();i++){ float relAbund = rabund->get(i) / (float)rabund->getNumSeqs(); + if (m->control_pressed) { return "control"; } + if (rabund->get(i) != 0) { //don't want log value of 0. if (scaler == "log10") { scaleRelAbund[i] = toHex(int(255 * log10(relAbund) / log10(maxRelAbund))) + "0000"; @@ -78,6 +80,7 @@ string HeatMap::getPic(RAbundVector* rabund) { y = 70; for (int i = 0; i < scaleRelAbund.size(); i++) { + if (m->control_pressed) { outsvg.close(); return "control"; } outsvg << "\n"; y += 5; @@ -118,6 +121,7 @@ string HeatMap::getPic(vector lookup) { for(int i=0;isize(), ""); for(int j=0;jsize();j++){ + if (m->control_pressed) { return "control"; } float relAbund = lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs(); if (lookup[i]->getAbundance(j) != 0) { //don't want log value of 0. @@ -160,6 +164,7 @@ string HeatMap::getPic(vector lookup) { y = 70; for (int i = 0; i < scaleRelAbund[0].size(); i++) { for (int j = 0; j < scaleRelAbund.size(); j++) { + if (m->control_pressed) { outsvg.close(); return "control"; } outsvg << "\n"; x += 300;