]> git.donarmstrong.com Git - mothur.git/blobdiff - heatmap.h
changes while testing
[mothur.git] / heatmap.h
index 54035f0cb4aba4e595183d3f8b6ae9e0ce256bc9..2b491767d57e48c4a05728aa6a48cbfc6939b38f 100644 (file)
--- a/heatmap.h
+++ b/heatmap.h
@@ -9,45 +9,72 @@
  *
  */
 
-using namespace std;
-
-#include "ordervector.hpp"
 #include "rabundvector.hpp"
 #include "sharedrabundvector.h"
-#include "sharedordervector.h"
+#include "sharedrabundfloatvector.h"
 #include "datavector.hpp"
-#include "globaldata.hpp"
-#include "sharedutilities.h"
+
+
+/***********************************************************************/
+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(){ delete util; };
+               HeatMap(string, string, int, int, string, string);
+               ~HeatMap(){};
        
-               void getPic(OrderVector*);
-               void getPic(SharedOrderVector*);
+               string getPic(RAbundVector*);
+               string getPic(vector<SharedRAbundVector*>);
+               string getPic(vector<SharedRAbundFloatVector*>);
 
        private:
-               void sortSharedVectors();
+               int sortSharedVectors(vector<SharedRAbundVector*>& );
+               int sortSharedVectors(vector<SharedRAbundFloatVector*>& );
+               int sortRabund(RAbundVector*&);
                void printLegend(int, float);
-               
-               GlobalData* globaldata;
-               SharedUtil* util;
-               vector<SharedRAbundVector*> lookup;
-               RAbundVector rabund;
-               string format, sorted, groupComb, scaler;
+
+               string format, sorted, groupComb, scaler, outputDir, inputfile;
                ofstream outsvg;
-               map<float, string> colorScale;
-               map<float, string>::iterator it;
+               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*>&);
 
                        
 };
+
 /***********************************************************************/
 
 #endif
 
 
 
+