]> git.donarmstrong.com Git - mothur.git/blob - unifracunweightedcommand.h
broke up globaldata and moved error checking and help into commands
[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 class GlobalData;
21
22 class UnifracUnweightedCommand : public Command {
23         
24         public:
25                 UnifracUnweightedCommand(string);       
26                 ~UnifracUnweightedCommand() { delete unweighted; delete util; }
27                 int execute();
28                 void help();    
29         
30         private:
31                 GlobalData* globaldata;
32                 SharedUtil* util;
33                 FileOutput* output;
34                 vector<Tree*> T;           //user trees
35                 TreeMap* tmap;
36                 Unweighted* unweighted;
37                 string sumFile, allGroups;
38                 vector<string> groupComb; // AB. AC, BC...
39                 int iters, numGroups, numComp, counter;
40                 EstOutput userData;                     //unweighted score info for user tree
41                 EstOutput randomData;           //unweighted score info for random trees
42                 vector< vector<float> > utreeScores; //scores for users trees for each comb.
43                 vector< vector<float> > UWScoreSig;  //tree score signifigance when compared to random trees - percentage of random trees with that score or higher.
44                 map<float, float>  validScores;  //map contains scores from random
45                 vector< map<float, float> > rscoreFreq;  //map <unweighted score, number of random trees with that score.> -vector entry for each combination.
46                 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.
47                 map<float, float>::iterator it2;
48                 map<float, float>::iterator it;
49                 
50                 OptionParser* parser;
51                 map<string, string> parameters;
52                 map<string, string>::iterator it4;
53                 bool abort;
54                 string groups, itersString;
55                 vector<string> Groups; //holds groups to be used
56
57                 ofstream outSum, out;
58                 ifstream inFile;
59                 
60                 void printUWSummaryFile(int);
61                 void printUnweightedFile();
62                  
63                 
64 };
65
66
67
68 #endif