X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=heatmap.h;h=2b491767d57e48c4a05728aa6a48cbfc6939b38f;hb=1a968f34ae2d2680eaf189a197d1a21b8dfd6c03;hp=11c67eaf439ebe3adec4f40615e1380ca870e0b5;hpb=e4c80376cc4533f66c8dfc18f3e1a86a60ac17fe;p=mothur.git diff --git a/heatmap.h b/heatmap.h index 11c67ea..2b49176 100644 --- a/heatmap.h +++ b/heatmap.h @@ -11,8 +11,9 @@ #include "rabundvector.hpp" #include "sharedrabundvector.h" +#include "sharedrabundfloatvector.h" #include "datavector.hpp" -#include "globaldata.hpp" + /***********************************************************************/ struct binCount { @@ -20,28 +21,42 @@ struct binCount { 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(string, string, int, int, string); + HeatMap(string, string, int, int, string, string); ~HeatMap(){}; string getPic(RAbundVector*); string getPic(vector); + string getPic(vector); private: int sortSharedVectors(vector& ); + int sortSharedVectors(vector& ); + int sortRabund(RAbundVector*&); void printLegend(int, float); - GlobalData* globaldata; - string format, sorted, groupComb, scaler, outputDir; + string format, sorted, groupComb, scaler, outputDir, inputfile; ofstream outsvg; MothurOut* m; int numOTU, fontSize; @@ -49,6 +64,10 @@ class HeatMap { map orderTopGroup(vector&); map orderTopOtu(vector&); map orderShared(vector&); + map orderTopGroup(vector&); + map orderTopOtu(vector&); + map orderShared(vector&); + };