X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.h;h=9e756b884fb087f95ca0d43c23027c8caaa33b3f;hb=2e77272b6f5987bd2bde592bb15262a8c69ea9e0;hp=ba30d4016886123c1d8b33967899d699619b30b4;hpb=3c5c4e255ee8c36feb9e97aebc4e792e6ff8c440;p=mothur.git diff --git a/parsimonycommand.h b/parsimonycommand.h index ba30d40..9e756b8 100644 --- a/parsimonycommand.h +++ b/parsimonycommand.h @@ -12,48 +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, processors; + 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; - string parsFile, sumFile, randomtree; - int iters, numGroups; - vector numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib. - vector userTreeScores; //scores for users trees - 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; //contains scores from both user and random - map rscoreFreq; //pscore, number of random trees with that score. - map uscoreFreq; //pscore, number of user trees with that score. - map rCumul; //pscore, cumulative percentage of number of random trees with that score or lower. - map uCumul; //pscore, cumulative percentage of number of user trees with that score or lower . - map::iterator it; - map::iterator it2; - - ofstream out, outSum; - - void printParsimonyFile(); - void printUSummaryFile(); - void getUserInput(); - void setGroups(); - };