X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.h;h=6fa1914f31e320517ff89389a34fc3e5a1cd6dc6;hb=291eaab661778e1fd02c5c22bc388daa97bb1d54;hp=bd52fa6a74b66a0700316ebb069519582d0b8733;hpb=bfbc55964f1977da72c2cea984288a427d370a59;p=mothur.git diff --git a/parsimonycommand.h b/parsimonycommand.h index bd52fa6..6fa1914 100644 --- a/parsimonycommand.h +++ b/parsimonycommand.h @@ -12,46 +12,56 @@ #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() { 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. + + ofstream outSum; - public: - ParsimonyCommand(); - ~ParsimonyCommand() { delete pars; } - int execute(); + + bool abort; + string groups, itersString; + vector Groups, outputNames; //holds groups to be used + + void printParsimonyFile(); + int printUSummaryFile(); + void getUserInput(); - private: - GlobalData* globaldata; - vector T; //user trees - Tree* randT; //random tree - TreeMap* tmap; - TreeMap* savetmap; - Parsimony* pars; - string parsFile, sumFile, distFile, 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, outDist; - - void printParsimonyFile(); - void printUSummaryFile(); - void getUserInput(); - };