Skip to content

-x sr is silently identical to -x adap - #63

Closed
nh13 wants to merge 1 commit into
lh3:masterfrom
nh13:fix/sr-preset-adap-flag
Closed

-x sr is silently identical to -x adap#63
nh13 wants to merge 1 commit into
lh3:masterfrom
nh13:fix/sr-preset-adap-flag

Conversation

@nh13

@nh13 nh13 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

-x sr gives identical output to -x adap. mb_opt_preset sets MB_F_ADAP unconditionally two lines below the gated set that r234 added when it separated the two presets, so both end up at flag 0x4048 and sr is unreachable. The man page has adap as -xsr --adap=yes, which is not currently true.

Deleting the stray line restores sr. Two no-ops go with it: mb_opt_preset resets opt on entry, so the mb_opt_reset in mb_opt_init and the ~MB_F_PE in the lr branch do nothing. Drop those two if you prefer the one-line fix.

On 1M HG002 WGS pairs, -x adap is byte-identical to before; -x sr moves 0.11% of pairs, 69% of them at MAPQ <= 1.

If you meant the two presets to stay identical, the gated line should go instead and the man page needs correcting.

MB_F_ADAP was set unconditionally, overriding the conditional added in r234.
Also drop two statements made dead by the reset in mb_opt_preset().
@lh3 lh3 closed this in baebcef Aug 10, 2026
@lh3 lh3 added the bug Something isn't working label Aug 10, 2026
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 this pull request may close these issues.

2 participants