From fdaac4aa78fa9dc0b10c383f06a219746311ce74 Mon Sep 17 00:00:00 2001 From: ebanks Date: Fri, 3 Sep 2010 03:27:43 +0000 Subject: [PATCH] As the VCF guru, I'll take this one for Andrey. Someone has actually found a deletion at the beginning of the chromosome. Instead of failing with an ArrayIndexOutOfBoundsException, just don't try to print out the record. Our VCF writer doesn't really support this case (yet). git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4199 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/indels/IndelGenotyperV2Walker.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java index 16e42e8ce..77ad9a829 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java @@ -731,6 +731,12 @@ public class IndelGenotyperV2Walker extends ReadWalker { if ( event_length < 0 ) event_length = 0; long start = call.getPosition()-1; + // If the beginning of the chromosome is deleted (possible, however unlikely), it's unclear how to proceed. + // The suggestion is instead of putting the base before the indel, to put the base after the indel. + // For now, just don't print out that site. + if ( start == 0 ) + return; + long stop = start; List alleles = new ArrayList(2);