From b8cd959461ab7e55c07139f9dcaebc0851406ffd Mon Sep 17 00:00:00 2001 From: Guillermo del Angel Date: Thu, 22 Mar 2012 10:06:22 -0400 Subject: [PATCH] Potential corner condition bug fix: protect against null pointer exceptions when computing consensus indel bases when UG is discovering alt alleles. If an alt allele has non-standard bases, skip allele gracefully instead of adding null object into list --- .../genotyper/IndelGenotypeLikelihoodsCalculationModel.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java index 1b73ef1d7..21f11d2ff 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java @@ -240,6 +240,7 @@ public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihood refAllele = Allele.create(refBases, true); altAllele = Allele.create(Allele.NULL_ALLELE_STRING, false); } + else continue; // don't go on with this allele if refBases are non-standard } else { // insertion case if (Allele.acceptableAlleleBases(s)) { @@ -247,6 +248,7 @@ public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihood altAllele = Allele.create(s, false); stop = loc.getStart(); } + else continue; // go on to next allele if consensus insertion has any non-standard base. }