I'm using snakemake to develop a pipeline. I'm trying to create symbolic links for every file in a directory to a new target. I don't know ahead of time how many files there will be, so I'm trying to use dynamic output.
rule source:
output: dynamic('{n}.txt')
run:
source_dir = config["windows"]
source = os.listdir(source_dir)
for w in source:
shell("ln -s %s/%s source/%s" % (source_dir, w, w))
This is the error I get:
WorkflowError: "Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards."
What is the issue?
dynamic
, but the examples given in the documentation have a different way of using this than what you do: snakemake.readthedocs.io/en/stable/snakefiles/…. In particular, there is a drivingall
rule, that have the dynamic stuff as its input. Dou you have such a rule ? – bli