X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.cpp;h=994f09bcda36aa0bd5705b921cdc647387bd9500;hb=c651c46022761aef61644f78462365d8f767ff0b;hp=d6431a051b56f3144dcfc80d430e7d61351da30a;hpb=b9553248b33ebd169c6aee375c1cc1a9dda61848;p=mothur.git diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index d6431a0..994f09b 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -581,8 +581,10 @@ void UnifracWeightedCommand::printWeightedFile() { void UnifracWeightedCommand::printWSummaryFile() { try { //column headers - outSum << "Tree#" << '\t' << "Groups" << '\t' << "WScore" << '\t' << "WSig" << endl; - m->mothurOut("Tree#\tGroups\tWScore\tWSig"); m->mothurOutEndLine(); + outSum << "Tree#" << '\t' << "Groups" << '\t' << "WScore" << '\t'; + m->mothurOut("Tree#\tGroups\tWScore\t"); + if (random) { outSum << "WSig"; m->mothurOut("WSig"); } + outSum << endl; m->mothurOutEndLine(); //format output outSum.setf(ios::fixed, ios::floatfield); outSum.setf(ios::showpoint); @@ -602,9 +604,9 @@ void UnifracWeightedCommand::printWSummaryFile() { m->mothurOutJustToLog(toString(i+1) +"\t" + groupComb[j] +"\t" + toString(utreeScores[count]) +"\t<" + toString((1/float(iters))) + "\n"); } }else{ - outSum << setprecision(6) << i+1 << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << "0.00" << endl; - cout << setprecision(6) << i+1 << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << "0.00" << endl; - m->mothurOutJustToLog(toString(i+1) +"\t" + groupComb[j] +"\t" + toString(utreeScores[count]) +"\t0.00\n"); + outSum << setprecision(6) << i+1 << '\t' << groupComb[j] << '\t' << utreeScores[count] << endl; + cout << setprecision(6) << i+1 << '\t' << groupComb[j] << '\t' << utreeScores[count] << endl; + m->mothurOutJustToLog(toString(i+1) +"\t" + groupComb[j] +"\t" + toString(utreeScores[count]) +"\n"); } count++; }