Skip to content

Commit cf6c9a0

Browse files
committed
output the initial tree for Debugging
1 parent f12e23d commit cf6c9a0

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

tree/tree.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,19 @@ void cmaple::Tree::doPlacementTemplate(const int num_threads, std::ostream& out_
887887
std::cout << std::setprecision(10)
888888
<< "Tree log likelihood (of the initial tree): "
889889
<< computeLh() << std::endl;
890+
891+
// Output the initial tree for debugging
892+
const std::string prefix =
893+
params ? (params->output_prefix.length() ? params->output_prefix
894+
: params->aln_path)
895+
: "debug";
896+
const cmaple::Tree::TreeType tree_format =
897+
params ? cmaple::Tree::parseTreeType(params->tree_format_str)
898+
: BIN_TREE;
899+
900+
ofstream out = ofstream(prefix + "_init.treefile");
901+
out << exportNewick(tree_format);
902+
out.close();
890903
}
891904
start = getRealTime();
892905

@@ -979,21 +992,6 @@ void cmaple::Tree::doPlacementTemplate(const int num_threads, std::ostream& out_
979992
}
980993
}
981994

982-
// Output the initial tree for debugging
983-
if (cmaple::verbose_mode >= cmaple::VB_DEBUG) {
984-
const std::string prefix =
985-
params ? (params->output_prefix.length() ? params->output_prefix
986-
: params->aln_path)
987-
: "debug";
988-
const cmaple::Tree::TreeType tree_format =
989-
params ? cmaple::Tree::parseTreeType(params->tree_format_str)
990-
: BIN_TREE;
991-
992-
ofstream out = ofstream(prefix + "_init.treefile");
993-
out << exportNewick(tree_format);
994-
out.close();
995-
}
996-
997995
// Restore the source cout
998996
cout.rdbuf(src_cout);
999997
}

0 commit comments

Comments
 (0)