]> git.donarmstrong.com Git - mothur.git/blobdiff - removeotuscommand.cpp
consensus.seqs can now find a consensus on a whole fasta file without needing a listfile
[mothur.git] / removeotuscommand.cpp
index 6828c7287f3530aa009ec9d42e12c8eaacbb724c..0e7d302ecc065c00a364dfe8e58b0b6e46750a6a 100644 (file)
@@ -367,11 +367,17 @@ int RemoveOtusCommand::processList(ListVector*& list, GroupMap*& groupMap, ofstr
                                if (m->inUsersGroups(group, Groups)) {  removeBin = true; }
                                groupFileOutput += individual + "\t" + group + "\n";                            
                                
-                               //if there are no sequences from the groups we want to remove in this bin add to new list, output to groupfile
-                               newList.push_back(binnames);    
-                               outGroup << groupFileOutput;
+                               if (!removeBin) {
+                                       //if there are no sequences from the groups we want to remove in this bin add to new list, output to groupfile
+                                       newList.push_back(binnames);    
+                                       outGroup << groupFileOutput;
+                               }else {
+                                       numOtus++;
+                               }
+                       }else {
                                numOtus++;
                        }
+                       
                }
                
                //print new listvector