-
Notifications
You must be signed in to change notification settings - Fork 406
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
Allow build-specific --narrow-bandwidth param in frequencies #1130
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -983,13 +983,30 @@ columns | |
|
||
frequencies | ||
----------- | ||
- Valid attributes: | ||
- type: object | ||
- description: Parameters for specifying tip frequency calculations via ``augur frequencies`` | ||
- examples: | ||
|
||
.. code:: yaml | ||
|
||
frequencies: | ||
pivot_interval_units: "weeks" | ||
default: | ||
min_date: "6M" | ||
narrow_bandwidth: 0.038 | ||
global_1m: | ||
min_date: "1M" | ||
narrow_bandwidth: 0.019 | ||
global_2020_to_2022: | ||
min_date: "2020-01-01" | ||
max_date: "2022-01-01" | ||
narrow_bandwidth: 0.076 | ||
|
||
Each named traits configuration (``default`` or build-named) supports specification of ``min_date``, ``max_date`` and ``narrow_bandwidth``. Other parameters can only be specified across all builds. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (non-blocking) Would it be worth allowing build-specific Obviously beyond the scope this PR – I could take this or at least make an issue to start it off. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Totally. Ideally, every entry in I think maybe more important than making this work for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's definitely been a lot of discussions around build configs outside of |
||
|
||
.. contents:: | ||
:local: | ||
|
||
.. _min_date-1: | ||
|
||
min_date | ||
~~~~~~~~ | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is now defined in two places: the config file (where this comment is added) and in the workflow:
ncov/workflow/snakemake_rules/common.smk
Line 203 in 6458357
Since all workflow invocations¹ source from
defaults/parameters.yaml
, the default value defined incommon.smk
never gets used. I suggest removing it:¹ under expected usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I liked having workflow default in addition to the parameters.yaml default. As you point out this redundancy also exists for
frequencies.narrow_bandwidth
.But perhaps I understand your concern, where by having multiple layers of "defaults" it might add confusion. It would be nice if people could look just at
parameters.yaml
to understand defaults rather than digging into the workflow.I think the original push for adding workflow redundancy here was that
parameters.yaml
(still) doesn't includerecent_days_to_censor
and if we start looking for it in the workflow and people are stilling using oldparameters.yaml
files then things will break.I think we need a broader pattern to adhere to here (kind of like the conversion in issue #1131). I'm not immediately sure what's best for this specific PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with external usage of ncov so I appreciate the thoughts here.
Since
parameters.yaml
is under version control, shouldn't it be sufficient to have workflow changes +parameters.yaml
changes (addingrecent_days_to_censor
) in the same PR? If someone pulls the workflow changes, they'll also pull the defaultrecent_days_to_censor
inparameters.yaml
. I can think of a few possibilities where breakage might happen:User has made custom changes to
parameters.yaml
.git pull
will try to auto-merge and and flag any merge conflicts.User has explicitly removed this line from Snakefile:
ncov/Snakefile
Line 42 in 82ca8d4
User is using a profile that does not source from
parameters.yaml
, i.e. missing this line:ncov/nextstrain_profiles/nextstrain-open/config.yaml
Lines 1 to 2 in 82ca8d4
This seems the most likely for external usage, and I believe it's one of the reasons why we now recommend
--configfile
over--profile
nowadays.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The broader pattern seems to be having a default in
parameters.yaml
+ direct access in Snakemake. This is how it's done for other config:ncov/workflow/snakemake_rules/main_workflow.smk
Lines 1165 to 1168 in 8399290
ncov/defaults/parameters.yaml
Lines 143 to 152 in 8399290
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thoughts. I agree with your logic. Though I would like to push the fixes to a separate PR.