X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tree.h;h=23ddf5dd87ed6d901d8db793861e34cb92b43e2d;hb=44b464979e91c2a1f144ac45ca12c14fcf6579f0;hp=a5259552d8fa09f18d1e81b1776ef94f84724748;hpb=cd37904452dc95b183ff313ff05720c562902487;p=mothur.git diff --git a/tree.h b/tree.h index a525955..23ddf5d 100644 --- a/tree.h +++ b/tree.h @@ -37,9 +37,10 @@ public: int findRoot(); //return index of root node //this function takes the leaf info and populates the non leaf nodes - void assembleTree(); + int assembleTree(); vector tree; //the first n nodes are the leaves, where n is the number of sequences. + private: GlobalData* globaldata; int numNodes, numLeaves; @@ -48,18 +49,21 @@ private: map::iterator it, it2; map mergeGroups(int); //returns a map with a groupname and the number of times that group was seen in the children - map mergeGcounts(int); + + void addNamesToCounts(); void randomTopology(); void randomBlengths(); void randomLabels(vector); - void randomLabels(string, string); + //void randomLabels(string, string); void printBranch(int, ostream&, string); //recursively print out tree void parseTreeFile(); //parses through tree file to find names of nodes and number of them //this is required in case user has sequences in the names file that are //not included in the tree. //only takes names from the first tree in the tree file and assumes that all trees use the same names. - void readTreeString(ifstream&); + int readTreeString(ifstream&); + MothurOut* m; + }; #endif