From 275575462f9bf708d223c9ba497e5908a6deced9 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 26 Dec 2012 15:46:21 -0500 Subject: [PATCH] Protect against non-standard ref bases. Ryan, please review. --- .../walkers/haplotypecaller/LikelihoodCalculationEngine.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java index 59f241cdb..e1a1ed6d2 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java @@ -120,6 +120,11 @@ public class LikelihoodCalculationEngine { for( int jjj = 0; jjj < numHaplotypes; jjj++ ) { final Haplotype haplotype = haplotypes.get(jjj); + + // TODO -- need to test against a reference/position with non-standard bases + if ( !Allele.acceptableAlleleBases(haplotype.getBases(), false) ) + continue; + final int haplotypeStart = ( previousHaplotypeSeen == null ? 0 : computeFirstDifferingPosition(haplotype.getBases(), previousHaplotypeSeen.getBases()) ); previousHaplotypeSeen = haplotype;