1mpe7us
1mpe7us

Reputation: 35

MissingOutputException in Snakemake workflow

So I have the following snakemake rule:

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}"

When I run it, it starts executing successfully, generates the HTML files and then the workflow throws the following error

 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.

I can actually see the files and even open them, also tried --latency-wait 120 but it does not make any difference, keeps throwing the error. I am very new to Snakemake so I am not sure what else to do with it.

Upvotes: 0

Views: 287

Answers (1)

dariober
dariober

Reputation: 9062

A couple of thoughts... I think fastqc gives output with suffix _fastqc.html so you should have files named ../../data/interim/A_R1_fastqc.html instead of ../../data/interim/A_R1.html.

Still, if you say the files are there snakemake shouldn't complain. For the sake of debugging, try to replace the relative paths with the absolute ones (i.e., use /path/to/data/interim/{sample}_{read}.html). It may be that the output directory you expect is not the one snakemake is using.

Also, run snakemake with option -p so you see exactly what files it is using in input/output.

Upvotes: 1

Related Questions