X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.h;h=26d392e86acd94654ec3a5ec6351770e4efb995f;hb=51cf89e90eef8b300c2786eb1560dd89e6e83445;hp=5429e77acf8411bd3836e3cc6fa3b1a23db24a5a;hpb=d037597badc8d18e235c59f0c1114180edb7f98f;p=mothur.git diff --git a/parsimonycommand.h b/parsimonycommand.h index 5429e77..26d392e 100644 --- a/parsimonycommand.h +++ b/parsimonycommand.h @@ -9,14 +9,12 @@ * */ -#include -#include -#include -#include -#include #include "command.hpp" #include "parsimony.h" #include "treemap.h" +#include "progress.hpp" +#include "sharedutilities.h" +#include "fileoutput.h" using namespace std; @@ -26,31 +24,37 @@ class ParsimonyCommand : public Command { public: ParsimonyCommand(); - ~ParsimonyCommand() { delete pars; } + ~ParsimonyCommand() { delete pars; delete util; delete output; } int execute(); private: GlobalData* globaldata; + SharedUtil* util; + FileOutput* output; vector T; //user trees Tree* randT; //random tree - TreeMap* tmap; + Tree* copyUserTree; + TreeMap* tmap; + TreeMap* savetmap; Parsimony* pars; - string parsFile, sumFile, distFile; - int iters, randomtree, numGroups; + vector groupComb; // AB. AC, BC... + string 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 userTreeScores; //scores for users trees - vector UScoreSig; //tree score signifigance when compared to random trees - percentage of random trees with that score or lower. + 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; //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; + 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, outDist; + ofstream out, outSum; + ifstream inFile; void printParsimonyFile(); void printUSummaryFile();