The function expand of snakemake has nothing to do with the dependencies among rules, because it is done at the initialization stage. The other function lambda, however, can use wildcards.
Therefore, it seems better to use lambda when the required files are in the middle but not at the end of workflow.
The function
expand
of snakemake has nothing to do with the dependencies among rules, because it is done at the initialization stage. The other functionlambda
, however, can use wildcards. Therefore, it seems better to use lambda when the required files are in the middle but not at the end of workflow.