X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.h;h=b1db317de0add4b28352315e20dc282110fad789;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=7317c8a43092a5712a06dda00589d1eb4528c649;hpb=a98eb683e17d8e49583bf2d215ab7562a4cdca75;p=mothur.git diff --git a/unifracweightedcommand.h b/unifracweightedcommand.h index 7317c8a..b1db317 100644 --- a/unifracweightedcommand.h +++ b/unifracweightedcommand.h @@ -16,17 +16,24 @@ #include "progress.hpp" #include "sharedutilities.h" #include "fileoutput.h" - - -class GlobalData; +#include "readtree.h" class UnifracWeightedCommand : public Command { public: UnifracWeightedCommand(string); - ~UnifracWeightedCommand() { if (abort == false) { delete weighted; delete util; } } - int execute(); - void help(); + UnifracWeightedCommand(); + ~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 { @@ -36,7 +43,7 @@ class UnifracWeightedCommand : public Command { }; vector lines; - GlobalData* globaldata; + ReadTree* read; SharedUtil* util; FileOutput* output; vector T; //user trees @@ -55,13 +62,12 @@ class UnifracWeightedCommand : public Command { vector< map > rCumul; //map -vector entry for each c map validScores; //map contains scores from random - bool abort, phylip, random; - string groups, itersString; + bool abort, phylip, random, includeRoot; + string groups, itersString, outputForm, treefile, groupfile, namefile; vector Groups, outputNames; //holds groups to be used - int processors; - - + int processors, numUniquesInName; ofstream outSum; + map nameMap; void printWSummaryFile(); void printWeightedFile(); @@ -69,8 +75,9 @@ class UnifracWeightedCommand : public Command { //void removeValidScoresDuplicates(); int findIndex(float, int); void calculateFreqsCumuls(); - int createProcesses(Tree*, vector< vector >, vector&, vector< vector >&); - int driver(Tree*, vector< vector >, int, int, vector&, vector< vector >&); + int createProcesses(Tree*, vector< vector >, vector< vector >&); + int driver(Tree*, vector< vector >, int, int, vector< vector >&); + int readNamesFile(); };