It turns out that Math.log10() can return 0, which leads to QUALs being set to -0, which is off-spec.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5415 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2011-03-10 03:08:56 +00:00
parent 3596c56602
commit 4baeb5979f
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ public class QualityUtils {
} }
static public double phredScaleErrorRate(double errorRate) { static public double phredScaleErrorRate(double errorRate) {
return -10.0*Math.log10(errorRate); return Math.abs(-10.0*Math.log10(errorRate));
} }
static public double lodToPhredScaleErrorRate(double lod) { static public double lodToPhredScaleErrorRate(double lod) {