From 13c800417e5a8d7054315c70b09f2b1325a310d7 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Tue, 17 Apr 2012 15:51:23 -0400 Subject: [PATCH] Handle NPE in UG indel code: deletions immediately preceding insertions were not handled well in the code. --- .../sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java index b9422b6e5..e64a4f42d 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java @@ -146,6 +146,10 @@ public class ConsensusAlleleCounter { String indelString = p.getEventBases(); if ( p.isBeforeInsertion() ) { + // edge case: ignore a deletion immediately preceding an insertion as p.getEventBases() returns null [EB] + if ( indelString == null ) + continue; + boolean foundKey = false; // copy of hashmap into temp arrayList ArrayList> cList = new ArrayList>();