Snakemake:使用集群时缺少文件操作数

Snakemake: missing file operand when using cluster

我正在 PBS 集群 (PBSpro) 上部署 snakemake 工作流程。我 运行 遇到一个问题,集群节点上的 shell 命令 运行 由于 shell 命令缺少 arguments/operands 而失败。下面是一个可以重现我所看到的行为的最小示例:

rule all:
    input: 'foo.txt'

rule run_foo:
    output: 'foo.txt'
    shell: 'touch {output}'

运行 从命令行为:

snakemake all

工作流 运行 已完成,没有任何错误。但是,命令行中的 运行 为:

snakemake all --jobs 1 --cluster "qsub -l select=1:ncpus=1 -l walltime=00:05:00 -A $PROJECT -q share -j oe"

工作流失败并生成如下所示的集群日志:

Error: Image not found
Error in job run_foo while creating output file foo.txt.
RuleException:
CalledProcessError in line 7 of /glade2/scratch2/jhamman/Snakefile:
Command 'touch foo.txt' returned non-zero exit status 1.
  File "/glade2/scratch2/jhamman/Snakefile", line 7, in __rule_run_foo
  File "/glade/u/home/jhamman/anaconda/envs/storylines/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Exiting because a job execution failed. Look above for error message

似乎正在发生的事情是命令的参数(在本例中 touch)没有应用,尽管列出了回溯。

是否有通过 snakemake 将 shell 命令传递到集群的技巧,我错过了?

事实证明,我使用的是相当旧的 snakemake 版本。出于某种原因,conda 固定了我的版本。无论如何,手动升级到最新稳定版本的 snakemake 似乎已经解决了这个问题。