]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotree.h
changing command name classify.shared to classifyrf.shared
[mothur.git] / phylotree.h
index 2f3745074e170210bfc0b8d6b000361b4a410687..e0002209e4d83aaaf9468573173858d9b0602b61 100644 (file)
@@ -41,16 +41,20 @@ public:
        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]];    }
-       int getIndex(string seqName)    {       return name2Taxonomy[seqName];                  }
-       string getName(int i)                   {       return tree[i].name;                                    }
+       TaxNode get(int i);                             
+       TaxNode get(string seqName);
+       string getName(int i);                  
+       int getGenusIndex(string seqName);      
        string getFullTaxonomy(string);  //pass a sequence name return taxonomy
-       int getMaxLevel()                               {       return maxLevel;                                                }
-       int getNumSeqs()  {  return numSeqs;  }
+       
+       int getMaxLevel()               {       return maxLevel;        }
+       int getNumSeqs()                {       return numSeqs;         }
+       int getNumNodes()               {       return tree.size();     }
+       
+       bool ErrorCheck(vector<string>);
        
 private:
-       string getNextTaxon(string&);
+       string getNextTaxon(string&, string);
        void print(ofstream&, vector<TaxNode>&); //used to create static reference taxonomy file
        void fillOutTree(int, vector<TaxNode>&); //used to create static reference taxonomy file
        void binUnclassified(string);
@@ -59,7 +63,8 @@ private:
        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
+    map<string, int> name2GenusNodeIndex;
+       set<int> uniqueTaxonomies;  //map of unique taxonomies
        map<int, int> leafNodes; //used to create static reference taxonomy file
        //void print(int, ofstream&);
        int numNodes;