X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.h;h=f6f867877620e7e6e69e4e446bdbe8da3815861a;hb=9013e13ecfb2fda3c2664a76f76cc99b8c7fa74c;hp=3bd9a0db8915eb36c2e66174e8750c0fb1fab52a;hpb=c5c7502f435e1413c19e373dab1dfebcaa67588d;p=mothur.git diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index 3bd9a0d..f6f8678 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -14,26 +14,27 @@ #include "unweighted.h" #include "treemap.h" #include "sharedutilities.h" +#include "fileoutput.h" -using namespace std; - class GlobalData; class UnifracUnweightedCommand : public Command { public: - UnifracUnweightedCommand(); - ~UnifracUnweightedCommand() { delete unweighted; delete util; } - int execute(); + UnifracUnweightedCommand(string); + ~UnifracUnweightedCommand() { globaldata->Groups.clear(); if (abort == false) { delete unweighted; delete util; } } + int execute(); + void help(); private: GlobalData* globaldata; SharedUtil* util; + FileOutput* output; vector T; //user trees TreeMap* tmap; Unweighted* unweighted; - string sumFile, unweightedFile, unweightedFileout, allGroups; + string sumFile, allGroups; vector groupComb; // AB. AC, BC... int iters, numGroups, numComp, counter; EstOutput userData; //unweighted score info for user tree @@ -43,21 +44,19 @@ 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; + string groups, itersString, outputDir; + vector Groups, outputNames; //holds groups to be used + ofstream outSum, out; ifstream inFile; - void printUWSummaryFile(); + void printUWSummaryFile(int); void printUnweightedFile(); - void initFile(string); - void output(vector); - void resetFile(); - + void createPhylipFile(int); + }; - - -#endif \ No newline at end of file +#endif