*
*/
-using namespace std;
-
#include "rabundvector.hpp"
#include "sharedrabundvector.h"
+#include "sharedrabundfloatvector.h"
#include "datavector.hpp"
#include "globaldata.hpp"
+/***********************************************************************/
+struct binCount {
+ int bin;
+ int abund;
+ binCount(int i, int j) : bin(i), abund(j) {}
+};
+/***********************************************************************/
+struct binCountFloat {
+ int bin;
+ float abund;
+ binCountFloat(int i, float j) : bin(i), abund(j) {}
+};
+
+/***********************************************************************/
+//sorts highest abund to lowest
+inline bool comparebinCounts(binCount left, binCount right){
+ return (left.abund > right.abund);
+}
+/***********************************************************************/
+//sorts highest abund to lowest
+inline bool comparebinFloatCounts(binCountFloat left, binCountFloat right){
+ return (left.abund > right.abund);
+}
/***********************************************************************/
class HeatMap {
public:
- HeatMap();
+ HeatMap(string, string, int, int, string);
~HeatMap(){};
- void getPic(RAbundVector*);
- void getPic(vector<SharedRAbundVector*>);
+ string getPic(RAbundVector*);
+ string getPic(vector<SharedRAbundVector*>);
+ string getPic(vector<SharedRAbundFloatVector*>);
private:
- void sortSharedVectors(vector<SharedRAbundVector*>& );
+ int sortSharedVectors(vector<SharedRAbundVector*>& );
+ int sortSharedVectors(vector<SharedRAbundFloatVector*>& );
+ int sortRabund(RAbundVector*&);
void printLegend(int, float);
GlobalData* globaldata;
- string format, sorted, groupComb, scaler;
+ string format, sorted, groupComb, scaler, outputDir;
ofstream outsvg;
+ MothurOut* m;
+ int numOTU, fontSize;
+
+ map<int, int> orderTopGroup(vector<SharedRAbundVector*>&);
+ map<int, int> orderTopOtu(vector<SharedRAbundVector*>&);
+ map<int, int> orderShared(vector<SharedRAbundVector*>&);
+ map<int, int> orderTopGroup(vector<SharedRAbundFloatVector*>&);
+ map<int, int> orderTopOtu(vector<SharedRAbundFloatVector*>&);
+ map<int, int> orderShared(vector<SharedRAbundFloatVector*>&);
+
};