From 2ac5c522814b82c17d1c6ad3214b25ad75ac083a Mon Sep 17 00:00:00 2001 From: ebanks Date: Thu, 6 Jan 2011 15:44:02 +0000 Subject: [PATCH] Better error message as per Mark git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4953 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java index 7fdb997d0..ea7fde2d8 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java @@ -331,7 +331,7 @@ public class DiploidSNPGenotypeLikelihoods implements Cloneable { int i = BaseUtils.simpleBaseToBaseIndex(observedBase); int j = qualityScore; if ( j > SAMUtils.MAX_PHRED_SCORE ) - throw new UserException.MalformedBam(read, String.format("the maximum allowed quality score is %d, but a quality of %d was observed in read %s", SAMUtils.MAX_PHRED_SCORE, j, read.getReadName())); + throw new UserException.MalformedBam(read, String.format("the maximum allowed quality score is %d, but a quality of %d was observed in read %s. Perhaps your BAM incorrectly encodes the quality scores in Sanger format; see http://en.wikipedia.org/wiki/FASTQ_format for more details", SAMUtils.MAX_PHRED_SCORE, j, read.getReadName())); int k = ploidy; int x = strandIndex(! read.getReadNegativeStrandFlag() ); @@ -343,7 +343,7 @@ public class DiploidSNPGenotypeLikelihoods implements Cloneable { int i = BaseUtils.simpleBaseToBaseIndex(observedBase); int j = qualityScore; if ( j > SAMUtils.MAX_PHRED_SCORE ) - throw new UserException.MalformedBam(read, String.format("the maximum allowed quality score is %d, but a quality of %d was observed in read %s", SAMUtils.MAX_PHRED_SCORE, j, read.getReadName())); + throw new UserException.MalformedBam(read, String.format("the maximum allowed quality score is %d, but a quality of %d was observed in read %s. Perhaps your BAM incorrectly encodes the quality scores in Sanger format; see http://en.wikipedia.org/wiki/FASTQ_format for more details", SAMUtils.MAX_PHRED_SCORE, j, read.getReadName())); int k = ploidy; int x = strandIndex(! read.getReadNegativeStrandFlag() ); return cache[i][j][k][x];