From ef680e1e13864bead13767c82b20bdd6e304237f Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Mon, 24 Sep 2012 11:14:18 -0400 Subject: [PATCH] RR fix: push the header removal all the way into the inner loops so that we literally remove a read from the general header only if it was added to the polyploid header. Add comments. --- .../gatk/walkers/compression/reducereads/SlidingWindow.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SlidingWindow.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SlidingWindow.java index 997eca1ed..d55560a70 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SlidingWindow.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SlidingWindow.java @@ -696,10 +696,11 @@ public class SlidingWindow { currentHaplotype++; } LinkedList header = read.getReadNegativeStrandFlag() ? headersNegStrand.get(haplotype) : headersPosStrand.get(haplotype); + // add to the polyploid header addToHeader(header, read); + // remove from the standard header so that we don't double count it + removeFromHeader(windowHeader, read); } - - removeFromHeader(windowHeader, read); } }