From 4baeb5979fecc5aacbe7d6b3219d6867f740eba8 Mon Sep 17 00:00:00 2001 From: ebanks Date: Thu, 10 Mar 2011 03:08:56 +0000 Subject: [PATCH] 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 --- .../sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java | 2 +- java/src/org/broadinstitute/sting/utils/QualityUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java index 3f2c43c96..488c24fc0 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java @@ -29,7 +29,7 @@ import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.commandline.Hidden; -public class UnifiedArgumentCollection { +public class UnifiedArgumentCollection { // control the various models to be used @Argument(fullName = "genotype_likelihoods_model", shortName = "glm", doc = "Genotype likelihoods calculation model to employ -- SNP is the default option, while DINDEL is also available for calling indels.", required = false) diff --git a/java/src/org/broadinstitute/sting/utils/QualityUtils.java b/java/src/org/broadinstitute/sting/utils/QualityUtils.java index 272b47e01..a465825aa 100755 --- a/java/src/org/broadinstitute/sting/utils/QualityUtils.java +++ b/java/src/org/broadinstitute/sting/utils/QualityUtils.java @@ -78,7 +78,7 @@ public class QualityUtils { } 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) {