X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.h;h=3e6d8354af5eda2c21f85c632a09b886962afb37;hb=bd93b1a6f9fe9a6a4a7ac2e9f106e5c83a438856;hp=e026bc222a3005332e2e509da060d9de6fc11539;hpb=fc7cf3aac8fd6106fd725b43baa8ab5ca6f836f8;p=mothur.git diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index e026bc2..3e6d835 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -13,47 +13,50 @@ #include "command.hpp" #include "unweighted.h" #include "treemap.h" +#include "sharedutilities.h" +#include "fileoutput.h" -using namespace std; class GlobalData; class UnifracUnweightedCommand : public Command { public: - UnifracUnweightedCommand(); - ~UnifracUnweightedCommand() { delete unweighted; } - int execute(); + UnifracUnweightedCommand(string); + ~UnifracUnweightedCommand() { globaldata->Groups.clear(); if (abort == false) { delete unweighted; delete util; } } + int execute(); + void help(); private: GlobalData* globaldata; + SharedUtil* util; + FileOutput* output; vector T; //user trees - Tree* randT; //random tree TreeMap* tmap; Unweighted* unweighted; - string sumFile, unweightedFile; + string sumFile, allGroups; vector groupComb; // AB. AC, BC... - int iters, numGroups, numComp; + int iters, numGroups, numComp, counter, processors; EstOutput userData; //unweighted score info for user tree EstOutput randomData; //unweighted score info for random trees vector< vector > utreeScores; //scores for users trees for each comb. vector< vector > UWScoreSig; //tree score signifigance when compared to random trees - percentage of random trees with that score or higher. - vector< map > validScores; //map contains scores from both user and random + map validScores; //map contains scores from random vector< map > rscoreFreq; //map -vector entry for each combination. - vector< map > uscoreFreq; //map -vector entry for each combination. vector< map > rCumul; //map -vector entry for each combination. - vector< map > uCumul; //map -vector entry for each combination. map::iterator it; - map::iterator it2; - map::iterator it; + bool abort, phylip, random; + string groups, itersString, outputDir; + vector Groups, outputNames; //holds groups to be used + ofstream outSum, out; + ifstream inFile; - void printUWSummaryFile(); + void printUWSummaryFile(int); void printUnweightedFile(); - void setGroups(); + void createPhylipFile(int); + }; - - -#endif \ No newline at end of file +#endif