Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this an wrong alignment score in bwa-mem alignment? #398

Open
huichanghuang opened this issue Aug 15, 2023 · 0 comments
Open

Is this an wrong alignment score in bwa-mem alignment? #398

huichanghuang opened this issue Aug 15, 2023 · 0 comments

Comments

@huichanghuang
Copy link

Hi,
There is a problem that comes with me when I try to understand how bwa-mem calculates the AS score.
I'm running BWA MEM (0.7.17-r1188) on paired-end reads with default parameters. I know that in default a match is 1, a mismatch is -4, a gap opening is -6, and a gap extension is -1.
However, in this read, It seems Read1 does not match this score calculation method. It has 148 alignment matches in CIGAR(which contain matches and mismatches), and from NM tag and MD tag we can know that there are 17 mismatches in this alignment, then its alignment score should be (148-17)-17*4, but it has an AS of 66, I don't know where the extra 3 points came from.

A00313:94:HTTGNDSX5:4:1430:2917:9392	99	A-seg1	1	60	2S148M	=	103	248	GGAGCAAAAGCAGGTCAATTATATTCAATATGGAAAGAATAAAAGAGCTAAGAAATCTGATGTCACAATCTCGCACTCGCGAGATACTTACCAAAACTACTGTAGACCACATGGCCATAATCAAGAAATACACATCAGGAAGACAGGAGA	:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,FFF:FFFFFFFFFFFFFFFFFFFFFFFF:FFFFFF:FFFFFFFFFFFFFFFFFF:FFFFFFFF:FFFFFFF:FFF NM:i:17	MD:Z:25G18A3C1G11G2G20G2A5C2A2G5T11T5G8G2G8A1	MC:Z:4S146M	AS:i:66	XS:i:0	RG:Z:lib_lane
A00313:94:HTTGNDSX5:4:1430:2917:9392	147	A-seg1	103	60	4S146M	=	1	-248	TGTAGACCACATGGCCATAATCAAGAAATACACATCAGGAAGACAGGAGAAAAACCCATCACTTAGGATGAAATGGATGATGGCAATGAAATACCCAATTACAGCTGATAAAAGGATAACGGAAATGATTCCTGAAAGAAATGAGCAAGG	FFFFFF:FF:FF:F:FFFFFFFFF:F,FFFFFFFFFFFFFFFFFF,FFFFFFFFFFFFFFFFF,FFFFFFFFFFFFFFFFFFF,FFFFF:FFFFFFFFFFFFF:FFFFFFF:FFFF:FFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFF NM:i:15	MD:Z:5T11T5G8G2G8A2G5G41C2T5C11A6G4G11A5	MC:Z:2S148M	AS:i:71	XS:i:0	RG:Z:lib_lane

Does anyone have any insight into why this might be the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant