X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.h;h=415279c9b2adad30f95a11eeef309d9d3fd3b802;hb=8f7f4fc08b8c70d9ef0f79607813dba4e926e102;hp=d9991e81ce3ddee08a4afc8fae19d78ce89f794e;hpb=51cf89e90eef8b300c2786eb1560dd89e6e83445;p=mothur.git diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index d9991e8..415279c 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -15,21 +15,27 @@ #include "treemap.h" #include "sharedutilities.h" #include "fileoutput.h" - - -using namespace std; - -class GlobalData; +#include "readtree.h" class UnifracUnweightedCommand : public Command { public: - UnifracUnweightedCommand(); - ~UnifracUnweightedCommand() { delete unweighted; delete util; } - int execute(); + UnifracUnweightedCommand(string); + UnifracUnweightedCommand(); + ~UnifracUnweightedCommand() {} + + vector setParameters(); + string getCommandName() { return "unifrac.unweighted"; } + string getCommandCategory() { return "Hypothesis Testing"; } + string getHelpString(); + string getCitation() { return "Lozupone C, Knight R (2005). UniFrac: a new phylogenetic method for comparing microbial communities. Appl Environ Microbiol 71: 8228-35. \nhttp://www.mothur.org/wiki/Unifrac.unweighted"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + private: - GlobalData* globaldata; + ReadTree* read; SharedUtil* util; FileOutput* output; vector T; //user trees @@ -37,7 +43,7 @@ class UnifracUnweightedCommand : public Command { Unweighted* unweighted; string sumFile, allGroups; vector groupComb; // AB. AC, BC... - int iters, numGroups, numComp, counter; + int iters, numGroups, numComp, counter, processors, numUniquesInName; 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. @@ -45,18 +51,21 @@ class UnifracUnweightedCommand : public Command { 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, treefile, groupfile, namefile; + vector Groups, outputNames; //holds groups to be used + ofstream outSum, out; ifstream inFile; + map nameMap; - void printUWSummaryFile(); + void printUWSummaryFile(int); void printUnweightedFile(); + void createPhylipFile(int); + int readNamesFile(); }; - - -#endif \ No newline at end of file +#endif