]> git.donarmstrong.com Git - mothur.git/blobdiff - qualityscores.cpp
took out couts
[mothur.git] / qualityscores.cpp
index 6dee9862ec2c7582aa9a56dd2f5e8bd4f2ce9127..8b8e4ec22c68ea406ddcafeee6e4a1abb280566a 100644 (file)
@@ -194,7 +194,6 @@ bool QualityScores::stripQualRollingAverage(Sequence& sequence, double qThreshol
                        
                        if(rollingSum / (double)(i+1) < qThreshold){
                                end = i;
-//                             cout << i+1 << '\t' << seqName << '\t' << rollingSum / (double)(i+1) << endl;
                                break;
                        }
                }
@@ -308,7 +307,9 @@ void QualityScores::updateQScoreErrorMap(map<char, vector<int> >& qualErrorMap,
        try {
 
                int seqLength = errorSeq.size();
+               
                int qIndex = start - 1;
+
                for(int i=0;i<seqLength;i++){
                        
                        if(errorSeq[i] == 'm')          {       qualErrorMap['m'][qScores[qIndex]] += weight;   }
@@ -318,7 +319,7 @@ void QualityScores::updateQScoreErrorMap(map<char, vector<int> >& qualErrorMap,
                        else if(errorSeq[i] == 'd')     {       /*      there are no qScores for deletions      */              }
 
                        if(errorSeq[i] != 'd')          {       qIndex++;       }
-
+                       if(qIndex > stop){      break;  }
                }       
        }
        catch(exception& e) {