X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.h;h=415279c9b2adad30f95a11eeef309d9d3fd3b802;hb=8f7f4fc08b8c70d9ef0f79607813dba4e926e102;hp=e026bc222a3005332e2e509da060d9de6fc11539;hpb=fc7cf3aac8fd6106fd725b43baa8ab5ca6f836f8;p=mothur.git diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index e026bc2..415279c 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -13,47 +13,59 @@ #include "command.hpp" #include "unweighted.h" #include "treemap.h" - -using namespace std; - -class GlobalData; +#include "sharedutilities.h" +#include "fileoutput.h" +#include "readtree.h" class UnifracUnweightedCommand : public Command { public: - UnifracUnweightedCommand(); - ~UnifracUnweightedCommand() { delete unweighted; } - 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 - Tree* randT; //random tree TreeMap* tmap; Unweighted* unweighted; - string sumFile, unweightedFile; + string sumFile, allGroups; vector groupComb; // AB. AC, BC... - int iters, numGroups, numComp; + 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. 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 > uscoreFreq; //map -vector entry for each combination. vector< map > rCumul; //map -vector entry for each combination. - vector< map > uCumul; //map -vector entry for each combination. map::iterator it; - 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 setGroups(); + void createPhylipFile(int); + int readNamesFile(); + }; - - -#endif \ No newline at end of file +#endif