我有一个简单的规则可以在Snakemake中生成文件。运行snakemake会导致立即错误,即使将--latency-wait
指定为命令行选项,它也无法找到生成的文件。
但是,这似乎是与延迟相关的问题,因为此Snakefile在本地计算机上运行没有问题。以下输出是在存在已知延迟问题的系统上。
Snakefile的内容:
rule generate_file:
output:
"dummy.txt"
shell:
"head --bytes 1024 < /dev/zero | base64 > '{output}'; ls"
命令:
$ snakemake --version
5.2.0
$ snakemake -p --latency-wait 10
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
count jobs
1 generate_file
1
rule generate_file:
output: dummy.txt
jobid: 0
head --bytes 1024 < /dev/zero | base64 > 'dummy.txt'; ls
dummy.txt Snakefile
MissingOutputException in line 1 of /home/user/project/Snakefile:
[Errno 2] No such file or directory: ''
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Removing output files of failed job generate_file since they might be corrupted:
dummy.txt
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /home/user/project/.snakemake/log/2018-08-08T101648.774072.snakemake.log
有趣的是,ls
命令显示文件已创建并且可见。
答案 0 :(得分:0)
在与snakemake版本5.2.2和linux一起使用时,您的规则将创建输出文件dummy.txt
,snakemake成功结束。也许这是5.2.0版中的错误?我在change logs中什么都没看到。
相关说明,在result in non-zero exit status
error所使用的shell命令中使用head
。显然,新版本在这方面表现有所不同。