X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.h;h=b1db317de0add4b28352315e20dc282110fad789;hb=8dd3c225255d7084e3aff8740aa4f1f1cabb367a;hp=2eee7c44e674073420c217f1b4d49aa4dc769497;hpb=fca3f55d5ded10c3dc77856f3cc4a1c53b02bb6f;p=mothur.git diff --git a/unifracweightedcommand.h b/unifracweightedcommand.h index 2eee7c4..b1db317 100644 --- a/unifracweightedcommand.h +++ b/unifracweightedcommand.h @@ -16,22 +16,24 @@ #include "progress.hpp" #include "sharedutilities.h" #include "fileoutput.h" - - -class GlobalData; +#include "readtree.h" class UnifracWeightedCommand : public Command { public: UnifracWeightedCommand(string); UnifracWeightedCommand(); - ~UnifracWeightedCommand() { if (abort == false) { delete weighted; delete util; } } - vector getRequiredParameters(); - vector getValidParameters(); - vector getRequiredFiles(); - map > getOutputFiles() { return outputTypes; } - int execute(); - void help(); + ~UnifracWeightedCommand() {} + + vector setParameters(); + string getCommandName() { return "unifrac.weighted"; } + string getCommandCategory() { return "Hypothesis Testing"; } + string getHelpString(); + string getCitation() { return "Lozupone CA, Hamady M, Kelley ST, Knight R (2007). Quantitative and qualitative beta diversity measures lead to different insights into factors that structure microbial communities. Appl Environ Microbiol 73: 1576-85. \nhttp://www.mothur.org/wiki/Unifrac.weighted"; } + string getDescription() { return "generic tests that describes whether two or more communities have the same structure"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: struct linePair { @@ -41,7 +43,7 @@ class UnifracWeightedCommand : public Command { }; vector lines; - GlobalData* globaldata; + ReadTree* read; SharedUtil* util; FileOutput* output; vector T; //user trees @@ -61,13 +63,11 @@ class UnifracWeightedCommand : public Command { map validScores; //map contains scores from random bool abort, phylip, random, includeRoot; - string groups, itersString, outputForm; + string groups, itersString, outputForm, treefile, groupfile, namefile; vector Groups, outputNames; //holds groups to be used - map > outputTypes; - int processors; - - + int processors, numUniquesInName; ofstream outSum; + map nameMap; void printWSummaryFile(); void printWeightedFile(); @@ -77,6 +77,7 @@ class UnifracWeightedCommand : public Command { void calculateFreqsCumuls(); int createProcesses(Tree*, vector< vector >, vector< vector >&); int driver(Tree*, vector< vector >, int, int, vector< vector >&); + int readNamesFile(); };