]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotree.h
changes to chop.seqs
[mothur.git] / phylotree.h
index b65a651b7a864f45ee04617ef447f344005a3aba..a961721a77dad0f32624aa1ff7941651007fc757 100644 (file)
@@ -32,32 +32,38 @@ class PhyloTree {
 public:
        PhyloTree();
        PhyloTree(string);  //pass it a taxonomy file and it makes the tree
-       PhyloTree(ifstream&);  //pass it a taxonomy file and it makes the train.tree
+       PhyloTree(ifstream&, string);  //pass it a taxonomy file and it makes the train.tree
        ~PhyloTree() {};
        int addSeqToTree(string, string);
        void assignHeirarchyIDs(int);
-       void print(ofstream&);
        void printTreeNodes(string); //used by bayesian to save time
        vector<int> getGenusNodes();
        vector<int> getGenusTotals();   
-       void binUnclassified();
+       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 getIndex(string seqName);   
+                       
        string getFullTaxonomy(string);  //pass a sequence name return taxonomy
        int getMaxLevel()                               {       return maxLevel;                                                }
        int getNumSeqs()  {  return numSeqs;  }
+       bool ErrorCheck(vector<string>);
        
 private:
        string getNextTaxon(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);
+       
        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&);
+       map<int, int> leafNodes; //used to create static reference taxonomy file
+       //void print(int, ofstream&);
        int numNodes;
        int numSeqs;
        int maxLevel;