]> git.donarmstrong.com Git - mothur.git/blobdiff - otuassociationcommand.cpp
fixed bug in make.biom that occurred if some taxonomies had confidence scores and...
[mothur.git] / otuassociationcommand.cpp
index c82510c3d8d0b531d13e4c847d16fe98aa72d611..0d41e63f3526bc9af4e3933d5f3337d62ebd0f2a 100644 (file)
@@ -300,7 +300,7 @@ int OTUAssociationCommand::process(vector<SharedRAbundVector*>& lookup){
                        for (int k = 0; k < i; k++) {
                                
                                if (m->control_pressed) { out.close(); return 0; }
-                                                                                               
+
                                double coef = 0.0;
                                double sig = 0.0;
                                if (method == "spearman")               {   coef = linear.calcSpearman(xy[i], xy[k], sig);      }
@@ -308,12 +308,13 @@ 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;
+                out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl;
                        }
                }
                
                out.close();
                
+               
                return 0;
                
        }
@@ -435,7 +436,7 @@ 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;
+                out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl; 
                        }
                }