我有这条规则:
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.
但是,程序在后台并且在一段时间后写入文件。 有什么问题?
答案 0 :(得分:1)
您将commant放入背景中,&2>
结尾(bash将&
解释为分叉运算符)。你的意思是> {log} 2>&1
(即,将stderr重定向到stdout)。