Closed Merritt-Brian closed 1 month ago
Here's a temporary fix for the script block in the porechop/main.nf
file:
porechop \\
-i $reads \\
-t $task.cpus \\
$args \\
-o ${prefix}.tmp.fastq.gz
if [ -s ${prefix}.tmp.fastq.gz ]
then
mv ${prefix}.tmp.fastq.gz ${prefix}.fastq.gz
else
rm ${prefix}.tmp.fastq.gz
cp $reads ${prefix}.fastq.gz
fi
# etc.
You would also need to manipulate the task.ext.prefix
variable in the configuration file. Apparently Nextflow excludes input files when it looks for output files, at least on version 24.04.4.
I suggest reporting this problem upstream to nf-core, because, as the saying goes, "there's nothing more permanent than a temporary fix".
thanks @fanninpm, added to pipeline with commit: f54c74224d20040e81df88453a0d07a6a467bfff. Closing
Description of the bug
If a sample doesn't contain any trimmable reads, the file remains the same and the output is not emitted. This makes the pipeline fail. Make the output optional if it fails so the workflow can continue by reverting the next step to use the original fastq file
Command used and terminal output
No response
Relevant files
No response
System information
No response