Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 06, 2015
bnbowman Fixing QV calculation bug 032bfba
Showing with 2 additions and 2 deletions.
  1. +2 −2 qualityscores.cpp
View
@@ -353,11 +353,11 @@ double QualityScores::calculateAverage(bool logTransform){
double aveQScore = 0.0000;
for(int i=0;i<seqLength;i++){
- if (logTransform) { aveQScore += pow(10.0, qScores[i]); }
+ if (logTransform) { aveQScore += pow(10.0, qScores[i] / -10); }
else { aveQScore += qScores[i]; }
}
- if (logTransform) { aveQScore = log10(aveQScore /(double) seqLength); }
+ if (logTransform) { aveQScore = -10 * log10(aveQScore /(double) seqLength); }
else { aveQScore /= (double) seqLength; }
return aveQScore;

No commit comments for this range