X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=consensusseqscommand.cpp;h=d9a5e294c08d1cd3a68c7890b7c0a6ab7fbde04a;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=fbec746804bcd7257383e99f26e058dfe4df6f25;hpb=a935b75dd890da5ae7f09e5e6179f90ab2955348;p=mothur.git diff --git a/consensusseqscommand.cpp b/consensusseqscommand.cpp index fbec746..d9a5e29 100644 --- a/consensusseqscommand.cpp +++ b/consensusseqscommand.cpp @@ -436,23 +436,16 @@ int ConsensusSeqsCommand::processList(ListVector*& list){ outSummary << "OTU#\tPositioninAlignment\tA\tT\tG\tC\tGap\tNumberofSeqs\tConsensusBase" << endl; string snumBins = toString(list->getNumBins()); + vector binLabels = list->getLabels(); for (int i = 0; i < list->getNumBins(); i++) { if (m->control_pressed) { outSummary.close(); outName.close(); outFasta.close(); return 0; } string bin = list->get(i); string consSeq = getConsSeq(bin, outSummary, i); - - string seqName = "Otu"; - string sbinNumber = toString(i+1); - if (sbinNumber.length() < snumBins.length()) { - int diff = snumBins.length() - sbinNumber.length(); - for (int h = 0; h < diff; h++) { seqName += "0"; } - } - seqName += sbinNumber; - outFasta << ">" << seqName << endl << consSeq << endl; - outName << seqName << '\t' << seqName << "," << bin << endl; + outFasta << ">" << binLabels[i] << endl << consSeq << endl; + outName << binLabels[i] << '\t' << binLabels[i] << "," << bin << endl; } outSummary.close(); outName.close(); outFasta.close();