]> git.donarmstrong.com Git - mothur.git/blob - heatmap.h
modified calculators to use doubles, added numotu and fontsize parameters to heatmap...
[mothur.git] / heatmap.h
1 #ifndef HEATMAP_H
2 #define HEATMAP_H
3 /*
4  *  heatmap.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 3/25/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "rabundvector.hpp"
13 #include "sharedrabundvector.h"
14 #include "datavector.hpp"
15 #include "globaldata.hpp"
16
17 /***********************************************************************/
18 struct binCount {
19                 int bin;
20                 int abund;
21                 binCount(int i, int j) : bin(i), abund(j) {}
22 };
23 /***********************************************************************/
24 //sorts highest abund to lowest
25 inline bool comparebinCounts(binCount left, binCount right){
26         return (left.abund > right.abund);      
27 }
28 /***********************************************************************/
29
30 class HeatMap {
31         
32         public:
33                 HeatMap(string, string, int, int, string);
34                 ~HeatMap(){};
35         
36                 string getPic(RAbundVector*);
37                 string getPic(vector<SharedRAbundVector*>);
38
39         private:
40                 int sortSharedVectors(vector<SharedRAbundVector*>& );
41                 void printLegend(int, float);
42
43                 GlobalData* globaldata;
44                 string format, sorted, groupComb, scaler, outputDir;
45                 ofstream outsvg;
46                 MothurOut* m;
47                 int numOTU, fontSize;
48                 
49                 map<int, int> orderTopGroup(vector<SharedRAbundVector*>&);
50                 map<int, int> orderTopOtu(vector<SharedRAbundVector*>&);
51                 map<int, int> orderShared(vector<SharedRAbundVector*>&);
52                         
53 };
54
55 /***********************************************************************/
56
57 #endif
58
59
60
61