X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.h;h=5cd93a94c0dcf96547ee409d4ca641092309d2bc;hb=edec660ee2be477ac1539109d949a60cb7e16243;hp=4d8f6624dae66605a2169f2d081d49e94b918272;hpb=5318771152ee5b1a280b3dc50aedd887dd1da8a8;p=mothur.git diff --git a/unifracweightedcommand.h b/unifracweightedcommand.h index 4d8f662..5cd93a9 100644 --- a/unifracweightedcommand.h +++ b/unifracweightedcommand.h @@ -13,6 +13,9 @@ #include "command.hpp" #include "weighted.h" #include "treemap.h" +#include "progress.hpp" +#include "sharedutilities.h" +#include "fileoutput.h" using namespace std; @@ -22,11 +25,13 @@ class UnifracWeightedCommand : public Command { public: UnifracWeightedCommand(); - ~UnifracWeightedCommand() { delete weighted; } + ~UnifracWeightedCommand() { delete weighted; delete util; } int execute(); private: GlobalData* globaldata; + SharedUtil* util; + FileOutput* output; vector T; //user trees vector utreeScores; //user tree unweighted scores vector WScoreSig; //tree weighted score signifigance when compared to random trees - percentage of random trees with that score or lower. @@ -34,21 +39,27 @@ class UnifracWeightedCommand : public Command { Tree* randT; //random tree TreeMap* tmap; Weighted* weighted; - string weightedFile, sumFile; - int iters, numGroups, numComp; + string sumFile; + int iters, numGroups, numComp, counter; EstOutput userData; //weighted score info for user tree EstOutput randomData; //weighted score info for random trees - vector< vector > validScores; //vector each group comb has an entry vector< vector > rScores; //vector each group comb has an entry vector< vector > uScores; //vector each group comb has an entry - + vector< map > rScoreFreq; //map -vector entry for each combination. + vector< map > rCumul; //map -vector entry for each c + map validScores; //map contains scores from random + map::iterator it2; + map::iterator it; + ofstream outSum, out; + ifstream inFile; void printWSummaryFile(); - // void printWeightedFile(); - void removeValidScoresDuplicates(); + void printWeightedFile(); + //void removeValidScoresDuplicates(); int findIndex(float, int); - void setGroups(); + void calculateFreqsCumuls(); + };