X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tree.h;h=1c44d8c919805c24072e0f6ab314789393ed63ce;hb=f663afa231c9bc1b5e18e0ea3bdd2b2ee784f5b2;hp=a076cef8eb30e3cda0efd8d74fcb680ae007cb24;hpb=5f44783e6d74a9c207492ac244210c915cadc272;p=mothur.git diff --git a/tree.h b/tree.h index a076cef..1c44d8c 100644 --- a/tree.h +++ b/tree.h @@ -18,6 +18,7 @@ class GlobalData; class Tree { public: + Tree(string); Tree(); //to generate a tree from a file ~Tree(); @@ -37,10 +38,12 @@ public: int findRoot(); //return index of root node //this function takes the leaf info and populates the non leaf nodes - void assembleTree(); + int assembleTree(); + int assembleTree(string); vector tree; //the first n nodes are the leaves, where n is the number of sequences. - + map< string, vector > groupNodeInfo; //maps group to indexes of leaf nodes with that group, different groups may contain same node because of names file. + private: GlobalData* globaldata; int numNodes, numLeaves; @@ -55,14 +58,16 @@ private: 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. int readTreeString(ifstream&); - + + MothurOut* m; + }; #endif