I'm using a run directive for a rule and would like to access a wildcard called ref. How do I do that?
I'm using a run directive for a rule and would like to access a wildcard called ref. How do I do that?
A Snakefile with the following rule demonstrates the answer provided by @maarten-vd-sande is correct:
rule a:
output: "{prefix}/{ref}/file.out"
run:
with open(output[0], "w") as out:
out.write(wildcards.ref)
Calling it like so:
snakemake prefix/reference/file.out
Results in a file with the following text:
reference