Skip to content

Commit fd4f19f

Browse files
jkbonfieldpd3
authored andcommitted
Don't change indel qual when indelQ == 0.
For an alignment that doesn't have an indel but is aligned against reads that do have an indel, the indel quality comes from the BAM quality. However we already have indelQ assigned, so this avoids changing to BAM qual if indelQ is zero as that is a special case for a read aligning to multiple indel "types" (lengths) with equal score. This avoids excess AD numbers for poorly chosen alignments. Fixes #2113
1 parent 1ea5112 commit fd4f19f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bam2bcf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ int bcf_call_glfgen(int _n, const bam_pileup1_t *pl, int ref_base, bcf_callaux_t
314314
if (bca->edlib) {
315315
if (indel_in_sample) {
316316
seqQ = q = (p->aux & 0xff); // mp2 + builtin indel-bias
317-
} else {
317+
} else if (p->aux & 0xff) {
318318
// An indel in another sample, but not this. So just use
319319
// basic sequence confidences.
320320
q = bam_get_qual(p->b)[p->qpos];

0 commit comments

Comments
 (0)