7 * Created by Sarah Westcott on 1/22/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
14 #include "counttable.h"
17 #define SKIPLINE(f,c) {while((c=f.get())!=EOF && ((c) != '\n')){}}
21 /****************************************************************************/
26 virtual ~ReadTree() {};
28 virtual int read(CountTable*) = 0;
29 int readSpecialChar(istream&, char, string);
30 int readNodeChar(istream& f);
31 float readBranchLength(istream& f);
33 vector<Tree*> getTrees() { return Trees; }
39 int numNodes, numLeaves;
45 /****************************************************************************/
47 class ReadNewickTree : public ReadTree {
50 ReadNewickTree(string file) : treeFile(file) { m->openInputFile(file, filehandle); readOk = 0; }
52 int read(CountTable*);
56 int readNewickInt(istream&, int&, Tree*, CountTable*);
57 int readTreeString(CountTable*);
58 string nexusTranslation(CountTable*);
62 int readOk; // readOk = 0 means success, readOk = 1 means errors.
66 /****************************************************************************/