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.
13 #include "command.hpp"
14 #include "unweighted.h"
21 class UnifracUnweightedCommand : public Command {
24 UnifracUnweightedCommand();
25 ~UnifracUnweightedCommand() { delete unweighted; }
29 GlobalData* globaldata;
30 vector<Tree*> T; //user trees
31 vector<float> utreeScores; //user tree unweighted scores
32 vector<float> UWScoreSig; //tree unweighted score signifigance when compared to random trees - percentage of random trees with that score or lower.
33 Tree* randT; //random tree
35 Unweighted* unweighted;
36 string sumFile, distFile, unweightedFile;
38 EstOutput userData; //unweighted score info for user tree
39 EstOutput randomData; //unweighted score info for random trees
40 map<float, float> validScores; //contains scores from both user and random
41 map<float, float> rscoreFreq; //unweighted score, number of random trees with that score.
42 map<float, float> uscoreFreq; //unweighted, number of user trees with that score.
43 map<float, float> totalrscoreFreq; //unweighted score, number of random trees with that score.
44 map<float, float> rCumul; //unweighted score, cumulative percentage of number of random trees with that score or higher.
45 map<float, float> uCumul; //unweighted, cumulative percentage of number of user trees with that score or higher .
46 map<float, float>::iterator it;
47 map<float, float>::iterator it2;
49 ofstream outSum, outDist, out;
51 void printUWSummaryFile();
52 void printUnweightedFile();
53 void saveRandomScores();