]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotree.h
reworked the classifiers summary file added groupfile option to classify.seqs, added...
[mothur.git] / phylotree.h
index 345e2e72228d711942e2f0d036eed0bda8c8fa67..a57cf256ecf0e0eded1182681f7ab91601e0a1a5 100644 (file)
@@ -32,12 +32,14 @@ class PhyloTree {
 public:
        PhyloTree();
        PhyloTree(string);  //pass it a taxonomy file and it makes the tree
+       PhyloTree(ifstream&, string);  //pass it a taxonomy file and it makes the train.tree
        ~PhyloTree() {};
-       void addSeqToTree(string, string);
+       int addSeqToTree(string, string);
        void assignHeirarchyIDs(int);
-       void print(ofstream&);
+       void printTreeNodes(string); //used by bayesian to save time
        vector<int> getGenusNodes();
-       void binUnclassified();
+       vector<int> getGenusTotals();   
+       void setUp(string);  //used to create file needed for summary file if you use () constructor and add seqs manually instead of passing taxonomyfile
                
        TaxNode get(int i)                              {       return tree[i];                                                 }
        TaxNode get(string seqName)             {       return tree[name2Taxonomy[seqName]];    }
@@ -45,17 +47,23 @@ public:
        string getName(int i)                   {       return tree[i].name;                                    }
        string getFullTaxonomy(string);  //pass a sequence name return taxonomy
        int getMaxLevel()                               {       return maxLevel;                                                }
+       int getNumSeqs()  {  return numSeqs;  }
        
 private:
        string getNextTaxon(string&);
+       void print(ofstream&, vector<TaxNode>&);
+       void binUnclassified(string);
+       
        vector<TaxNode> tree;
        vector<int> genusIndex; //holds the indexes in tree where the genus level taxonomies are stored
+       vector<int> totals; //holds the numSeqs at each genus level taxonomy
        map<string, int> name2Taxonomy;  //maps name to index in tree
        map<int, int> uniqueTaxonomies;  //map of unique taxonomies
-       void print(int, ofstream&);
+       //void print(int, ofstream&);
        int numNodes;
        int numSeqs;
        int maxLevel;
+       bool calcTotals;
        MothurOut* m;
 };