问题描述
在缺少输入的情况下,snakemake是否有一种类似于make的行为? snakemake的当前行为是错误还是功能?
$ ls
b Makefile Snakefile
$ cat Makefile
b: a
touch b
a:
touch a
$ make -n
touch a
touch b
$ cat Snakefile
rule b:
input: "a"
output: touch("b")
rule a:
output: touch("a")
$ snakemake -n
Building DAG of jobs...
Nothing to be done.
$ snakemake -v
5.20.1
解决方法
在您的情况下,a
只是生成b
的中间输出。由于b
已经存在,因此Snakefile将什么也不做。
您可以使用-F
参数调用snakemake来重做中间步骤
snakemake -n -F
或定义将a
和b
都指定为最终输出的目标规则
rule all:
input: "a","b"
rule b:
input: "a"
output: touch("b")
rule a:
output: touch("a")