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?