Skip to main content

ext

The ext is a generic directive for user-defined properties. For example:

process star {
container "biocontainers/star:${task.ext.version}"

input:
path genome
tuple val(sampleId), path(reads)

script:
"""
STAR --genomeDir $genome --readFilesIn $reads ${task.ext.args ?: ''}
"""
}

In the above example, the process container version is controlled by ext.version, and the script supports additional command line arguments through ext.args.

The ext directive can be set in the process definition:

process hello {
ext version: '2.5.3', args: '--alpha --beta'

// ...
}

Or in the Nextflow configuration:

process.ext.version = '2.5.3'
process.ext.args = '--alpha --beta'