I am not getting why snakemake is not able to identify the dependencies in this simple example. I am expecting that it identify that the input of main
is generated in simulation
and the inputs of the last one in setup
. However, it looks like it is not the case. Th idea of this “rule architecture” is to parallelise at simulation
level.
root_path = 'a'
names = ['A', 'B', 'C']
rule main:
input:
"final.result"
run:
pass
rule setup:
output:
ABC = expand(root_path + "/{name}/prod.abc", name=names)
run:
pass
rule simulation:
input:
ABC = root_path + "/{name}/prod.abc"
output:
"final.result"
run:
pass
snakemake --dag
The last command will return:
Building DAG of jobs...
WildcardError in rule simulation in file /Users/klimt/test/Snakefile, line 19:
Wildcards in input files cannot be determined from output files:
'name'