You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
@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 theif (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
The text was updated successfully, but these errors were encountered: