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
This commit is contained in:
Mark DePristo 2013-01-25 17:23:15 -05:00
parent 93d88cdc68
commit 804caf7a45
1 changed files with 3 additions and 1 deletions

View File

@ -398,7 +398,9 @@ public class HaplotypeCaller extends ActiveRegionWalker<Integer, Integer> 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<Allele> noCall = new ArrayList<Allele>(); // used to noCall all genotypes until the exact model is applied
noCall.add(Allele.NO_CALL);