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

Add support to force global / glocal / end-to-end alignment #64

Open
tseemann opened this issue Apr 29, 2016 · 0 comments
Open

Add support to force global / glocal / end-to-end alignment #64

tseemann opened this issue Apr 29, 2016 · 0 comments

Comments

@tseemann
Copy link

@lh3 Heng,

I am writing in the hope that you will consider adding a -g option to force global (really glocal, or end-to-end) alignment in BWA MEM.

I understand that BWA MEM currently will attempt to return a global alignment if the score is "close" to the best local alignment (based on the -L clipping penalties), otherwise prefers local alignment and puts soft clips in the SAM file.

There are cases where I want to force global alignment. For example, correcting an assembly with the same reads that generated the assembly, where naively passing BWA MEM output will sometimes result in false SNPs.

I had thought that just setting -L 99999,99999 might produce my desired behaviour, but it doesn't - probably due to the if (gscore <= 0 conditional in these lines:

https://github.com/lh3/bwa/blob/master/bwamem.c#L736
https://github.com/lh3/bwa/blob/master/bwamem.c#L764

I tried forcing that with a patch but it didn't seem to make a difference. My attempt was probably naive so I am hoping you can help / advise here!

Torsten

CC: @drpowell

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