Closed ressy closed 4 years ago
Cool, thanks for the detailed report! I’m taking some time off at the moment, but will look into this (and try to fix it) as soon as I’m back.
Great! No rush from my end. I removed temp(...)
on trim_forward_primers's output for now and it finished OK.
Thanks again for the good investigation! I’ve fixed the issue now by creating a hardlink instead of a symlink in the case that only forward_primers but no reverse_primers are specified. I wanted to keep the symlink in the "normal" case to make it clearer what the pipeline does. It’s more a work around than a real fix, but it should be good enough.
Thanks!
I just tried adding our forward primer to my config (there's no reverse in our read layout) and oddly enough it broke igdiscover's snakemake workflow at the rule dont_trim_reverse_primers. Digging into it a bit it looks like the problem is using symbolic links in conjunction with the
temp()
feature.The last bit of the output looks like:
Looking at the rules and inputs/outputs that apply:
trim_forward_primers: output: fastaq=temp('reads/3-')
dont_trim_reverse_primers: input: fastaq='reads/3-...'
dont_trim_reverse_primers: output: fastaq='reads/4-...'
(symlinked to input)trimmed_fasta_stats: input: fastagz='reads/4...'
When it finishes
dont_trim_reverse_primers
it considers the temp file done with and removes it, which breaks the symlink needed by the last rule. It only seems to pick up on it when you have a rule that tries to then use that symlink, though.This seemed like a weird situation so I made a minimal example with plain Snakemake to pin it down:
And this is what I see when calling
snakemake
:This is with snakemake 5.9.1 and igdiscover 0.12.1.