Snakemake 工作流程中的 MissingOutputException

MissingOutputException in Snakemake workflow

所以我有以下 snakemake 规则:

SAMPLES=["A", "B"]
READS=["R1", "R2"]

rule fastqc_check:
    input:
      r1 = expand("../../data/raw/{sample}_{read}.fastq.gz",sample=SAMPLES, read=READS )
    output:
      html=expand("../../data/interim/{sample}_{read}.html", sample=SAMPLES, read=READS)
    conda:
      "../../environment.yml"
    shell: "fastqc --outdir='../../data/interim/'  {input.r1}"

当我运行它时,它开始成功执行,生成HTML文件,然后工作流抛出以下错误

 MissingOutputException in line 5 of rules/minimap2_freebayes.smk:
    Missing files after 5 seconds:
    ../../data/interim/A_R1.html
    ../../data/interim/A_R2.html
    ../../data/interim/B_R1.html
    ../../data/interim/B_R2.html
    This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.

我实际上可以看到文件,甚至可以打开它们,也试过 --latency-wait 120 但它没有任何区别,一直抛出错误。我对 Snakemake 很陌生,所以我不确定还能用它做什么。

一些想法...我认为 fastqc 给出后缀为 _fastqc.html 的输出,因此您应该将文件命名为 ../../data/interim/A_R1_fastqc.html 而不是 ../../data/interim/A_R1.html

不过,如果你说文件在那里,snakemake 应该不会抱怨。为了便于调试,尝试将相对路径替换为绝对路径(,使用/path/to/data/interim/{sample}_{read}.html)。可能是您期望的输出目录不是 snakemake 使用的目录。

此外,运行 snakemake 带有选项 -p,因此您可以准确地看到它在 input/output.

中使用的文件