From: Don Armstrong Date: Fri, 11 Apr 2014 18:43:27 +0000 (-0700) Subject: handle , in outNames X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=97f2c04672f615d800cb00931ea6879d172f1692;p=mothur.git handle , in outNames --- diff --git a/deconvolutecommand.cpp b/deconvolutecommand.cpp index d6c5a5a..5d30871 100644 --- a/deconvolutecommand.cpp +++ b/deconvolutecommand.cpp @@ -318,8 +318,16 @@ int DeconvoluteCommand::execute() { }else { outNames << (it->second.second).substr(0, pos) << '\t' << it->second.second << endl; } - }else { ct.printSeq(outNames, it->second.second); } - } + } else { + //get rep name + int pos = (it->second.second).find_first_of(','); + if (pos == string::npos) { // only reps itself + ct.printSeq(outNames, it->second.second); + } else { + ct.printSeq(outNames, (it->second.second).substr(0,pos)); + } + } + } outNames.close(); if (m->control_pressed) { outputTypes.clear(); m->mothurRemove(outFastaFile); for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; }