Attention

Following the recent operating system upgrade, software listings and module load commands now reflect the upgraded system. Some examples and notices are still being updated and may contain outdated guidance.

Nextflow

Guidance last updated: 9 October 2026

Nextflow is a free and open-source software distributed under the Apache 2.0 licence, developed by Seqera Labs. The software is used by scientists and engineers to write, deploy and share data-intensive, highly scalable, workflows on any infrastructure.

Nextflow enables scalable and reproducible scientific workflows using software containers. It allows the adaptation of pipelines written in the most common scripting languages.

Its fluent DSL simplifies the implementation and the deployment of complex parallel and reactive workflows on clouds and clusters

Documentation: https://docs.seqera.io/nextflow

Note

nf-core is a community effort to collect a curated set of analysis pipelines built using Nextflow.

Interactive Usage

After connecting to Stanage (see Establishing a SSH connection), start an interactive session with the following command:

srun --pty bash -i

Nextflow is made available on Icelake nodes with the command:

module load Nextflow/25.10.2

The module also loads Java/25.36.

You can now run the nextflow command:

  $ nextflow -version
    N E X T F L O W
    version 25.10.2 build 10555
    created 28-11-2025 19:24 UTC (19:24 BST)
    cite doi:10.1038/nbt.3820
    http://nextflow.io

A Simple Script

Write a file named tutorial.nf (source) with the following content:

params.str = 'Hello world!'

process splitLetters {
  output:
    path 'chunk_*'

  """
  printf '${params.str}' | split -b 6 - chunk_
  """
}

process convertToUpper {
  input:
    path x
  output:
    stdout

  """
  cat $x | tr '[a-z]' '[A-Z]'
  """
}

workflow {
  splitLetters | flatten | convertToUpper | view { it.trim() }
}

Execute the script by entering the following command in your terminal:

$ nextflow run tutorial.nf

It will output something similar to the text shown below:

N E X T F L O W  ~  version 25.10.2
executor >  local (3)
[69/c8ea4a] process > splitLetters   [100%] 1 of 1 ✔
[84/c8b7f1] process > convertToUpper [100%] 2 of 2 ✔
WORLD!
HELLO

Batch usage

This example uses Nextflow’s local executor to run tasks within a single-node allocation.

Ensure you have produced the above tutorial.nf script, then write an example batch submission script named batch.sh with the following content:

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=2
#SBATCH --mem=2G
#SBATCH --job-name=tutorial_smp_2
#SBATCH --output=tutorial_smp_2.out
#SBATCH --time=00:02:00
#SBATCH --mail-user=a.person@sheffield.ac.uk
#SBATCH --mail-type=ALL
module load Nextflow/25.10.2
nextflow run tutorial.nf -ansi-log false

You can now submit this job to the SLURM scheduler with:

$ sbatch batch.sh

The two conversion tasks run independently, so HELLO and WORLD! may appear in either order. Your output file content will be similar to the following (task identifiers can vary):

N E X T F L O W  ~  version 25.10.2
Launching `tutorial.nf` [spontaneous_volhard] DSL2 - revision: e61bd183fe
[c1/c35095] Submitted process > splitLetters
[7f/f928ab] Submitted process > convertToUpper (1)
[32/0aaad6] Submitted process > convertToUpper (2)
WORLD!
HELLO

Installation notes

Installation method

This section is primarily for administrators of the system.

Nextflow was installed using Easybuild, build details can be found in $EBROOTNEXTFLOW/easybuild with a given module loaded.

Testing method

Testing has been conducted with the above examples.

Direct dependencies for latest version of Nextflow