]> git.donarmstrong.com Git - mothur.git/blobdiff - removeseqscommand.cpp
modified sequence class to read fasta files with comments. this required modification...
[mothur.git] / removeseqscommand.cpp
index 1b9edb0e98e20f7752fb9b8aab3584c1c05bccc0..28f8cf7a6d890b0c688c388b3a2c0e8c8438ba27 100644 (file)
@@ -125,13 +125,14 @@ void RemoveSeqsCommand::readFasta(){
                        Sequence currSeq(in);
                        name = currSeq.getName();
                        
-                       //if this name is in the accnos file
-                       if (names.count(name) == 0) {
-                               wroteSomething = true;
-                               
-                               currSeq.printSequence(out);
-                       }else {         names.erase(name);              }
-                       
+                       if (name != "") {
+                               //if this name is in the accnos file
+                               if (names.count(name) == 0) {
+                                       wroteSomething = true;
+                                       
+                                       currSeq.printSequence(out);
+                               }else {         names.erase(name);              }
+                       }
                        gobble(in);
                }
                in.close();