]> git.donarmstrong.com Git - mothur.git/blobdiff - getseqscommand.cpp
modified sequence class to read fasta files with comments. this required modification...
[mothur.git] / getseqscommand.cpp
index 04b254599f46ef00081a3f153c0e097fea665cf4..315417a30586d290b2a692e04b2e0afacb1e6fb3 100644 (file)
@@ -125,15 +125,16 @@ void GetSeqsCommand::readFasta(){
                        Sequence currSeq(in);
                        name = currSeq.getName();
                        
-                       //if this name is in the accnos file
-                       if (names.count(name) == 1) {
-                               wroteSomething = true;
-                               
-                               currSeq.printSequence(out);
-                               
-                               names.erase(name);
+                       if (name != "") {
+                               //if this name is in the accnos file
+                               if (names.count(name) == 1) {
+                                       wroteSomething = true;
+                                       
+                                       currSeq.printSequence(out);
+                                       
+                                       names.erase(name);
+                               }
                        }
-                       
                        gobble(in);
                }
                in.close();