Hello!
I’m writing a pipeline in Nextflow, and i’ve come across two problems:
-
One of the processes (rcremoval) runs correctly but does not cache properly, with identical .command.sh files for each run
-
Another process (shortremoval) runs correctly and creates the outputs in the working directory, but does not publishDir and the process is never ending
Both processes show ´COMPLETED´ with ´exit: 0´ in nextflow.log, and no errors appear in .command.err files.
My nextflow version is 24.04.2, i’m using SLURM executor and this the execution command:
nextflow run maindivided.nf \
--runfolderDir /path/to/runfolder/ \
--outputDir //path/to/outdir/ \
--samplesheet /path/to/samplesheet/ \
--linkerdata /path/to/linkerdata/ \
-resume \
These are the processes:
// RCremoval - slow R-based process, caching issue
process RCremoval_inspiired {
publishDir '/path/to/rc_results', mode: 'symlink', overwrite: true
input: tuple val(meta), path(read1), path(read2), val(primer), val(ltrbit), val(largeLTRfrag), val(mingDNA)
output: tuple val(meta), path("*.rc_removed_R1.fastq.gz"), path("*.rc_removed_R2.fastq.gz"), emit: reads
script:
"""
// R script that processes files
"""
}
// SHORTREMOVE - completes but no publishing
process SHORTREMOVE_local {
publishDir '/path/to/short_results', mode: 'symlink', overwrite: true
input: tuple val(sample), path(read1), path(read2)
output: tuple val(sample), path("*.short_removed_R1.paired.fastq.gz"), path("*.short_removed_R2.paired.fastq.gz"), emit: reads
script:
"""
# seqkit commands that work - files created in work/ directory
"""
}
The workflow structure is the following:
main_workflow
→ RCREMOVAL_wfl (emits: ch_rc_removed)
→ SHORTREMOVE_wfl (takes: ch_rc_removed)
And this is what I see when I run the pipeline for +10 hours, after already running it and completing the rcremoval process:
[7b/f84ab7] LTR_wfl:LTRchecking_seqkit (12) | 12 of 12, cached: 12 ✔
[0d/ff8f81] RCRemoval_wfl:RCremoval (12) | 12 of 12, cached: 3 ✔
[a8/889be2] SHORTREMOVE_wfl:SHORTREMOVE_local (12) | 0 of 12
The debugging steps I tried until now have been:
- Confirmed .command.sh files are identical for rcremoval
- Confirmed shortremove produced files exist in the workdirectories
- Different publishDir modes for shortremoval (symlink/copy)
Thanks in advance!! ![]()