]> git.donarmstrong.com Git - mothur.git/blob - parsimonycommand.h
adding treeclimber and unifrac pieces
[mothur.git] / parsimonycommand.h
1 #ifndef PARSIMONYCOMMAND_H
2 #define PARSIMONYCOMMAND_H
3 /*
4  *  parsimonycommand.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 1/26/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include <iostream>
13 #include <fstream>
14 #include <vector>
15 #include <map>
16 #include <cmath>
17 #include "command.hpp"
18 #include "parsimony.h"
19 #include "treemap.h"
20
21 using namespace std;
22
23 class GlobalData;
24
25 class ParsimonyCommand : public Command {
26         
27         public:
28                 ParsimonyCommand();     
29                 ~ParsimonyCommand() { delete pars; }
30                 int execute();  
31         
32         private:
33                 GlobalData* globaldata;
34                 vector<Tree*> T;           //user trees
35                 Tree* randT;  //random tree
36                 TreeMap* tmap;
37                 Parsimony* pars;
38                 string parsFile, sumFile, distFile;
39                 int iters, randomtree, numGroups;
40                 vector<int> numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib.
41                 vector<float> userTreeScores; //scores for users trees
42                 vector<float> UScoreSig;  //tree score signifigance when compared to random trees - percentage of random trees with that score or lower.
43                 EstOutput userData;                     //pscore info for user tree
44                 EstOutput randomData;           //pscore info for random trees
45                 map<int, float> validScores;  //contains scores from both user and random
46                 map<int, float> rscoreFreq;  //pscore, number of random trees with that score.
47                 map<int, float> uscoreFreq;  //pscore, number of user trees with that score.
48                 map<int, float> rCumul;  //pscore, cumulative percentage of number of random trees with that score or lower.
49                 map<int, float> uCumul;  //pscore, cumulative percentage of number of user trees with that score or lower .
50                 map<int, float>::iterator it;
51                 map<int, float>::iterator it2;
52                 
53                 ofstream out, outSum, outDist;
54                 
55                 void printParsimonyFile();  
56                 void printUSummaryFile();
57                 void getUserInput();
58                 
59 };
60
61
62 #endif