X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.h;h=f855d86497fa0447cb4ef5b17e454bbe0a116628;hb=df92022fc75c08b91cefa2c6ca4fd7b23eb480b0;hp=dd4e2377e93a0708d7722d13c19068e3db578bf8;hpb=c5c7502f435e1413c19e373dab1dfebcaa67588d;p=mothur.git diff --git a/parsimonycommand.h b/parsimonycommand.h index dd4e237..f855d86 100644 --- a/parsimonycommand.h +++ b/parsimonycommand.h @@ -14,54 +14,54 @@ #include "treemap.h" #include "progress.hpp" #include "sharedutilities.h" +#include "fileoutput.h" -using namespace std; class GlobalData; class ParsimonyCommand : public Command { + +public: + ParsimonyCommand(string); + ~ParsimonyCommand() { if (abort == false) { delete pars; delete util; delete output; } } + int execute(); + void help(); + +private: + GlobalData* globaldata; + SharedUtil* util; + FileOutput* output; + vector T; //user trees + Tree* randT; //random tree + Tree* copyUserTree; + TreeMap* tmap; + TreeMap* savetmap; + Parsimony* pars; + vector groupComb; // AB. AC, BC... + string sumFile, randomtree, allGroups, outputDir; + int iters, numGroups, numComp, counter; + vector numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib. + vector< vector > userTreeScores; //scores for users trees for each comb. + vector< vector > UScoreSig; //tree score signifigance when compared to random trees - percentage of random trees with that score or lower. + EstOutput userData; //pscore info for user tree + EstOutput randomData; //pscore info for random trees + map validScores; //map contains scores from both user and 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. - public: - ParsimonyCommand(); - ~ParsimonyCommand() { delete pars; delete util; } - int execute(); + ofstream outSum; - private: - GlobalData* globaldata; - SharedUtil* util; - vector T; //user trees - Tree* randT; //random tree - Tree* copyUserTree; - TreeMap* tmap; - TreeMap* savetmap; - Parsimony* pars; - vector groupComb; // AB. AC, BC... - string parsFile, parsFileout, sumFile, randomtree, allGroups; - int iters, numGroups, numComp, counter; - vector numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib. - vector< vector > userTreeScores; //scores for users trees for each comb. - vector< vector > UScoreSig; //tree score signifigance when compared to random trees - percentage of random trees with that score or lower. - EstOutput userData; //pscore info for user tree - EstOutput randomData; //pscore info for random trees - map validScores; //map contains scores from both user and 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; - - ofstream out, outSum; - ifstream inFile; - - void printParsimonyFile(); - void printUSummaryFile(); - void getUserInput(); - void initFile(string); - void output(vector); - void resetFile(); - + bool abort; + string groups, itersString; + vector Groups; //holds groups to be used + + void printParsimonyFile(); + void printUSummaryFile(); + void getUserInput(); + };