Slava Sidorov
11/25/2025, 4:55 PMExecution cancelled -- Finishing pending tasks before exit
-[ComputationalRegulatoryGenomicsICL/customcage] Pipeline completed with errors-
WARN: Got an interrupted exception while taking agent result | java.lang.InterruptedException
ERROR ~ No such variable: task
-- Check script 'cageflow/modules/nf-core/samtools/faidx/main.nf' at line: 6 or see '.nextflow.log' file for more details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: <https://nf-co.re/docs/usage/troubleshooting>
-- Check '.nextflow.log' file for details
ERROR ~ Unexpected error [ClosedByInterruptException]
-- Check '.nextflow.log' file for details
WARN: Failed to render execution report -- see the log file for details
WARN: Failed to render execution timeline -- see the log file for details
Line 6 in cageflow/modules/nf-core/samtools/faidx/main.nf is, actually, the container definition for the newly-added nf-core faidx module:
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'<https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0>' :
'biocontainers/samtools:1.22.1--h96c455f_0' }"
It does have the standard Nextflow task variable but it is very strange that this variable is not recognised in this context in our pipeline. The error looks suspiciously similar to the ones arising from Nextflow's quirk of variable evaluation that Ben Sherman posted about here -- https://github.com/nextflow-io/nextflow/issues/4215 -- but in the container definition, the task variable is within a big dynamic string, which means that it should be evaluated per task run, and so, everything should be fine.
We would be very grateful for any advice!