Next version of JABA
[jabaws.git] / binaries / src / clustalw / src / tree / UPGMA / RootedTreeOutput.h
1 /**
2  * Author: Mark Larkin
3  * 
4  * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
5  */
6 /**
7  * Changes:
8  * mark 8-5-2007: I removed the isLeafNode function. Changed both the traversal functions
9  * to access Node's data members via functions.
10  */
11 #ifndef ROOTEDTREEOUTPUT_H
12 #define ROOTEDTREEOUTPUT_H
13
14 #include <fstream>
15 #include "RootedGuideTree.h"
16 #include "../../general/clustalw.h"
17
18
19 /** this is only used for upgma?!
20  *
21  */
22
23
24 namespace clustalw
25 {
26
27 class RootedTreeOutput
28 {
29     public:
30         RootedTreeOutput(SeqInfo* seqInfo);
31         void printPhylipTree(RootedGuideTree* tree, ofstream* ptrToFile, Alignment *alignPtr,
32                              DistMatrix* distMat);
33         void printNexusTree(RootedGuideTree* tree, ofstream* ptrToFile, Alignment *alignPtr, 
34                             DistMatrix* distMat);                   
35                 
36     private:
37         void phylipTraverse(ofstream* ptrToFile, Alignment *alignPtr, Node* tree);
38         void nexusTraverse(ofstream* ptrToFile, Alignment *alignPtr, Node* tree);
39         int firstSeq;
40         int lastSeq;
41         int numSeqs;                  
42 };
43
44 }
45
46 #endif