]> git.donarmstrong.com Git - mothur.git/blob - unifracweightedcommand.h
weightedcommand
[mothur.git] / unifracweightedcommand.h
1 #ifndef UNIFRACWEIGHTEDCOMMAND_H
2 #define UNIFRACWEIGHTEDCOMMAND_H
3
4 /*
5  *  unifracweightedcommand.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 "weighted.h"
15 #include "treemap.h"
16
17 using namespace std;
18
19 class GlobalData;
20
21 class UnifracWeightedCommand : public Command {
22         
23         public:
24                 UnifracWeightedCommand();       
25                 ~UnifracWeightedCommand() { delete weighted; }
26                 int execute();  
27         
28         private:
29                 GlobalData* globaldata;
30                 vector<Tree*> T;           //user trees
31                 vector<float> utreeScores;  //user tree unweighted scores
32                 vector<float> WScoreSig;  //tree weighted score signifigance when compared to random trees - percentage of random trees with that score or lower.
33                 vector<string> groupComb; // AB. AC, BC...
34                 Tree* randT;  //random tree
35                 TreeMap* tmap;
36                 Weighted* weighted;
37                 string weightedFile, sumFile;
38                 int iters, numGroups, numComp;
39                 EstOutput userData;                     //weighted score info for user tree
40                 EstOutput randomData;           //weighted score info for random trees
41                 vector< vector<float> > validScores;  //vector<contains scores from both user and random> each group comb has an entry
42                 vector< vector<float> > rScores;  //vector<weighted scores for random trees.> each group comb has an entry
43                 vector< vector<float> > uScores;  //vector<weighted scores for user trees.> each group comb has an entry
44                                                                 
45                 ofstream outSum, out;
46                 
47                 void printWSummaryFile();
48         //      void printWeightedFile();  
49                 void removeValidScoresDuplicates();
50                 int findIndex(float);
51                 void setGroups(); 
52 };
53
54
55
56 #endif