1 #ifndef UNIFRACWEIGHTEDCOMMAND_H
2 #define UNIFRACWEIGHTEDCOMMAND_H
5 * unifracweightedcommand.h
8 * Created by Sarah Westcott on 2/9/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
13 #include "command.hpp"
21 class UnifracWeightedCommand : public Command {
24 UnifracWeightedCommand();
25 ~UnifracWeightedCommand() { delete weighted; }
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
37 string weightedFile, sumFile, distFile;
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< map<float, float> > validScores; //vector<contains scores from both user and random> each group comb has an entry
42 vector< map<float, float> > rscoreFreq; //vector<weighted score, number of random trees with that score.> each group comb has an entry
43 vector< map<float, float> > uscoreFreq; //vector<weighted, number of user trees with that score.> each group comb has an entry
44 vector< map<float, float> > totalrscoreFreq; //vector<weighted score, number of random trees with that score.> each group comb has an entry
45 vector< map<float, float> > rCumul; //vector<weighted score, number of random trees with that score or higher.> each group comb has an entry
46 vector< map<float, float> > uCumul; //vector<weighted, cumulative percentage of number of user trees with that score or higher.> each group comb has an entry
47 map<float, float>::iterator it;
48 map<float, float>::iterator it2;
50 ofstream outSum, outDist, out;
52 void printWSummaryFile();
53 void printWeightedFile();
54 void saveRandomScores();