X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=treenode.cpp;h=0131f59c340ef30eeeeb56ed2a96fc2dc258b808;hp=648707ab246725ce6f36e912d9b8509024e362b7;hb=615301e57c25e241356a9c2380648d117709458d;hpb=5a1e62397b91f57d0d3aff635891df04b8999a88 diff --git a/treenode.cpp b/treenode.cpp index 648707a..0131f59 100644 --- a/treenode.cpp +++ b/treenode.cpp @@ -12,6 +12,7 @@ /****************************************************************/ Node::Node() { + m = MothurOut::getInstance(); //initialize node name = ""; branchLength = -1; @@ -60,30 +61,30 @@ int Node::getIndex() { return vectorIndex; } //to be used by printTree in the Tree class to print the leaf info void Node::printNode() { try{ - mothurOut(toString(parent) + " " + toString(lchild) + " " + toString(rchild) + " "); + m->mothurOut(name + " " + toString(parent) + " " + toString(lchild) + " " + toString(rchild) + " "); - for (int i = 0; i < group.size(); i++) { mothurOut( group[i] + " "); } + /*for (int i = 0; i < group.size(); i++) { m->mothurOut( group[i] + " "); } //there is a branch length if (branchLength != -1) { - mothurOut(" " + toString(branchLength)); + m->mothurOut(" " + toString(branchLength)); } - mothurOut(" |"); + m->mothurOut(" |"); map::iterator it; for(it=pGroups.begin();it!=pGroups.end();it++){ - mothurOut(" " + it->first + ":" + toString(it->second)); + m->mothurOut(" " + it->first + ":" + toString(it->second)); } - mothurOut(" |"); + m->mothurOut(" |"); for(it=pcount.begin();it!=pcount.end();it++){ - mothurOut(" " + it->first + ":" + toString(it->second)); - } - mothurOutEndLine(); + m->mothurOut(" " + it->first + ":" + toString(it->second)); + }*/ + m->mothurOutEndLine(); } catch(exception& e) { - errorOut(e, "Node", "printNode"); + m->errorOut(e, "Node", "printNode"); exit(1); } }