X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=heatmap.h;h=11c67eaf439ebe3adec4f40615e1380ca870e0b5;hb=6e81846c8e5b2614f6b06643a9f558fb0e6669fa;hp=7c5b561c84ade9012c49171b4b9f0b0d765b9724;hpb=74c78f9abd9e733f0c2f812efec97a76632fcbf8;p=mothur.git diff --git a/heatmap.h b/heatmap.h index 7c5b561..11c67ea 100644 --- a/heatmap.h +++ b/heatmap.h @@ -14,24 +14,41 @@ #include "datavector.hpp" #include "globaldata.hpp" +/***********************************************************************/ +struct binCount { + int bin; + int abund; + binCount(int i, int j) : bin(i), abund(j) {} +}; +/***********************************************************************/ +//sorts highest abund to lowest +inline bool comparebinCounts(binCount left, binCount right){ + return (left.abund > right.abund); +} /***********************************************************************/ class HeatMap { public: - HeatMap(); + HeatMap(string, string, int, int, string); ~HeatMap(){}; - void getPic(RAbundVector*); - void getPic(vector); + string getPic(RAbundVector*); + string getPic(vector); private: - void sortSharedVectors(vector& ); + int sortSharedVectors(vector& ); 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 orderTopGroup(vector&); + map orderTopOtu(vector&); + map orderShared(vector&); };