X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=consensusseqscommand.cpp;h=d9a5e294c08d1cd3a68c7890b7c0a6ab7fbde04a;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=9bfdc9caba1e6bef2fe14d6eb469af2218bd29d8;hpb=4b54ce99af7db8019ea907cd7c2edf789369ada9;p=mothur.git diff --git a/consensusseqscommand.cpp b/consensusseqscommand.cpp index 9bfdc9c..d9a5e29 100644 --- a/consensusseqscommand.cpp +++ b/consensusseqscommand.cpp @@ -226,7 +226,7 @@ int ConsensusSeqsCommand::execute(){ if (m->control_pressed) { return 0; } if (namefile != "") { readNames(); } - if (countfile != "") { ct.readTable(countfile); } + if (countfile != "") { ct.readTable(countfile, true, false); } if (m->control_pressed) { return 0; } @@ -312,7 +312,7 @@ int ConsensusSeqsCommand::execute(){ }else { - + InputData* input = new InputData(listfile, "list"); ListVector* list = input->getListVector(); @@ -435,6 +435,8 @@ 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; } @@ -442,8 +444,8 @@ int ConsensusSeqsCommand::processList(ListVector*& list){ string bin = list->get(i); string consSeq = getConsSeq(bin, outSummary, i); - outFasta << ">seq" << (i+1) << endl << consSeq << endl; - outName << "seq" << (i+1) << '\t' << "seq" << (i+1) << "," << bin << endl; + outFasta << ">" << binLabels[i] << endl << consSeq << endl; + outName << binLabels[i] << '\t' << binLabels[i] << "," << bin << endl; } outSummary.close(); outName.close(); outFasta.close();