]> git.donarmstrong.com Git - mothur.git/blobdiff - heatmap.h
modified calculators to use doubles, added numotu and fontsize parameters to heatmap...
[mothur.git] / heatmap.h
index ffbe94675df2dc8b968134ad79ffc7307bb1d458..11c67eaf439ebe3adec4f40615e1380ca870e0b5 100644 (file)
--- a/heatmap.h
+++ b/heatmap.h
 #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(string, string, string);
+               HeatMap(string, string, int, int, string);
                ~HeatMap(){};
        
                string getPic(RAbundVector*);
                string getPic(vector<SharedRAbundVector*>);
 
        private:
-               void sortSharedVectors(vector<SharedRAbundVector*>& );
+               int sortSharedVectors(vector<SharedRAbundVector*>& );
                void printLegend(int, float);
 
                GlobalData* globaldata;
                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*>&);
                        
 };