X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.h;h=cd8d51dcad76a44dbc0ca064bd79a5ef3e0fbe80;hb=a44542a3c740cf957cff72ac71742f2fe48b0eaf;hp=e900af4f8b0cc434bf16fae2f15535779032f901;hpb=9653c9f8c1b63ecb1a63b45e781c303713d5b5df;p=mothur.git diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index e900af4..cd8d51d 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -15,21 +15,28 @@ #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"; } + string getDescription() { return "generic tests that describes whether two or more communities have the same structure"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + private: - GlobalData* globaldata; + ReadTree* read; SharedUtil* util; FileOutput* output; vector T; //user trees @@ -37,7 +44,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 +52,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(int); void printUnweightedFile(); + void createPhylipFile(int); + int readNamesFile(); }; - - -#endif \ No newline at end of file +#endif