Original author(s) | Paolo Di Tommaso |
---|---|
Developer(s) | Seqera Labs, Centre for Genomic Regulation |
Initial release | April 9, 2013 |
Stable release | v23.10.1
/ January 12, 2024 |
Preview release | v24.02.0-edge
/ March 9, 2024 |
Repository | https://github.com/nextflow-io/nextflow |
Written in | Groovy, Java |
Operating system | Linux, macOS, WSL |
Type | Scientific workflow system, Dataflow programming, Big data |
License | Apache License 2.0 |
Website | nextflow |
Nextflow is a scientific workflow system predominantly used for bioinformatic data analyses. It imposes standards on how to programmatically author a sequence of dependent compute steps and enables their execution on various local and cloud resources.[1][2] Nextflow was conceived at the Centre for Genomic Regulation in Barcelona, Spain, but has since found world-wide adoption in biomedical and genomics research facilities and laboratories.
Many scientific data analyses require a significant amount of sequential processing steps. Custom scripts may suffice when developing new methods or infrequently running a particular analysis, but scale poorly to complex task successions or many samples.[3][4][5]
Scientific workflow systems like Nextflow allow formalizing an analysis as a data analysis pipeline. Pipelines, also known as workflows, are instructions that specify order and conditions of computing steps to be performed. They are carried out by special purpose programs, so-called workflow executors, which ensure predictable and reproducible behavior in various compute environments.[3][6][7][8]
Workflow systems also provide built-in solutions to common challenges of workflow development, such as the application to multiple samples, the validation of input and intermediate results, conditional execution of steps, error handling, and report generation. Advanced features of workflow systems may also include scheduling capabilities, graphical user interfaces for monitoring workflow executions, and the management of dependencies by containerizing the whole workflow or its components.[9][10]
Typically, scientific workflow systems initially present a steep learning challenge as all their features and complexities are added on top of and in addition to the actual analysis. However, the standards and abstraction imposed by workflow systems ultimately improve the traceability of analysis steps, which is particularly relevant when collaborating on pipeline development, as is customary in scientific settings.[11]
In Nextflow, pipelines are constructed from individual processes that correspond to computational tasks. Each process is set up with input requirements and output declarations. Rather than running in a fixed succession, the execution of a process commences when all its input requirements are met. By specifying the output of one process as the input of another step, a logical and sequential connection between processes is created.[12]
This reactive implementation of processes is a characteristic design pattern of Nextflow and also known as functional dataflow model.[13] It allows for the efficient parallelization of independent compute steps.
Processes and whole workflows are programmed in a domain-specific language (DSL) that is provided by Nextflow and based on Apache Groovy.[14] 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. Porting existing scripts and workflows to Nextflow is therefore possible. Supported scripting languages include bash, csh, ksh, Python, Ruby, and R. Any scripting language that uses the standard Unix shebang declaration (#!/bin/bash
) is supported in Nextflow.
An exemplary workflow consisting of only one process is shown below:
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 facilitate straightforward collaboration on workflows, Nextflow has native support for source-code management systems and DevOps-platforms including GitHub, GitLab, and others.[15]
Workflows written in Nextflow's DSL can be deployed and run across diverse computing environments without modifications to the pipeline code.
To enable portability, Nextflow ships with dedicated executors for a variety of platforms[16] including those of major cloud providers. Because Nextflow decouples individual process steps, it can optionally be configured to spread execution across multiple computing platforms. It supports the following environments for pipeline execution:
A fundamental concept of Nextflow is its tight integration with software containers. Whole workflows and, in later versions, also single processes can harness containers to allow their execution across various compute environments without tedious installation and configuration routines.[3]
This design choice was strongly influenced by Solomon Hyke's talk at dotScale in 2013,[20] which had a significant impact on Nextflow's principal developer, Paolo Di Tommaso.[21]
Container frameworks supported by Nextflow include Docker, Singularity, Charliecloud, Podman, and Shifter.[22] Those type of containers can be utilized in a workflow and are automatically retrieved from external repositories when the pipeline is executed. At Nextflow Summit 2022, it was unveiled that future versions of Nextflow will support a dedicated container provisioning service for an improved integration of customized containers into workflows.[23]
Nextflow was originally developed at the Centre for Genomic Regulation in Spain and released as an open-source project on GitHub in July 2013.[24] In October 2018, the project license for Nextflow was changed from GPLv3 to Apache 2.0.[25]
In July 2018, Seqera Labs was launched as a spin-off from the Centre for Genomic Regulation.[21] The company employs many of Nextflow's core developers and maintainers and provides commercial services [26] and consulting with a focus on Nextflow.
In July 2020, a major extension and revision of Nextflow's domain-specific language was introduced to allow for sub-workflows and additional improvements.[27] In the same year, monthly downloads of Nextflow sat at approximately 55,000 per month.[21]
In addition to the Centre for Genomic Regulation,[28] other sequencing facilities have adopted Nextflow as their preferred Scientific workflow system, among them the Quantitative Biology Center in Tübingen, the Francis Crick Institute, A*STAR Genome Institute of Singapore, and the Swedish National Genomics Infrastructure.[21]
Efforts to share, harmonize, and curate the bioinformatic pipelines used by those facilities[29][30][31][32] eventually turned into the nf-core project.[33] Spearheaded by Phil Ewels from the Swedish National Genomics Infrastructure[34][35] the focus of the nf-core project is to ensure that pipelines are reproducible and portable across different hardware, operating systems, and software versions. In July 2020, Nextflow and nf-core were awarded a grant from the Chan Zuckerberg Initiative, recognizing its role as a vital open-source software.[36]
As of 2022, the nf-core organization hosts 73 Nextflow pipelines for the biosciences and more than 700 process modules. Uniting more than 500 developers and scientists, it is the largest collaborative effort and community to develop bioinformatic data analysis pipelines.[37]
Nextflow is preferred in sequencing data processing and genomic data analysis. Over the last five years, numerous pipelines for many different applications and analyses in the field of genomics have been published.
A notable use case in this regard was for pathogen surveillance during the COVID-19 pandemic.[38] Monitoring the emergence of new virus variants and retracing its global spread required the swift and highly automatized, yet accurate, processing of raw data, variant analysis, and the designation of lineages, which was enabled by pipelines written in Nextflow.[39] [40] [41] [42] [43] [44] [45]
Nextflow also plays an important role for the non-profit plasmid repository Addgene, which uses it to corroborate the integrity of all deposited plasmids.[46]
Apart from genomics, Nextflow is gaining popularity in other domains of biomedical data processing, which also require the application of complex workflows on large amounts of primary data: Drug screening,[47] Diffusion magnetic resonance imaging (dMRI) in radiology,[48] and mass spectrometry data processing,[49][50][51] the latter with a particular focus on proteomics[52] [53] [54] [55] [56] [57] [58] [59]