【问题标题】:Snakemake: missing file operand when using clusterSnakemake:使用集群时缺少文件操作数
【发布时间】:2018-03-22 18:10:15
【问题描述】:

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

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命令传递给集群的技巧?

【问题讨论】:

  • 您能否通过 ssh 进入集群上的节点并确认 touch foo.txt 在那里工作?另外,如果您只使用--cluster "qsub" 运行会发生什么?
  • @Chris_Rands - 在这个集群上,qsub 需要上面显示的参数。没有他们,工作就会被拒绝。是的,touch foo.txt 通过直接 ssh 连接到计算节点。
  • 你能检查一下如果你在touch 命令之前echo 会发生什么吗?它是否至少为echo 产生输出?仅供参考,我使用 LSF 集群,此代码按预期工作。
  • @JeeYem - 好建议,回显 shell 行会导致空字符串。换句话说,没有其他要执行的操作。
  • 你可能想检查discussion here

标签: python shell cluster-computing pbs snakemake


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2018-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-23
    • 2021-12-29
    • 2021-09-29
    • 1970-01-01
    相关资源
    最近更新 更多