]> git.donarmstrong.com Git - mothur.git/blobdiff - classifyseqscommand.cpp
modified sequence class to read fasta files with comments. this required modification...
[mothur.git] / classifyseqscommand.cpp
index d2f8fc748f3064bd03a525ce6d9e6bb7895d55fe..2b76e5083d1e08d2d9dc29382688081cf462b953 100644 (file)
@@ -349,14 +349,15 @@ int ClassifySeqsCommand::driver(linePair* line, string taxFName, string tempTFNa
                for(int i=0;i<line->numSeqs;i++){
                        
                        Sequence* candidateSeq = new Sequence(inFASTA);
-
-                       taxonomy = classify->getTaxonomy(candidateSeq);
                        
-                       if (taxonomy != "bad seq") {
-                               outTax << candidateSeq->getName() << '\t' << taxonomy << endl;
-                               outTaxSimple << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
-                       }
-                                                       
+                       if (candidateSeq->getName() != "") {
+                               taxonomy = classify->getTaxonomy(candidateSeq);
+                               
+                               if (taxonomy != "bad seq") {
+                                       outTax << candidateSeq->getName() << '\t' << taxonomy << endl;
+                                       outTaxSimple << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
+                               }
+                       }                               
                        delete candidateSeq;
                        
                        if((i+1) % 100 == 0){