]> git.donarmstrong.com Git - mothur.git/blob - doTaxonomy.h
started work on classify.seqs command. changed the database class so that it does...
[mothur.git] / doTaxonomy.h
1 /*
2  *  doTaxonomy.h
3  *  
4  *
5  *  Created by Pat Schloss on 6/17/09.
6  *  Copyright 2009 Patrick D. Schloss. All rights reserved.
7  *
8  */
9
10 #include "mothur.h"
11
12 /**************************************************************************************************/
13
14 struct TaxNode {
15         vector<string> accessions;
16         map<string, int> children;
17         int parent, childNumber, level;
18         string name, heirarchyID;
19         
20         TaxNode(string n) : name(n), level(0), parent(-1) {             }
21         TaxNode(){}
22 };
23
24 /**************************************************************************************************/
25
26 class PhyloTree {
27
28 public:
29         PhyloTree();
30         void addSeqToTree(string, string);
31         void assignHeirarchyIDs(int);
32         void print(ofstream&);
33 private:
34         string getNextTaxon(string&);
35         vector<TaxNode> tree;
36         void print(int, ofstream&);
37         int numNodes;
38         int numSeqs;
39 };
40
41 /**************************************************************************************************/
42