]> git.donarmstrong.com Git - mothur.git/blobdiff - otuassociationcommand.cpp
added subsample, tiers and processors to tree.shared command. removed bootstrap.share...
[mothur.git] / otuassociationcommand.cpp
index b520ca69ceb898c9321cf8b7b6cf565588377079..eeefb41ffa9781aacad02a594cd4d61859631cb0 100644 (file)
@@ -308,7 +308,8 @@ int OTUAssociationCommand::process(vector<SharedRAbundVector*>& lookup){
                                else if (method == "kendall")   {       coef = linear.calcKendall(xy[i], xy[k], sig);   }                   
                                else { m->mothurOut("[ERROR]: invalid method, choices are spearman, pearson or kendall."); m->mothurOutEndLine(); m->control_pressed = true; }
                        
-                               out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl;
+                               if (m->binLabelsInFile.size() != 0) { out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl; }
+                else { out << i+1 << '\t' << k+1 << '\t' << coef << '\t' << sig << endl; }
                        }
                }
                
@@ -436,7 +437,8 @@ int OTUAssociationCommand::process(vector<SharedRAbundFloatVector*>& lookup){
                                else if (method == "kendall")   {       coef = linear.calcKendall(xy[i], xy[k], sig);   }                   
                                else { m->mothurOut("[ERROR]: invalid method, choices are spearman, pearson or kendall."); m->mothurOutEndLine(); m->control_pressed = true; }
                                
-                               out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << coef << '\t' << sig << endl;
+                if (m->binLabelsInFile.size() != 0) { out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl; }
+                else { out << i+1 << '\t' << k+1 << '\t' << coef << '\t' << sig << endl; }
                        }
                }