]> git.donarmstrong.com Git - mothur.git/blobdiff - trimseqscommand.cpp
1.19.0
[mothur.git] / trimseqscommand.cpp
index b5393a3a5ba16caec3b89c1eee6906098e95c6a1..f685a427d4dfc87d92e45b4aa82342bfd6ff3d16 100644 (file)
@@ -583,7 +583,7 @@ int TrimSeqsCommand::driverCreateTrim(string filename, string qFileName, string
                                        
                                        if(barcodes.size() != 0){
                                                string thisGroup = barcodeNameVector[barcodeIndex];
-                                               if (primers.size() != 0) { thisGroup += "." + primerNameVector[primerIndex]; }
+                                               if (primers.size() != 0) { if (primerNameVector[primerIndex] != "") { thisGroup += "." + primerNameVector[primerIndex]; } }
                                                
                                                outGroupsFile << currSeq.getName() << '\t' << thisGroup << endl;
                                                
@@ -893,12 +893,14 @@ void TrimSeqsCommand::getOligos(vector<vector<string> >& fastaFileNames, vector<
                
                while(!inOligos.eof()){
 
-                       inOligos >> type; m->gobble(inOligos);
+                       inOligos >> type; 
                                        
                        if(type[0] == '#'){
-                               while (!inOligos.eof()) {       char c = inOligos.get(); if (c == 10 || c == 13){       break;  }       } // get rest of line if there's any crap there
+                               while (!inOligos.eof()) {       char c = inOligos.get();  if (c == 10 || c == 13){      break;  }       } // get rest of line if there's any crap there
+                               m->gobble(inOligos);
                        }
                        else{
+                               m->gobble(inOligos);
                                //make type case insensitive
                                for(int i=0;i<type.length();i++){       type[i] = toupper(type[i]);  }