From 2d4b00833b3d0e26b2bf9d8f016f4001bc86fcce Mon Sep 17 00:00:00 2001 From: Guillermo del Angel Date: Sun, 9 Sep 2012 20:35:45 -0400 Subject: [PATCH] Bug fix for logging likelihoods in new read allele map: reads which were filtered out were being excluded from map, but they should be included in annotations --- .../LikelihoodCalculationEngine.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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 d04c1a9e2..69af66185 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 @@ -346,20 +346,15 @@ public class LikelihoodCalculationEngine { } } } -/* // add all filtered reads to the NO_CALL list because they weren't given any likelihoods - List readList = alleleReadMap.get(Allele.NO_CALL); - if( readList == null ) { - readList = new ArrayList(); - alleleReadMap.put(Allele.NO_CALL, readList); - } - */ - /* for( final GATKSAMRecord read : perSampleFilteredReadList.get(sample.getKey()) ) { + // add all filtered reads to the NO_CALL list because they weren't given any likelihoods + for( final GATKSAMRecord read : perSampleFilteredReadList.get(sample.getKey()) ) { // only count the read if it overlaps the event, otherwise it is not added to the output read list at all if( callLoc.overlapsP(parser.createGenomeLoc(read)) ) { - readList.add(read); + for( final Allele a : call.getFirst().getAlleles() ) + likelihoodMap.add(read,a,0.0); } } - */ + returnMap.put(sample.getKey(), likelihoodMap); }