Snakemake MissingOutputException 延迟等待被忽略

Snakemake MissingOutputException latency-wait ignored

我正在尝试 运行 在 snakemake 中收集一些 picard 工具指标。 --dry运行 工作正常,没有错误。当我实际上 运行 蛇文件时,由于我不明白的原因,我收到了 MissingOutputException。

首先是我的规则

rule CollectAlignmentSummaryMetrics:
    input:
        "bam_input/final/{sample}/{sample}.ready.bam"
    output:
        "bam_input/final/{sample}/metrics/{reference}/alignment_summary.metrics"
    params:
        reference=config['reference']['file'],
        memory="10240m"
    run:
        "java -Xmx{params.memory} -jar $HOME/software/picard/build/libs/picard.jar CollectAlignmentSummaryMetrics R={params.reference} I={input} O={output}"

现在是错误。

snakemake --latency-wait 120 -s metrics.snake -p
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
        count   jobs
        38      CollectAlignmentSummaryMetrics
        1       all
        39

rule CollectAlignmentSummaryMetrics:
    input: bam_input/final/TB5173-T14/TB5173-T14.ready.bam
    output: bam_input/final/TB5173-T14/metrics/GRCh37/alignment_summary.metrics
    jobid: 7
    wildcards: reference=GRCh37, sample=TB5173-T14

Error in job CollectAlignmentSummaryMetrics while creating output file bam_input/final/TB5173-T14/metrics/GRCh37/alignment_summary.metrics.
MissingOutputException in line 21 of/home/bwubb/projects/PD1WES/metrics.snake:
Missing files after 5 seconds:
bam_input/final/TB5173-T14/metrics/GRCh37/alignment_summary.metrics
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Exiting because a job execution failed. Look above for error message
Will exit after finishing currently running jobs.
Exiting because a job execution failed. Look above for error message

--latency-wait 被完全忽略。我什至尝试将其提高到 84600。如果我要 运行 预期的 picard java 命令,它执行没有问题。我做了几个没有任何神秘问题的 snakemake 管道,所以这让我很生气。感谢您的任何见解!

感谢报告。

  1. 使用 run 指令时,延迟等待不会传播,这是一个错误。我已经在 master 分支中修复了它。
  2. 在您的规则中,您使用了 run 指令。在 run 之后,Snakemake 需要纯 Python 代码。您只需提供一个字符串。这意味着 Python 将简单地初始化 String 然后退出。您真正想要的是使用 shell 指令。参见 here。通过使用 shell 指令,您当前的问题将得到修复,您应该不会受到该错误的影响。也不需要修改latency-wait。无论如何,延迟等待错误的修复将在 Snakemake 的下一个版本中出现。