-
Notifications
You must be signed in to change notification settings - Fork 633
Snakefile parser fails to parse derived rule #1596
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working