]> git.donarmstrong.com Git - mothur.git/commitdiff
handle , in outNames
authorDon Armstrong <don@donarmstrong.com>
Fri, 11 Apr 2014 18:43:27 +0000 (11:43 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 11 Apr 2014 18:43:27 +0000 (11:43 -0700)
deconvolutecommand.cpp

index d6c5a5ae0cabf761aa300dab0e241daf6c04c118..5d308716acbfdfbac3b5a64583579fbfe6587a78 100644 (file)
@@ -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; }