Snakemake version
6.15.5
Describe the bug
A derived rule overwrites fields like input and output. If the input and output file is written on the same line as the input keyword, the rule fails to parse.
Minimal example
rule copyfile:
input: "src1.txt"
output: "src1_cp.txt"
shell: "cp -v {input} {output}"
use rule copyfile as copyfile2 with:
input: "src2.txt"
output: "src2_cp.txt"
This snakefile fails to parse the rule with the following error
SyntaxError in line 9 of /home/pathto/Snakefile:
Expecting a keyword or comment inside a 'use rule ... with:' statement. (Snakefile, line 9)
If the in- and outputs are written on separate lines like this, the rule can be parsed:
rule copyfile:
input: "src1.txt"
output: "src1_cp.txt"
shell: "cp -v {input} {output}"
use rule copyfile as copyfile2 with:
input:
"src2.txt"
output:
"src2_cp.txt"
Snakemake version
6.15.5
Describe the bug
A derived rule overwrites fields like input and output. If the input and output file is written on the same line as the input keyword, the rule fails to parse.
Minimal example
This snakefile fails to parse the rule with the following error
If the in- and outputs are written on separate lines like this, the rule can be parsed: