}
- string filenamesvg = getRootName(globaldata->inputFileName) + rabund->getLabel() + ".heatmap.svg";
+ string filenamesvg = getRootName(globaldata->inputFileName) + rabund->getLabel() + ".heatmap.bin.svg";
openOutputFile(filenamesvg, outsvg);
//svg image
void HeatMap::getPic(vector<SharedRAbundVector*> lookup) {
try {
-
//sort lookup so shared bins are on top
- if (sorted == "T") { sortSharedVectors(lookup); }
+ if (isTrue(sorted) == true) { sortSharedVectors(lookup); }
vector<vector<string> > scaleRelAbund;
vector<float> maxRelAbund(lookup.size(), 0.0);
scaleRelAbund[i][j] = toHex(int(255 * log10(relAbund / log10(maxRelAbund[i])))) + "0000";
}
}else { scaleRelAbund[i][j] = "FFFFFF"; }
-
+
}
}
-
- string filenamesvg = getRootName(globaldata->inputFileName) + lookup[0]->getLabel() + ".heatmap.svg";
+
+ string filenamesvg = getRootName(globaldata->inputFileName) + lookup[0]->getLabel() + ".heatmap.bin.svg";
openOutputFile(filenamesvg, outsvg);
//svg image
outsvg << "</g>\n</svg>\n";
outsvg.close();
-
+
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the HeatMap class Function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
looktemp.push_back(temp);
}
- //clear out lookup to create sorted lookup
- lookup.clear();
+ //clear out lookup to create sorted lookup -- Sarah look at - this is causing segmentation faults
+ for (int j = 0; j < lookup.size(); j++) {
+// delete lookup[j];
+ }
+ lookup.clear(); //doesn't this do the job?
//create and initialize lookup to empty vectors
for (int i = 0; i < looktemp.size(); i++) {
}
}
- //delete looktemp
+ //delete looktemp -- Sarah look at - this is causing segmentation faults
for (int j = 0; j < looktemp.size(); j++) {
- delete looktemp[j];
+// delete looktemp[j];
}
}
else if(scaler== "log2") { label = maxbin * log2(51*i) / log2(255); }
else if(scaler== "linear") { label = maxbin * 51 * i / 255; }
else { label = maxbin * log10(51*i) / log10(255); }
- file://localhost/Users/westcott/Desktop/c.amazon.fn.0.19.rep.fasta
label = int(label * 1000 + 0.5);
label /= 1000.0;
string text = toString(label, 3);