snakemake 的时间延迟

Time latency for snakemake

我有这个规则:

rule Bam_coverage:
    input: "ALIGN/result/{case}_filter_dup.bam"
    output: "result/{case}.bw"
    params: genome=config['reference']['genome_fasta'],
            name=lambda wildcards, input: input[0][:-4]
    threads: 6
    log: "log/{case}.bamcoverage.report.txt"
    conda:
         "envs/deeptools.yaml"
    shell:
        """
         bamCoverage -b  {input}  -o {output} -of bigwig -bs 50 -p {threads}  &2> {log}
        """

当我启动 snakemake 时程序运行,但 snakemake 给我这个错误:

Error in job Bam_coverage while creating output file result/MB.neg.27ac_27ac.bw.

MissingOutputException in line 21 of /home/maurizio/Desktop/TEST_chip/rules/deeptools.rules:
Missing files after 60 seconds:
result/MB.neg.27ac_27ac.bw
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Will exit after finishing currently running jobs.

但是,该程序在后台运行,并在一段时间后写入文件。 怎么了?

您将命令置于后台,最后带有 &2>(bash 将 & 解释为分叉运算符)。你的意思是 > {log} 2>&1 (即,将 stderr 重定向到 stdout)。