From f2b34d08235baa9b9352fecb0c498d03dd935cc2 Mon Sep 17 00:00:00 2001 From: Geraldine Van der Auwera Date: Thu, 30 Apr 2015 01:37:20 +0200 Subject: [PATCH] Clamp the HMM window starting coordinate to 1 instead of 0 --- .../src/main/java/org/broadinstitute/gatk/utils/baq/BAQ.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/gatk-utils/src/main/java/org/broadinstitute/gatk/utils/baq/BAQ.java b/public/gatk-utils/src/main/java/org/broadinstitute/gatk/utils/baq/BAQ.java index f40ef1c51..c679ec248 100644 --- a/public/gatk-utils/src/main/java/org/broadinstitute/gatk/utils/baq/BAQ.java +++ b/public/gatk-utils/src/main/java/org/broadinstitute/gatk/utils/baq/BAQ.java @@ -525,7 +525,7 @@ public class BAQ { // start is alignment start - band width / 2 - size of first I element, if there is one. Stop is similar int offset = getBandWidth() / 2; long readStart = includeClippedBases ? read.getUnclippedStart() : read.getAlignmentStart(); - long start = Math.max(readStart - offset - ReadUtils.getFirstInsertionOffset(read), 0); + long start = Math.max(readStart - offset - ReadUtils.getFirstInsertionOffset(read), 1); long stop = (includeClippedBases ? read.getUnclippedEnd() : read.getAlignmentEnd()) + offset + ReadUtils.getLastInsertionOffset(read); if ( stop > refReader.getSequenceDictionary().getSequence(read.getReferenceName()).getSequenceLength() ) {