Specification of workflows In Nextflow, pipelines are constructed from individual processes that work in parallel to perform computational tasks. Each process is defined with input requirements and output declarations. Instead of running in a fixed sequence, a process starts executing when all its input requirements are fulfilled. By specifying the output of one process as the input of another, a logical and sequential connection between processes is established. This reactive implementation is a key
design pattern of Nextflow and is also known as the functional
dataflow model. Processes and entire workflows are programmed in a
domain-specific language (DSL) which is provided by Nextflow which is based on
Apache Groovy. While Nextflow's DSL is used to declare the workflow logic, developers can use their
scripting language of choice within a process and mix multiple languages in a workflow. It is also possible to port existing scripts and workflows to Nextflow. Supported scripting languages include bash, csh, ksh,
Python,
Ruby, and
R. Any scripting language that uses the standard Unix
shebang declaration (#!/bin/bash) is compatible with Nextflow. Below is an example of a workflow consisting of only one process: process hello_world { input: val greeting output: path "${greeting}.txt" script: """ echo "${greeting} World!" > ${greeting}.txt """ } workflow { Channel.of("Hello", "Ciao", "Hola", "Bonjour") | hello_world } To enable easy collaboration on workflows, Nextflow natively support for
source-code management systems and
DevOps platforms including
GitHub,
GitLab, and others.
Execution of workflows Nextflow's DSL allows workflows to be deployed and run across different computing environments without having to modify the pipeline code. Nextflow comes with specific executors for various platforms, including major cloud providers. It supports the following environments for pipeline execution: •
Local: This is the default executor where Nextflow pipelines run on Linux or Mac OS, and the execution occurs on the computer where the pipeline is launched. •
HPC workload managers: Nextflow supports workload managers such as Slurm, SGE, LSF, Moab, PBS Pro, PBS/Torque, HTCondor, NQSII, and OAR. •
Kubernetes: Nextflow can be used with local or cloud-based
Kubernetes implementations (GKE, EKS, or AKS). •
Cloud batch services: It is compatible with AWS Batch and Azure Batch •
Other environments: Nextflow can also be used with
Apache Ignite, Google Life Sciences, and various container frameworks for portability.
Containers for portability across computing environments In Nextflow, there is tight integration with software containers. Workflows and single processes can utilize containers for their execution across different computing environments, eliminating the need for complex installation and configuration routines. Nextflow supports container frameworks such as Docker, Singularity, Charliecloud, Podman, and Shifter. These containers can be automatically retrieved from external repositories when the pipeline is executed. Additionally, it was revealed at Nextflow Summit 2022 that future versions of Nextflow will support a dedicated container provisioning service for better integration of customized containers into workflows. == Developmental history ==