Snakemake' MissingOutputException'

时间:2018-04-12 19:22:27

标签: snakemake

输入:一个Snakefile,它使用SSP软件计算排序数据的各种质量指标。 SSP的输入是BAM文件。

sample1.sorted.bam

输出:各种文件,但我唯一关心的是名为{prefix}.stats.txt的文件。

sample1.stats.txt

Snakefile:($ SCIF_DATA = / scif / data)

configfile: "config.yaml"
workdir: "/scif/data"

# define samples
SAMPLES, = glob_wildcards("raw_data/{sample}.fastq.gz")

rule all:
    input:
        expand("processed_data/qc/{sample}/{sample}.stats.txt", sample=SAMPLES),

rule quality_metrics:
    input:
        "processed_data/{sample}.sorted.bam"
    params:
        prefix="{sample}",
        gt="raw_data/hg38.chrom.sizes"
    output:
        "processed_data/qc/{sample}/{sample}.stats.txt"
    shell:
        "scif run ssp '-i $SCIF_DATA/{input} -o {params.prefix} --gt {params.gt} -p 50 --odir $SCIF_DATA/{params.prefix}'"

当我在终端上运行ssp '-i sample1.sorted.bam -o sample1 --gt {params.gt} -p 50 --odir sample1时,我得到了正确的输出:

{path}/sample1/sample1.stats.txt

然而,当我运行我的snakemake工作流程时,我收到以下错误:

Waiting at most 5 seconds for missing files.
MissingOutputException in line 58 of /scif/data/Snakefile:
Missing files after 5 seconds:
processed_data/qc/THP-1_PU1-cMyc_PU1_sc_S40_R1_001/THP-1_PU1-cMyc_PU1_sc_S40_R1_001.stats.txt
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.
Shutting down, this might take some time.

增加延迟等待时间无济于事。

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

我认为你缺少前缀

中输出路径的一部分
params:
    prefix="processed_data/qc/{sample}"