8 * Created by Pat Schloss on 6/17/09.
9 * Copyright 2009 Patrick D. Schloss. All rights reserved.
15 /**************************************************************************************************/
18 vector<string> accessions; //names of seqs in this branch of tree
19 map<string, int> children; //childs name to index in tree
20 int parent, childNumber, level;
21 string name, heirarchyID;
23 TaxNode(string n) : name(n), level(0), parent(-1) { }
27 /**************************************************************************************************/
33 PhyloTree(string); //pass it a taxonomy file and it makes the tree
35 void addSeqToTree(string, string);
36 void assignHeirarchyIDs(int);
37 void print(ofstream&);
38 vector<int> getGenusNodes();
39 void binUnclassified();
41 TaxNode get(int i) { return tree[i]; }
42 TaxNode get(string seqName) { return tree[name2Taxonomy[seqName]]; }
43 int getIndex(string seqName) { return name2Taxonomy[seqName]; }
44 string getName(int i) { return tree[i].name; }
45 string getFullTaxonomy(string); //pass a sequence name return taxonomy
46 int getMaxLevel() { return maxLevel; }
49 string getNextTaxon(string&);
51 vector<int> genusIndex; //holds the indexes in tree where the genus level taxonomies are stored
52 map<string, int> name2Taxonomy; //maps name to index in tree
53 map<int, int> uniqueTaxonomies; //map of unique taxonomies
54 void print(int, ofstream&);
60 /**************************************************************************************************/