Fixing BQSR bug reported on the forum for reads that being with insertions.
This commit is contained in:
parent
365f1d2429
commit
b3cc04976f
|
|
@ -197,15 +197,15 @@ public class BaseRecalibrator extends LocusWalker<Long, Long> implements TreeRed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean readHasBeenSkipped(GATKSAMRecord read) {
|
private boolean readHasBeenSkipped( final GATKSAMRecord read ) {
|
||||||
return read.containsTemporaryAttribute(SKIP_RECORD_ATTRIBUTE);
|
return read.containsTemporaryAttribute(SKIP_RECORD_ATTRIBUTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isLowQualityBase(GATKSAMRecord read, int offset) {
|
private boolean isLowQualityBase( final PileupElement p ) {
|
||||||
return read.getBaseQualities()[offset] < minimumQToUse;
|
return p.getQual() < minimumQToUse;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean readNotSeen(GATKSAMRecord read) {
|
private boolean readNotSeen( final GATKSAMRecord read ) {
|
||||||
return !read.containsTemporaryAttribute(SEEN_ATTRIBUTE);
|
return !read.containsTemporaryAttribute(SEEN_ATTRIBUTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,7 +225,7 @@ public class BaseRecalibrator extends LocusWalker<Long, Long> implements TreeRed
|
||||||
final GATKSAMRecord read = p.getRead();
|
final GATKSAMRecord read = p.getRead();
|
||||||
final int offset = p.getOffset();
|
final int offset = p.getOffset();
|
||||||
|
|
||||||
if (readHasBeenSkipped(read) || isLowQualityBase(read, offset)) // This read has been marked to be skipped or base is low quality (we don't recalibrate low quality bases)
|
if (readHasBeenSkipped(read) || isLowQualityBase(p)) // This read has been marked to be skipped or base is low quality (we don't recalibrate low quality bases)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (readNotSeen(read)) {
|
if (readNotSeen(read)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue