]> git.donarmstrong.com Git - mothur.git/blob - treereader.h
Merge remote-tracking branch 'mothur/master'
[mothur.git] / treereader.h
1 #ifndef Mothur_treereader_h
2 #define Mothur_treereader_h
3
4 //
5 //  treereader.h
6 //  Mothur
7 //
8 //  Created by Sarah Westcott on 4/11/12.
9 //  Copyright (c) 2012 Schloss Lab. All rights reserved.
10 //
11
12 #include "mothurout.h"
13 #include "tree.h"
14
15 class TreeReader {
16     
17 public:
18     
19     TreeReader(string tf);
20         TreeReader(string tf, string gf);
21     TreeReader(string tf, string gf, string nf);
22         ~TreeReader() {}        
23     
24     vector<Tree*> getTrees()            { return trees;     }
25     map<string, string> getNames()      { return nameMap;   } //dups -> unique
26     map<string, string> getNameMap()    { return names;     } //unique -> dups list
27     
28     
29 private:
30     MothurOut* m;
31         vector<Tree*> trees;
32     TreeMap* tmap;
33     map<string, string> nameMap; //dupName -> uniqueName
34     map<string, string> names;
35     
36     string treefile, groupfile, namefile;
37     
38     bool readTrees();
39     int readNamesFile();
40 };
41
42
43
44 #endif