From 804caf7a45505f9be1c041dd42241ede1d7022c5 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Fri, 25 Jan 2013 17:23:15 -0500 Subject: [PATCH] HaplotypeCaller Optimization: return a inactive (p = 0.0) activity if the context has no bases in the pileup -- Allows us to avoid doing a lot of misc. work to set up the genotype when we don't have any data to genotype. Valuable in the case where we are passing through large regions without any data --- .../sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java index a3d764141..8b3eb9f1b 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java @@ -398,7 +398,9 @@ public class HaplotypeCaller extends ActiveRegionWalker implem return new ActivityProfileState( ref.getLocus(), tracker.getValues(UG_engine.getUAC().alleles, ref.getLocus()).size() > 0 ? 1.0 : 0.0 ); } - if( context == null ) { return new ActivityProfileState(ref.getLocus(), 0.0); } + if( context == null || context.getBasePileup().isEmpty() ) + // if we don't have any data, just abort early + return new ActivityProfileState(ref.getLocus(), 0.0); final List noCall = new ArrayList(); // used to noCall all genotypes until the exact model is applied noCall.add(Allele.NO_CALL);