1 #ifndef UNIFRACUNWEIGHTEDCOMMAND_H
2 #define UNIFRACUNWEIGHTEDCOMMAND_H
5 * unifracunweightedcommand.h
8 * Created by Sarah Westcott on 2/9/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
18 #include "command.hpp"
19 #include "unweighted.h"
26 class UnifracUnweightedCommand : public Command {
29 UnifracUnweightedCommand();
30 ~UnifracUnweightedCommand() { delete unweighted; }
34 GlobalData* globaldata;
35 vector<Tree*> T; //user trees
36 vector<float> utreeScores; //user tree unweighted scores
37 vector<float> UWScoreSig; //tree unweighted score signifigance when compared to random trees - percentage of random trees with that score or lower.
38 Tree* randT; //random tree
40 Unweighted* unweighted;
41 string sumFile, distFile, unweightedFile;
43 EstOutput userData; //unweighted score info for user tree
44 EstOutput randomData; //unweighted score info for random trees
45 map<float, float> validScores; //contains scores from both user and random
46 map<float, float> rscoreFreq; //unweighted score, number of random trees with that score.
47 map<float, float> uscoreFreq; //unweighted, number of user trees with that score.
48 map<float, float> totalrscoreFreq; //unweighted score, number of random trees with that score.
49 map<float, float> rCumul; //unweighted score, cumulative percentage of number of random trees with that score or lower.
50 map<float, float> uCumul; //unweighted, cumulative percentage of number of user trees with that score or lower .
51 map<float, float>::iterator it;
52 map<float, float>::iterator it2;
54 ofstream outSum, outDist, out;
56 void printUWSummaryFile();
57 void printUnweightedFile();
58 void saveRandomScores();