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

Fix subsampling_scheme min-date and max-date parameters bug. #886

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abattenhouse
Copy link

Description of proposed changes

The min-date and max-date subsampling_scheme parameters do not work properly. This 4-line addition to the _get_setting fundtion in the main_workflow.smk file fixes the problem.

Related issue(s)

None that I know of.

Testing

I ran into the problem when I specified a min-date parameter in one of my custom Nextstrain builds. After I made this proposed change it works fine.

Release checklist

Should not introduce backward incompatible changes since this functionality did not work before.

Copy link
Contributor

@huddlej huddlej left a comment

Choose a reason for hiding this comment

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

Hi @abattenhouse, thank you for submitting this! The min and max date parameters in ncov's filter logic don't behave like you'd expect due to an implementation choice we made at the beginning of the pandemic that we were then unable to change without breaking everyone's workflows.

The min/max date filters should work when defined like min_date: --min-date 2020-01-01, for example, instead of (like you'd expect) min_date: 2020-01-01. The SARS-CoV-2 workflow configuration guide provides some examples and more details. You can also find some real world examples in our Nextstrain builds (like this one).

Can you try running your builds with the original workflow (so not the code in this branch) and using the format from the examples linked to above for your min/max dates and let us know if that fixes the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

None yet

2 participants