From a7ff9caf546685b560f8e8f20f5a0b23f7273ab3 Mon Sep 17 00:00:00 2001 From: ebanks Date: Tue, 3 Aug 2010 05:37:17 +0000 Subject: [PATCH] Added sanity check against bad people and/or crazy big indels at edges of ref context git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3918 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/indels/IndelRealigner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java index 5091cc33f..4a814b1a0 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java @@ -767,7 +767,7 @@ public class IndelRealigner extends ReadWalker { // create a Consensus from just the indel string that falls on the reference private Consensus createAlternateConsensus(final int indexOnRef, final byte[] reference, final byte[] indelStr, final boolean isDeletion) { - if ( indexOnRef < 0 ) + if ( indexOnRef < 0 || indexOnRef >= reference.length ) return null; // create the new consensus