Proper fix for a previous RR bug fix: only remove reads from the header if they were actually used in the creation of the polyploid consensus.

This commit is contained in:
Eric Banks 2012-09-23 00:39:19 -04:00
parent 74bb4e2739
commit 0187f04a90
1 changed files with 3 additions and 1 deletions

View File

@ -698,8 +698,11 @@ public class SlidingWindow {
LinkedList<HeaderElement> header = read.getReadNegativeStrandFlag() ? headersNegStrand.get(haplotype) : headersPosStrand.get(haplotype);
addToHeader(header, read);
}
removeFromHeader(windowHeader, read);
}
}
// we remove all reads before and inside the variant region from the window
toRemove.add(read);
}
@ -719,7 +722,6 @@ public class SlidingWindow {
}
for (GATKSAMRecord read : toRemove) {
removeFromHeader(windowHeader, read);
readsInWindow.remove(read);
}
return hetReads;