So I am trying to create a Snakemake RNA-seq workflow, that begins with fastqs, aligns them with STAR and counts those with Salmon. I am having an issue with the latter: Snakemake reports the only output file as completed in the log, but states that some output files are missing, even though there are not other expected output files for this particular rule.
The relevant rules :
rule all:
input:
expand("quants/{sample}/quants.sf", sample=SAMPLES),
...
rule salmon_quant:
input:
bam="{sample}Aligned.toTranscriptome.out.bam",
trans="reference/Mus_musculus.GRCm39.transcriptome.fasta"
output:
"quants/{sample}/quants.sf"
threads: 20
params:
dir = "quants/{sample}"
shell:
"salmon quant -t {input.trans} -l ISF -p {threads} -a {input.bam} -o {params.dir}"
The beginning of Snakemake output :
Select jobs to execute...
[Thu Nov 10 11:37:33 2022]
rule salmon_quant:
input: PBS3_1ng_NEB_S17Aligned.toTranscriptome.out.bam, reference/Mus_musculus.GRCm39.transcriptome.fasta
output: quants/PBS3_1ng_NEB_S17/quants.sf
jobid: 31
reason: Missing output files: quants/PBS3_1ng_NEB_S17/quants.sf
wildcards: sample=PBS3_1ng_NEB_S17
threads: 15
resources: tmpdir=/tmp
salmon quant -t reference/Mus_musculus.GRCm39.transcriptome.fasta -l ISF -p 15 -a PBS3_1ng_NEB_S17Aligned.toTranscriptome.out.bam -o quants/PBS3_1ng_NEB_S17
Version Info: This is the most recent version of salmon.
# salmon (alignment-based) v1.9.0
the end
[2022-11-10 11:38:11.630] [jointLog] [info] writing output
Freeing memory used by read queue . . .
Joined parsing thread . . . "PBS3_1ng_NEB_S17Aligned.toTranscriptome.out.bam"
Closed all files . . .
Emptied frag queue. . .
Emptied Alignment Group Pool. .
Emptied Alignment Group Queue. . . done
Waiting at most 60 seconds for missing files.
MissingOutputException in rule salmon_quant in line 68 of /home/etheimer/Benchs/Snakefile:
Job Missing files after 60 seconds. This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait:
quants/PBS3_1ng_NEB_S17/quants.sf completed successfully, but some output files are missing. 31
Shutting down, this might take some time.
As you can see, I have extended the wait time, without success.
It is probably something obvious, but I can't figure out why snakemake begins a rule with one reason (reason: Missing output files: quants/PBS3_1ng_NEB_S17/quants.sf
), completes it (quants/PBS3_1ng_NEB_S17/quants.sf completed successfully
) but is waiting for something else.
I think I have found the issue
I misspelled the expected output of Salmon, it is a quant.sf
file, not quants.sf
. I can't verify it right now but will confirm later. Thanks for the help, sorry for the (obvious now) mistake ^^'
Edit: It was indeed the issue