Improving 'properly paired' flag.
If one end has a low quality tail that happens to have a score-20 hit, the pair won't be flagged as properly paired because bwa-mem thought it has multiple hits. By filtering with -T, we won't have this problem.
This commit is contained in:
parent
740d2c1314
commit
2d01a297fb
2
bwa.1
2
bwa.1
|
|
@ -235,7 +235,7 @@ attached to every read in the output. An example is '@RG\\tID:foo\\tSM:bar'.
|
|||
.BI -T \ INT
|
||||
Don't output alignment with score lower than
|
||||
.IR INT .
|
||||
This option only affects output. [30]
|
||||
This option affects output and occasionally SAM flag 2. [30]
|
||||
.TP
|
||||
.B -a
|
||||
Output all found alignments for single-end or unpaired paired-end reads. These
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ int mem_sam_pe(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, co
|
|||
// check if an end has multiple hits even after mate-SW
|
||||
for (i = 0; i < 2; ++i) {
|
||||
for (j = 1; j < a[i].n; ++j)
|
||||
if (a[i].a[j].secondary < 0) break;
|
||||
if (a[i].a[j].secondary < 0 && a[i].a[j].score >= opt->T) break;
|
||||
is_multi[i] = j < a[i].n? 1 : 0;
|
||||
}
|
||||
if (is_multi[0] || is_multi[1]) goto no_pairing; // TODO: in rare cases, the true hit may be long but with low score
|
||||
|
|
|
|||
Loading…
Reference in New Issue