X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=listotulabelscommand.cpp;h=512dd6da763241d47d727dd10efcce3a68eab2b8;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=037c8225cfbc96f4b3ea3986ef16bf961a9afec1;hpb=1f0e54b53b714781f3f2fee7d01177fade98a625;p=mothur.git diff --git a/listotulabelscommand.cpp b/listotulabelscommand.cpp index 037c822..512dd6d 100644 --- a/listotulabelscommand.cpp +++ b/listotulabelscommand.cpp @@ -461,7 +461,7 @@ int ListOtuLabelsCommand::createList(vector& lookup){ ofstream out; m->openOutputFile(outputFileName, out); - for (int i = 0; i < m->currentBinLabels.size(); i++) { out << m->currentBinLabels[i] << endl; } + for (int i = 0; i < m->currentSharedBinLabels.size(); i++) { out << m->currentSharedBinLabels[i] << endl; } out.close(); @@ -485,7 +485,7 @@ int ListOtuLabelsCommand::createList(vector& lookup){ ofstream out; m->openOutputFile(outputFileName, out); - for (int i = 0; i < m->currentBinLabels.size(); i++) { out << m->currentBinLabels[i] << endl; } + for (int i = 0; i < m->currentSharedBinLabels.size(); i++) { out << m->currentSharedBinLabels[i] << endl; } out.close(); @@ -507,20 +507,8 @@ int ListOtuLabelsCommand::createList(ListVector*& list){ ofstream out; m->openOutputFile(outputFileName, out); - string snumBins = toString(list->getNumBins()); - for (int i = 0; i < list->getNumBins(); i++) { - if (m->control_pressed) { break; } - - string otuLabel = "Otu"; - string sbinNumber = toString(i+1); - if (sbinNumber.length() < snumBins.length()) { - int diff = snumBins.length() - sbinNumber.length(); - for (int h = 0; h < diff; h++) { otuLabel += "0"; } - } - otuLabel += sbinNumber; - - out << otuLabel << endl; - } + vector binLabels = list->getLabels(); + for (int i = 0; i < binLabels.size(); i++) { out << binLabels[i] << endl; } out.close();