]> git.donarmstrong.com Git - mothur.git/blobdiff - parsimonycommand.h
added bootstrap.shared command and fixed some bugs with heatmap
[mothur.git] / parsimonycommand.h
index 5429e77acf8411bd3836e3cc6fa3b1a23db24a5a..26d392e86acd94654ec3a5ec6351770e4efb995f 100644 (file)
@@ -9,14 +9,12 @@
  *
  */
 
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <map>
-#include <cmath>
 #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<Tree*> 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<string> groupComb; // AB. AC, BC...
+               string sumFile, randomtree, allGroups;
+               int iters, numGroups, numComp, counter;
                vector<int> numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib.
-               vector<float> userTreeScores; //scores for users trees
-               vector<float> UScoreSig;  //tree score signifigance when compared to random trees - percentage of random trees with that score or lower.
+               vector< vector<float> > userTreeScores; //scores for users trees for each comb.
+               vector< vector<float> > 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<int, float> validScores;  //contains scores from both user and random
-               map<int, float> rscoreFreq;  //pscore, number of random trees with that score.
-               map<int, float> uscoreFreq;  //pscore, number of user trees with that score.
-               map<int, float> rCumul;  //pscore, cumulative percentage of number of random trees with that score or lower.
-               map<int, float> uCumul;  //pscore, cumulative percentage of number of user trees with that score or lower .
-               map<int, float>::iterator it;
-               map<int, float>::iterator it2;
+               map<int, double>  validScores;  //map contains scores from both user and random
+               vector< map<int, double> > rscoreFreq;  //map <pscore, number of random trees with that score.> -vector entry for each combination.
+               vector< map<int, double> > uscoreFreq;  //map <pscore, number of user trees with that score.> -vector entry for each combination.
+               vector< map<int, double> > rCumul;  //map <pscore, cumulative percentage of number of random trees with that score or lower.> -vector entry for each combination.
+               vector< map<int, double> > uCumul;  //map <pscore, cumulative percentage of number of user trees with that score or lower .> -vector entry for each combination.
+               map<int, double>::iterator it;
+               map<int, double>::iterator it2;
                
-               ofstream out, outSum, outDist;
+               ofstream out, outSum;
+               ifstream inFile;
                
                void printParsimonyFile();  
                void printUSummaryFile();