]> git.donarmstrong.com Git - mothur.git/blobdiff - unifracweightedcommand.cpp
removed UWSig and WSig from output if user does not set random=T
[mothur.git] / unifracweightedcommand.cpp
index d6431a051b56f3144dcfc80d430e7d61351da30a..994f09bcda36aa0bd5705b921cdc647387bd9500 100644 (file)
@@ -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++;
                        }