nextflow

Build, run, and debug Nextflow data pipelines and nf-core workflows end to end. Use whenever the user mentions Nextflow, nf-core, .nf files, nextflow.config, DSL2, processes/channels/operators, samplesheets, or wants to run a community pipeline (e.g. nf-core/rnaseq, nf-core/sarek), write or test a module/subworkflow with nf-test, configure executors/containers (Docker, Singularity/Apptainer, Conda, Wave), scale a workflow to HPC/SLURM or cloud (AWS Batch, Google Batch, Azure, Kubernetes), or debug a failed/-resume run. Make sure to use this skill for any reproducible scientific/bioinformatics workflow work even if the user does not say the word "Nextflow", and for authoring nf-core-compliant pipelines, modules, configs, and linting.

Install

Hot:9

Download and extract to your skills directory

Copy command and send to AI Agent for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-nextflow&locale=en&source=copy

Nextflow Skills Deep Dive

Skill Overview


Nextflow skills provide comprehensive support for building, running, and debugging reproducible data pipelines, covering the entire workflow from local development to deployment on HPC and cloud platforms. They are especially well suited for data processing workflows in bioinformatics and scientific computing.

Use Cases

1. Run and Deploy nf-core Community Pipelines


When you need to run peer-reviewed nf-core standard pipelines (e.g., nf-core/rnaseq, nf-core/sarek), this skill offers end-to-end support—from interactive parameter configuration to multiple executors (Docker, Singularity, Conda). It helps you quickly start a verified analysis workflow on your local machine, HPC cluster, or cloud platform.

2. Develop Modular and Testable Nextflow Workflows


Applicable to scenarios where you need to write custom .nf scripts, create nextflow.config configuration files, or develop modules and sub-workflows that comply with nf-core standards. The skill covers DSL2 syntax, the use of processes/channels/operators, integration with the nf-test testing framework, and nf-core tool linting and version management—ensuring your pipelines are maintainable and reusable.

3. Debug, Optimize, and Extend Existing Workflows


When a Nextflow pipeline fails, needs to be resumed with -resume, or requires optimization of resource settings and container environments, this skill provides a systematic debugging approach. It includes understanding caching mechanisms, executor configuration (SLURM, AWS Batch, Kubernetes, etc.), and best practices for containerized deployment (Docker, Singularity/Apptainer, Wave), helping you solve real-world production issues.

Core Capabilities

1. Dataflow Programming and DSL2 Modular Architecture


Nextflow uses a dataflow programming model. By combining processes, channels, and operators, it automatically infers parallel execution strategies without you manually writing scheduling logic. DSL2 supports a modular include mechanism, take/emit interface definitions, and reusable component libraries—allowing you to build a clear, composable workflow architecture.

2. Multi-Platform Execution and Containerization Support


Built around the “write once, run anywhere” concept—using the same pipeline code with different execution environments via configuration. These environments include local setups, traditional HPC schedulers (SLURM, SGE, LSF, PBS), and cloud-native platforms (AWS Batch, Google Batch, Azure Batch, Kubernetes). Combined with container technologies such as Docker, Singularity/Apptainer, Podman, Conda, or Wave, it ensures each task runs in an isolated environment, enabling true reproducibility.

3. nf-core Ecosystem Integration


Deep integration with the nf-core toolchain provides pipeline scaffolding templates (nf-core pipelines create), module management (nf-core modules list/install/test), interactive parameter generation (nf-core pipelines launch), schema validation, and lint checks. This helps you follow community best practices to develop high-quality pipelines compliant with nf-core standards, and run complete unit tests and snapshot tests using nf-test.

Frequently Asked Questions

What kinds of workflows is Nextflow suitable for? How is it different from traditional scripts?


Nextflow is especially suitable for scientific computing and bioinformatics pipelines that need to process large numbers of samples, involve multiple analysis steps, and require reproducibility. Compared with traditional Bash/Python scripts, Nextflow’s core advantages are: automatic inference of parallel execution, native support for checkpointing and resuming (-resume), cross-platform execution (the same code can run on your local machine and on HPC/cloud platforms), and environment consistency ensured through containerization. When your analysis workflow handles hundreds of samples, involves complex dependencies, or needs to be migrated across different computing environments, Nextflow can significantly reduce maintenance effort and improve reliability.

How do I start using nf-core pipelines? What background do I need?


A good starting point is nextflow run nf-core/<pipeline-name> -profile test,docker, which downloads the pipeline and uses built-in test data to validate the environment configuration. For actual runs, you’ll need a samplesheet (samplesheet CSV), choose an appropriate container technology (Docker for local use, Singularity for HPC), and generate a parameter file via -params-file or nf-core pipelines launch. As prerequisite knowledge, familiarity with basic command-line operations and understanding how sample files are organized are helpful—but nf-core provides complete templates and documentation, so even beginners can get up and running quickly.

How do I debug a failing Nextflow workflow?


First, use nextflow log to review historical run records. Then identify the cause by checking, for the specific failed task in the work/ directory, the .exitcode, .command.log, and .command.sh files. Common issues include missing container images, insufficient memory/CPU resources, and incorrect input file paths. Common solutions include: using -resume to skip tasks that have already succeeded; adjusting resource configuration for specific tasks via process selectors; enabling errorStrategy 'retry' and dynamically scaling with task.attempt in nextflow.config; and using the process.withName selector in nextflow.config to set debugging parameters for problematic tasks. For pipeline logic issues, the -stub-run mode can quickly validate dataflow without actually executing the scripts.