X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readtree.h;h=6b074de839070a86bd3e010bbf222a7ec4011dce;hb=f509429e06e545bde69c97cacc0eb436775bd329;hp=540f80cfa731ab2102fa0a8908737321f73a5cba;hpb=74844a60d80c6dd06e3fb02ee9b928424f9019b0;p=mothur.git diff --git a/readtree.h b/readtree.h index 540f80c..6b074de 100644 --- a/readtree.h +++ b/readtree.h @@ -10,7 +10,6 @@ */ #include "mothur.h" -#include "globaldata.hpp" #include "tree.h" #define MAX_LINE 513 @@ -25,13 +24,17 @@ class ReadTree { ReadTree(); virtual ~ReadTree() {}; - virtual int read() = 0; + virtual int read(TreeMap*) = 0; int readSpecialChar(istream&, char, string); int readNodeChar(istream& f); float readBranchLength(istream& f); + + vector getTrees() { return Trees; } + int AssembleTrees(map); protected: - GlobalData* globaldata; + vector Trees; + TreeMap* treeMap; int numNodes, numLeaves; MothurOut* m; @@ -43,15 +46,15 @@ class ReadTree { class ReadNewickTree : public ReadTree { public: - ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle); readOk = 0; } + ReadNewickTree(string file) : treeFile(file) { m->openInputFile(file, filehandle); readOk = 0; } ~ReadNewickTree() {}; - int read(); + int read(TreeMap*); private: Tree* T; - int readNewickInt(istream&, int&, Tree*); - int readTreeString(); - void nexusTranslation(); + int readNewickInt(istream&, int&, Tree*, TreeMap*); + int readTreeString(TreeMap*); + string nexusTranslation(TreeMap*); ifstream filehandle; string treeFile; string holder;