X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.h;h=cd46b62b3462a4db2baa57865743d4bb37c198a7;hb=264c8a3c759d9a999c485236e98dac98d4f0db5f;hp=b572e4679845e63674bcecfb23710876504af90b;hpb=626e77d477ecca8b03c942bdc66f8bb8c413b356;p=mothur.git diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index b572e46..cd46b62 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -13,49 +13,56 @@ #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(); + ~UnifracUnweightedCommand() { globaldata->Groups.clear(); if (abort == false) { delete unweighted; delete util; } } + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } + int execute(); + void help(); private: GlobalData* globaldata; + SharedUtil* util; + FileOutput* output; vector T; //user trees TreeMap* tmap; Unweighted* unweighted; - string sumFile, unweightedFile, unweightedFileout; + string sumFile, allGroups; vector groupComb; // AB. AC, BC... - int iters, numGroups, numComp, counter; + 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 > rCumul; //map -vector entry for each combination. - map::iterator it2; - map::iterator it; + bool abort, phylip, random, includeRoot; + string groups, itersString, outputDir, outputForm; + vector Groups, outputNames; //holds groups to be used + map > outputTypes; + ofstream outSum, out; ifstream inFile; - void printUWSummaryFile(); + void printUWSummaryFile(int); void printUnweightedFile(); - void setGroups(); - void initFile(string); - void output(vector); - void resetFile(); - + void createPhylipFile(int); + }; - - -#endif \ No newline at end of file +#endif