BQSR bug fix from @nsubtil

-- Ignore SNP matches that lie outside the clipped read window
-- This fixes an issue where GATK would skip the entire read if a SNP is entirely
contained within a sequencing adapter.
This commit is contained in:
Ryan Poplin 2014-12-17 10:04:26 -05:00
parent 3deaa4832c
commit d84970ff75
1 changed files with 6 additions and 0 deletions

View File

@ -313,6 +313,12 @@ public class BaseRecalibrator extends ReadWalker<Long, Long> implements NanoSche
final boolean[] knownSites = new boolean[readLength];
Arrays.fill(knownSites, false);
for( final Feature f : features ) {
if ((f.getStart() < read.getSoftStart() && f.getEnd() < read.getSoftStart()) ||
(f.getStart() > read.getSoftEnd() && f.getEnd() > read.getSoftEnd())) {
// feature is outside clipping window for the read, ignore
continue;
}
int featureStartOnRead = ReadUtils.getReadCoordinateForReferenceCoordinate(read.getSoftStart(), read.getCigar(), f.getStart(), ReadUtils.ClippingTail.LEFT_TAIL, true); // BUGBUG: should I use LEFT_TAIL here?
if( featureStartOnRead == ReadUtils.CLIPPING_GOAL_NOT_REACHED ) {
featureStartOnRead = 0;