From 4bc3ad2194c755462192ff781d8ada499558ea7b Mon Sep 17 00:00:00 2001 From: ebanks Date: Wed, 7 Jul 2010 20:30:22 +0000 Subject: [PATCH] Shame on me: UG was emitting negative QUALs (-0) in all_bases mode. Thanks, Matt. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3732 348d0f76-0448-11de-a6fe-93d51630548a --- .../genotyper/JointEstimateGenotypeCalculationModel.java | 2 +- .../gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java index 454be16b9..e44bfea8b 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java @@ -352,7 +352,7 @@ public abstract class JointEstimateGenotypeCalculationModel extends GenotypeCalc break; sum += log10PofDgivenAFi[indexOfMax][i]; } - phredScaledConfidence = -10.0 * sum; + phredScaledConfidence = (MathUtils.compareDoubles(sum, 0.0) == 0 ? 0 : -10.0 * sum); } } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index e50e991d4..c060673a9 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -86,7 +86,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testParameter() { HashMap e = new HashMap(); e.put( "-genotype", "0f6b11868a057db246145c98119cb8f7" ); - e.put( "-all_bases", "e45b5efc4aa285a7cebfb771da49ebe2" ); + e.put( "-all_bases", "73dc78e157881e9f19fdcb121f29a758" ); e.put( "--min_base_quality_score 26", "a132bdcd9300b6483f78bd34d99bd794" ); e.put( "--min_mapping_quality_score 26", "edce61eba0e6e65156452fe3476d6cfc" ); e.put( "--max_mismatches_in_40bp_window 5", "56d3c59532b6e81e835f55bc1135f990" );