]> git.donarmstrong.com Git - mothur.git/blob - unifracunweightedcommand.h
added bootstrap.shared command and fixed some bugs with heatmap
[mothur.git] / unifracunweightedcommand.h
1 #ifndef UNIFRACUNWEIGHTEDCOMMAND_H
2 #define UNIFRACUNWEIGHTEDCOMMAND_H
3
4 /*
5  *  unifracunweightedcommand.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 2/9/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "unweighted.h"
15 #include "treemap.h"
16 #include "sharedutilities.h"
17 #include "fileoutput.h"
18
19
20 using namespace std;
21
22 class GlobalData;
23
24 class UnifracUnweightedCommand : public Command {
25         
26         public:
27                 UnifracUnweightedCommand();     
28                 ~UnifracUnweightedCommand() { delete unweighted; delete util; }
29                 int execute();  
30         
31         private:
32                 GlobalData* globaldata;
33                 SharedUtil* util;
34                 FileOutput* output;
35                 vector<Tree*> T;           //user trees
36                 TreeMap* tmap;
37                 Unweighted* unweighted;
38                 string sumFile, allGroups;
39                 vector<string> groupComb; // AB. AC, BC...
40                 int iters, numGroups, numComp, counter;
41                 EstOutput userData;                     //unweighted score info for user tree
42                 EstOutput randomData;           //unweighted score info for random trees
43                 vector< vector<float> > utreeScores; //scores for users trees for each comb.
44                 vector< vector<float> > UWScoreSig;  //tree score signifigance when compared to random trees - percentage of random trees with that score or higher.
45                 map<float, float>  validScores;  //map contains scores from random
46                 vector< map<float, float> > rscoreFreq;  //map <unweighted score, number of random trees with that score.> -vector entry for each combination.
47                 vector< map<float, float> > rCumul;  //map <unweighted score, cumulative percentage of number of random trees with that score or higher.> -vector entry for each combination.
48                 map<float, float>::iterator it2;
49                 map<float, float>::iterator it;
50                 
51                 ofstream outSum, out;
52                 ifstream inFile;
53                 
54                 void printUWSummaryFile();
55                 void printUnweightedFile();
56                  
57                 
58 };
59
60
61
62 #endif