Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / clustalw / src / tree / UPGMA / RootedTreeOutput.h
diff --git a/website/archive/binaries/mac/src/clustalw/src/tree/UPGMA/RootedTreeOutput.h b/website/archive/binaries/mac/src/clustalw/src/tree/UPGMA/RootedTreeOutput.h
new file mode 100644 (file)
index 0000000..7b9805c
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * Author: Mark Larkin
+ * 
+ * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
+ */
+/**
+ * Changes:
+ * mark 8-5-2007: I removed the isLeafNode function. Changed both the traversal functions
+ * to access Node's data members via functions.
+ */
+#ifndef ROOTEDTREEOUTPUT_H
+#define ROOTEDTREEOUTPUT_H
+
+#include <fstream>
+#include "RootedGuideTree.h"
+#include "../../general/clustalw.h"
+
+
+/** this is only used for upgma?!
+ *
+ */
+
+
+namespace clustalw
+{
+
+class RootedTreeOutput
+{
+    public:
+        RootedTreeOutput(SeqInfo* seqInfo);
+        void printPhylipTree(RootedGuideTree* tree, ofstream* ptrToFile, Alignment *alignPtr,
+                             DistMatrix* distMat);
+        void printNexusTree(RootedGuideTree* tree, ofstream* ptrToFile, Alignment *alignPtr, 
+                            DistMatrix* distMat);                   
+                
+    private:
+        void phylipTraverse(ofstream* ptrToFile, Alignment *alignPtr, Node* tree);
+        void nexusTraverse(ofstream* ptrToFile, Alignment *alignPtr, Node* tree);
+        int firstSeq;
+        int lastSeq;
+        int numSeqs;                  
+};
+
+}
+
+#endif