Skip to content

Change the meaning of the -l and -u command-line parameters#525

Merged
marcelm merged 1 commit intomainfrom
l-and-u
Oct 17, 2025
Merged

Change the meaning of the -l and -u command-line parameters#525
marcelm merged 1 commit intomainfrom
l-and-u

Conversation

@marcelm
Copy link
Copy Markdown
Collaborator

@marcelm marcelm commented Oct 14, 2025

They are now used to directly set w_min and w_max instead of the previous (confusing) interpretation.

The names w_min and w_max are still used in the code at the moment, mostly in order to avoid doing too many things at the same time, but also because w_min and w_max is a bit clearer than l and u.

Note that this will be confusing for existing scripts; they need to be adjusted.

  • Changelog entry

They are now used to directly set w_min and w_max instead of the previous
(confusing) interpretation.

The names w_min and w_max are still used in the code at the moment, mostly
in order to avoid doing too many things at the same time, but also because
w_min and w_max is a bit easier to read than l and u.

This will be confusing for existing scripts!
Comment thread src/arguments.hpp
, l{parser, "INT", "Lower syncmer offset from k/(k-s+1). Start sample second syncmer k/(k-s+1) + l syncmers downstream [0]", {'l'}}
, u{parser, "INT", "Upper syncmer offset from k/(k-s+1). End sample second syncmer k/(k-s+1) + u syncmers downstream [7]", {'u'}}
, k{parser, "INT", "Syncmer (strobe) length, has to be below 32. [20]", {'k'}}
, l{parser, "INT", "Start of sampling window for second syncmer (i.e., second syncmer must be at least l syncmers downstream). [5]", {'l'}}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 4 as the default value? 20/(20 (20-16+1) + 0 = 4.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the help text was wrong: The actual default in main for the 150 nt profile is -l 1, not -l 0.

I wanted to avoid making mistakes here, so I ran strobealign with all the canonical read lengths and looked at the log output to get the correct w_min and w_max values. Maybe I should run one last test to verify that they are the same now after the change.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. good!

Comment thread src/indexparameters.cpp
Profile{ 75, 90, 20, -4, 1, 6},
Profile{100, 110, 20, -4, 2, 6},
Profile{125, 135, 20, -4, 3, 8},
Profile{150, 175, 20, -4, 5, 11},
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Profile{150, 175, 20, -4, 5, 11}, should then be Profile{150, 175, 20, -4, 4, 11}, The error could have propagated to other profiles (didn't check).

@ksahlin
Copy link
Copy Markdown
Owner

ksahlin commented Oct 14, 2025

Since my comments are likely wrong and you have done a check I approve.

@marcelm marcelm merged commit 02e3d26 into main Oct 17, 2025
11 checks passed
@marcelm marcelm deleted the l-and-u branch October 17, 2025 06:38
marcelm added a commit that referenced this pull request Oct 17, 2025
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

Successfully merging this pull request may close these issues.

2 participants