X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=otuassociationcommand.cpp;h=705540c3a62564a14da7a7ed00262c4adb5f220b;hp=23cac294cad4f1b25caa0e4f4d55de40f1fb2876;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=1a5c2356c1b955c6ec024b2baf9f46377ee7c72e diff --git a/otuassociationcommand.cpp b/otuassociationcommand.cpp index 23cac29..705540c 100644 --- a/otuassociationcommand.cpp +++ b/otuassociationcommand.cpp @@ -360,7 +360,7 @@ int OTUAssociationCommand::process(vector& 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; } - if (sig < cutoff) { out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl; } + if (sig < cutoff) { out << m->currentSharedBinLabels[i] << '\t' << m->currentSharedBinLabels[k] << '\t' << coef << '\t' << sig << endl; } } } }else { //compare otus to metadata @@ -377,7 +377,7 @@ int OTUAssociationCommand::process(vector& lookup){ else if (method == "kendall") { coef = linear.calcKendall(xy[i], metadata[k], sig); } else { m->mothurOut("[ERROR]: invalid method, choices are spearman, pearson or kendall."); m->mothurOutEndLine(); m->control_pressed = true; } - if (sig < cutoff) { out << m->binLabelsInFile[i] << '\t' << metadataLabels[k] << '\t' << coef << '\t' << sig << endl; } + if (sig < cutoff) { out << m->currentSharedBinLabels[i] << '\t' << metadataLabels[k] << '\t' << coef << '\t' << sig << endl; } } } @@ -523,7 +523,7 @@ int OTUAssociationCommand::process(vector& 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; } - if (sig < cutoff) { out << m->binLabelsInFile[i] << '\t' << m->binLabelsInFile[k] << '\t' << coef << '\t' << sig << endl; } + if (sig < cutoff) { out << m->currentSharedBinLabels[i] << '\t' << m->currentSharedBinLabels[k] << '\t' << coef << '\t' << sig << endl; } } } }else { //compare otus to metadata @@ -540,7 +540,7 @@ int OTUAssociationCommand::process(vector& lookup){ else if (method == "kendall") { coef = linear.calcKendall(xy[i], metadata[k], sig); } else { m->mothurOut("[ERROR]: invalid method, choices are spearman, pearson or kendall."); m->mothurOutEndLine(); m->control_pressed = true; } - if (sig < cutoff) { out << m->binLabelsInFile[i] << '\t' << metadataLabels[k] << '\t' << coef << '\t' << sig << endl; } + if (sig < cutoff) { out << m->currentSharedBinLabels[i] << '\t' << metadataLabels[k] << '\t' << coef << '\t' << sig << endl; } } } @@ -572,6 +572,7 @@ int OTUAssociationCommand::readMetadata(){ //save names of columns you are reading while (!iss.eof()) { iss >> columnLabel; m->gobble(iss); + if (m->debug) { m->mothurOut("[DEBUG]: metadata column Label = " + columnLabel + "\n"); } metadataLabels.push_back(columnLabel); } int count = metadataLabels.size(); @@ -583,6 +584,7 @@ int OTUAssociationCommand::readMetadata(){ string group = ""; in >> group; m->gobble(in); + if (m->debug) { m->mothurOut("[DEBUG]: metadata group = " + group + "\n"); } SharedRAbundFloatVector* tempLookup = new SharedRAbundFloatVector(); tempLookup->setGroup(group); @@ -590,7 +592,8 @@ int OTUAssociationCommand::readMetadata(){ for (int i = 0; i < count; i++) { float temp = 0.0; - in >> temp; + in >> temp; + if (m->debug) { m->mothurOut("[DEBUG]: metadata value = " + toString(temp) + "\n"); } tempLookup->push_back(temp, group); }