When upgrading to snakemake >=9.11.9 a workflow that worked in the past started failing with: Empty file path encountered. This is likely unintended.
We were setting the input file path to only be non-empty when the rule was actually being used. In the past this was fine. But this PR #3769 changed that behavior at a minor version increment.
Our code looked like this (over at nextstrain/mpox):
rule add_private_data:
"""
This rule is conditionally added to the DAG if a config defines 'private_sequences' and 'private_metadata'
"""
input:
sequences=build_dir + "/{build_name}/good_sequences.fasta",
metadata=build_dir + "/{build_name}/good_metadata.tsv",
private_sequences=config.get("private_sequences", ""),
private_metadata=config.get("private_metadata", ""),
https://github.com/nextstrain/mpox/blame/906b020667d33b6570f950d148bc44da98683425/phylogenetic/rules/prepare_sequences.smk#L66-L75
When upgrading to snakemake >=9.11.9 a workflow that worked in the past started failing with:
Empty file path encountered. This is likely unintended.We were setting the input file path to only be non-empty when the rule was actually being used. In the past this was fine. But this PR #3769 changed that behavior at a minor version increment.
Our code looked like this (over at nextstrain/mpox):
https://github.com/nextstrain/mpox/blame/906b020667d33b6570f950d148bc44da98683425/phylogenetic/rules/prepare_sequences.smk#L66-L75