X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.h;h=04acd302891f36df23399ac9d9b1694535c7005e;hb=1d5962b46d9e72a2b855b4176d1c47df9a163fac;hp=db062c6d84a67b72dd1b0b7163f0eae9ca8f0aa5;hpb=5318771152ee5b1a280b3dc50aedd887dd1da8a8;p=mothur.git diff --git a/parsimonycommand.h b/parsimonycommand.h index db062c6..04acd30 100644 --- a/parsimonycommand.h +++ b/parsimonycommand.h @@ -12,49 +12,62 @@ #include "command.hpp" #include "parsimony.h" #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(); + ~ParsimonyCommand() { if (abort == false) { delete pars; delete util; delete output; } } + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } + 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. + + ofstream outSum; - public: - ParsimonyCommand(); - ~ParsimonyCommand() { delete pars; } - int execute(); + + bool abort; + string groups, itersString; + vector Groups, outputNames; //holds groups to be used + map > outputTypes; + + void printParsimonyFile(); + int printUSummaryFile(); + void getUserInput(); - private: - GlobalData* globaldata; - vector T; //user trees - Tree* randT; //random tree - Tree* copyUserTree; - TreeMap* tmap; - TreeMap* savetmap; - Parsimony* pars; - vector groupComb; // AB. AC, BC... - string parsFile, sumFile, randomtree; - int iters, numGroups, numComp; - 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 - vector< 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; - - void printParsimonyFile(); - void printUSummaryFile(); - void getUserInput(); - void setGroups(); - };