lh3 / bwa

Burrow-Wheeler Aligner for short-read alignment (see minimap2 for long-read alignment)
GNU General Public License v3.0
1.54k stars 557 forks source link

unexpected high quality scores with chimeric SA alternatives reported #428

Closed Dmitry-Antipov closed 3 months ago

Dmitry-Antipov commented 3 months ago

Noticed that some low quality reads may still have high alignment quality values reported by bwa. For example here we have a chimeric alternative alignment reported, with same amount of aligned bases as in primary alignment, but the qual is still 60

A00675:75:H5CNNDSXY:1:1101:32127:29606 113 utig4-1646 2173421 60 43S40M68S utig4-1666 2218825 0 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCTTTTCAAGCAGAAGACGGCATACGCGATAGTACTGGTGACTGGAGTTCAGACGTGTGCTCTTCCGATC FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,:,FFFF,:F,:F::F:FFFFFFFF,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFF:F NM:i:0 MD:Z:40 MC:Z:75M76S AS:i:40 XS:i:25 SA:Z:utig4-1646,2173421,-,21S40M90S,0,0;utig4-56,21392969,-,39M112S,60,2;

Is it expected behavior?

lh3 commented 3 months ago

Yes, expected. All SA alignments are short and not contained in each other on the query.

Dmitry-Antipov commented 3 months ago

but the primary alignment has same 40 matches as first alternative reported in SA - it doesn't matter? as far as I see, primary cigar overlaps with first SA one, 43S40M68S and 21S40M90S

lh3 commented 3 months ago

Hits can have overlaps.