Context
This was flagged during a dengue PR for setting a fixed clock_rate in nextstrain/dengue#123 (comment)
When using an overlay config to override/remove the default config for clock_rate:
refine:
clock_rate:
all:
genome: null # To override/remove the default param
The current behavior is that null is not equal to "" and will result in a strange clock rate flag
nextstrain build . auspice/dengue_all_genome.json -np | grep refine
# --clock-rate None
Checking against None fixes this behavior such that there is no --clock-rate flag whatsoever.
Description
Add the same change as nextstrain/dengue@411afae
Change:
|
clock_rate = config['refine']['clock_rate'].get(wildcards.group, {}).get(wildcards.gene, "") |
|
if clock_rate !="": |
|
return f' --clock-rate {clock_rate} ' |
|
else: |
|
return "" |
To:
clock_rate = config['refine']['clock_rate'].get(wildcards.group, {}).get(wildcards.gene, None)
if clock_rate is not None:
return f' --clock-rate {clock_rate} '
else:
return ""
Examples
Possible solution
(Optional)
Context
This was flagged during a dengue PR for setting a fixed clock_rate in nextstrain/dengue#123 (comment)
When using an overlay config to override/remove the default config for clock_rate:
The current behavior is that
nullis not equal to "" and will result in a strange clock rate flagChecking against
Nonefixes this behavior such that there is no --clock-rate flag whatsoever.Description
Add the same change as nextstrain/dengue@411afae
Change:
norovirus/phylogenetic/rules/construct_phylogeny.smk
Lines 55 to 59 in fcdee32
To:
Examples
Possible solution
(Optional)