X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=getsharedotucommand.cpp;h=9302d1d21dfc52dbe295754e38aa86de55e0a4cc;hp=1074d323e9aaeae08b69a2d546fdb8cae544d330;hb=499f4ac6e321f9f03d4c3aa25c3b6880892c8b83;hpb=2a29fceeeb8754c3fd97ba830d2fbed5c4349ee8 diff --git a/getsharedotucommand.cpp b/getsharedotucommand.cpp index 1074d32..9302d1d 100644 --- a/getsharedotucommand.cpp +++ b/getsharedotucommand.cpp @@ -431,6 +431,7 @@ int GetSharedOTUCommand::process(ListVector* shared) { int num = 0; //go through each bin, find out if shared + vector binLabels = shared->getLabels(); for (int i = 0; i < shared->getNumBins(); i++) { if (m->control_pressed) { outNames.close(); m->mothurRemove(outputFileNames); return 0; } @@ -452,7 +453,7 @@ int GetSharedOTUCommand::process(ListVector* shared) { //find group string seqGroup = groupMap->getGroup(name); if (output != "accnos") { - namesOfSeqsInThisBin.push_back((name + "|" + seqGroup + "|" + toString(i+1))); + namesOfSeqsInThisBin.push_back((name + "|" + seqGroup + "|" + binLabels[i])); }else { namesOfSeqsInThisBin.push_back(name); } if (seqGroup == "not found") { m->mothurOut(name + " is not in your groupfile. Please correct."); m->mothurOutEndLine(); exit(1); } @@ -691,7 +692,7 @@ int GetSharedOTUCommand::process(vector& lookup) { for(int j = 0; j < lookup.size(); j++) { string seqGroup = lookup[j]->getGroup(); - string name = m->currentBinLabels[i]; + string name = m->currentSharedBinLabels[i]; if (lookup[j]->getAbundance(i) != 0) { if (output != "accnos") {