]> git.donarmstrong.com Git - mothur.git/commitdiff
removed UWSig and WSig from output if user does not set random=T
authorwestcott <westcott>
Fri, 29 Jul 2011 12:34:24 +0000 (12:34 +0000)
committerwestcott <westcott>
Fri, 29 Jul 2011 12:34:24 +0000 (12:34 +0000)
indicatorcommand.cpp
unifracunweightedcommand.cpp
unifracweightedcommand.cpp

index 905076b7dcd56b62102a3dbdbcef5de9024d0fef..797f62c8908f0c0bd125c9bc1135a45b83e6d028 100644 (file)
@@ -42,7 +42,7 @@ string IndicatorCommand::getHelpString(){
                helpString += "The indicator command outputs a .indicator.summary file and a .indicator.tre if a tree is given. \n";
                helpString += "The new tree contains labels at each internal node.  The label is the node number so you can relate the tree to the summary file.\n";
                helpString += "The summary file lists the indicator value for each OTU for each node.\n";
-               helpString += "The indicator command parameters are tree, groups, shared, relabund, design and label. The tree parameter is required as well as either shared or relabund.\n";
+               helpString += "The indicator command parameters are tree, groups, shared, relabund, design and label. \n";
                helpString += "The design parameter allows you to relate the tree to the shared or relabund file, if your tree contains the grouping names, or if no tree is provided to group your groups into groupings.\n";                  
                helpString += "The groups parameter allows you to specify which of the groups in your shared or relabund you would like analyzed, or if you provide a design file the groups in your design file.  The groups may be entered separated by dashes.\n";
                helpString += "The label parameter indicates at what distance your tree relates to the shared or relabund.\n";
index 501e6123f3566d001e48ea266d5a64d42d14dd49..1c2db5325311d7b6d6afb52aecee51a75bdd1db8 100644 (file)
@@ -298,8 +298,10 @@ int UnifracUnweightedCommand::execute() {
                
                if (numComp < processors) { processors = numComp;  }
                
-               outSum << "Tree#" << '\t' << "Groups" << '\t'  <<  "UWScore" <<'\t' << "UWSig" <<  endl;
-               m->mothurOut("Tree#\tGroups\tUWScore\tUWSig"); m->mothurOutEndLine();
+               outSum << "Tree#" << '\t' << "Groups" << '\t'  <<  "UWScore" <<'\t';
+               m->mothurOut("Tree#\tGroups\tUWScore\t");
+               if (random) { outSum << "UWSig"; m->mothurOut("UWSig"); }
+               outSum << endl; m->mothurOutEndLine();
         
                //get pscores for users trees
                for (int i = 0; i < T.size(); i++) {
@@ -485,9 +487,9 @@ void UnifracUnweightedCommand::printUWSummaryFile(int i) {
                                        m->mothurOutJustToLog(groupComb[a]  + "\t" + toString(utreeScores[a][0])  + "\t<" + toString((1/float(iters))) + "\n"); 
                                }
                        }else{
-                               outSum << setprecision(6) << groupComb[a]  << '\t' << utreeScores[a][0] << '\t' << "0.00" << endl;
-                               cout << setprecision(6)  << groupComb[a]  << '\t' << utreeScores[a][0] << '\t' << "0.00" << endl; 
-                               m->mothurOutJustToLog(groupComb[a]  + "\t" + toString(utreeScores[a][0])  + "\t0.00\n");
+                               outSum << setprecision(6) << groupComb[a]  << '\t' << utreeScores[a][0]  << endl;
+                               cout << setprecision(6)  << groupComb[a]  << '\t' << utreeScores[a][0]  << endl; 
+                               m->mothurOutJustToLog(groupComb[a]  + "\t" + toString(utreeScores[a][0]) + "\n");
                        }
                }
                
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++;
                        }