]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.cpp
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / screenseqscommand.cpp
index 51495506c6e7a3303c6a87d0510a87e44f1810f6..033fbcad422abb62cd2470866bd4666db9e907bd 100644 (file)
@@ -1080,8 +1080,6 @@ int ScreenSeqsCommand::screenNameGroupFile(map<string, string> badSeqNames){
                        it = badSeqNames.find(seqName);
                                
                        if(it != badSeqNames.end()){
-                               badSeqNames.erase(it);
-                               
                                if(namefile != ""){
                                        int start = 0;
                                        for(int i=0;i<seqList.length();i++){
@@ -1092,6 +1090,7 @@ int ScreenSeqsCommand::screenNameGroupFile(map<string, string> badSeqNames){
                                        }
                                        badSeqGroups[seqList.substr(start,seqList.length()-start)] = it->second;
                                }
+                badSeqNames.erase(it);
                        }
                        else{
                                goodNameOut << seqName << '\t' << seqList << endl;
@@ -2302,7 +2301,7 @@ int ScreenSeqsCommand::screenQual(map<string, string> badSeqNames){
                                saveName = name.substr(1);
                                while (!in.eof())       {       
                                        char c = in.get(); 
-                                       if (c == 10 || c == 13){        break;  }
+                                       if (c == 10 || c == 13 || c == -1){     break;  }
                                        else { name += c; }     
                                } 
                                m->gobble(in);