]> git.donarmstrong.com Git - mothur.git/blob - concensuscommand.h
5550b3b6efdf04f6098c5481e16c393363487bb6
[mothur.git] / concensuscommand.h
1 #ifndef CONCENSUSCOMMAND_H
2 #define CONCENSUSCOMMAND_H
3 /*
4  *  concensuscommand.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 4/29/09.
8  *  Copyright 2009 Schloss Lab UMASS AMherst. All rights reserved.
9  *
10  */
11
12 #include "command.hpp"
13 #include "tree.h"
14 #include "treemap.h"
15 #include "sharedutilities.h"
16         
17 class GlobalData;
18
19 class ConcensusCommand : public Command {
20         
21 public:
22         ConcensusCommand();     
23         ~ConcensusCommand();
24         int execute();  
25         
26 private:
27         GlobalData* globaldata;
28         SharedUtil* util;
29         vector<Tree*> t;
30         Tree* concensusTree;
31         vector< map<string, int> > nodePairs;  //<maps a pair of nodes joined, number of times that pair occurred>      -one entry in vector for each internal node.
32                                                                                 // i.e. if node 7's child pairs are 1,2 ten times and 1,3 20 times then the map would be [12, 10] and [13, 20];
33         map<string, int>::iterator it;
34         map<string, int>::iterator it2;
35         string outputFile, notIncluded;
36         ofstream out, out2;
37         int numNodes, numLeaves;
38         
39         void getNames(string, string&, string&);
40 };
41
42 #endif
43