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

Bwa should not reverse the cigar when mapping a reverse complement #7

Open
nh13 opened this issue Aug 13, 2024 · 0 comments · May be fixed by #8
Open

Bwa should not reverse the cigar when mapping a reverse complement #7

nh13 opened this issue Aug 13, 2024 · 0 comments · May be fixed by #8
Assignees
Labels
bug Something isn't working

Comments

@nh13
Copy link
Member

nh13 commented Aug 13, 2024

When reverseComplement=true is passed to BwaAlnInteractive, I think the negative flag should be flipped, but not the cigar. The cigar is always relative to the top strand of the genome. I have confirmed this by mapping two reads, both reverse complements of each other, and the mapping information only differs on the strand, but not the cigar, even in the XA tag.

This occurs here and here when building the Hits. Both places call the Hit.apply method, which will reverse the cigar.

@HD	VN:1.5	SO:unsorted	GO:query
@SQ	SN:chr1	LN:10001
@PG	ID:bwa	PN:bwa	VN:0.7.17-r1198-dirty	CL:bwa aln -S miniref.fa tmp.fq
FORWARD	0	chr1	5825	0	7M1D23M	*	0	0	AAGTGCTGGATTACAGGCATGAGCCACCAC	IIIIIIIIIIIIIIIIIIIIIIIIIIIIII	XT:A:R	NM:i:1	X0:i:3	X1:i:0	XM:i:0	XO:i:1	XG:i:1	MD:Z:7^G23	XA:Z:chr1,+2090,7M1D23M,1,.;chr1,+8701,7M1D23M,1,.;	HN:i:3
REVERSE	16	chr1	5825	0	7M1D23M	*	0	0	AAGTGCTGGATTACAGGCATGAGCCACCAC	IIIIIIIIIIIIIIIIIIIIIIIIIIIIII	XT:A:R	NM:i:1	X0:i:3	X1:i:0	XM:i:0	XO:i:1	XG:i:1	MD:Z:7^G23	XA:Z:chr1,-2090,7M1D23M,1,.;chr1,-8701,7M1D23M,1,.;	HN:i:3
@nh13 nh13 added the bug Something isn't working label Aug 13, 2024
nh13 added a commit that referenced this issue Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants