]> git.donarmstrong.com Git - mothur.git/blobdiff - tree.cpp
version 1.4
[mothur.git] / tree.cpp
index 656d4ccb6051793053ab1db194195688b913903f..ee17e6f37f6417d24546697e3247c21f34d1d0aa 100644 (file)
--- a/tree.cpp
+++ b/tree.cpp
@@ -495,6 +495,7 @@ void Tree::createNewickFile(string f) {
                int root = findRoot();
                //filename = getRootName(globaldata->getTreeFile()) + "newick";
                filename = f;
+
                openOutputFile(filename, out);
                
                printBranch(root, out, "branch");
@@ -667,7 +668,7 @@ void Tree::parseTreeFile() {
                                if(number == ";") { globaldata->Treenames.pop_back(); }  //in case ';' from translation is on next line instead of next to last name
                        }
                }
-               
+               filehandle.close();
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function parseTreeFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";