Pipeline file structure
When you create a new pipeline from the nf-core template, the tool generates a complete directory structure containing numerous files and folders. Some files serve as boilerplate that requires minimal modification, while others are essential to understand during pipeline development.
This page describes the files and directories that nf-core pipelines create generates when running with all template options enabled, and explains the purpose and function of each component.
Files
You will find the following files in each nf-core pipeline. They are automatically generated when running nf-core pipelines create.
| Filename | Description |
|---|---|
main.nf | The main Nextflow file that is executed when the pipeline runs. Typically, parameters are initialized and validated in this script before a workflow from the workflows/ directory is called for execution. |
nextflow.config | The main Nextflow configuration file. It contains the default pipeline parameters, Nextflow configuration options, and information such as pipeline and minimum Nextflow version. The nextflow.config also defines different configuration profiles that can be used to run the pipeline. See the Configuration docs for more information. |
README.md | Basic information about the pipeline and usage. |
nextflow_schema.json | The JSON schema file used for pipeline parameter specification. Automatically created using the nf-core pipelines schema build command. It is used for printing command-line help, validating input parameters, building website documentation, and generating pipeline launch interfaces (web and CLI). |
CHANGELOG.md | Information about the changes made to the pipeline for each release. |
LICENSE | The license file for the pipeline (MIT license). |
CODE_OF_CONDUCT.md | The nf-core code of conduct. |
CITATIONS.md | Citations for tools and references used by the pipeline. |
.gitattributes | Git settings that configure .config files to render with Nextflow syntax highlighting on GitHub. |
.gitignore | Files that should be ignored by Git. |
.editorconfig | EditorConfig file that helps ensure consistent coding style. |
.prettierrc.yml | Prettier configuration file to ensure consistent Markdown formatting. |
modules.json | Metadata file that tracks information (e.g., version) about all modules installed from nf-core/modules. |
.nf-core.yml | Configuration file that indicates the repository type (pipeline or modules) and stores pipeline metadata for nf-core/tools, such as linting exceptions and skipped template features. |
ro-crate-metadata.json | RO-Crate metadata file that provides a standardized description of the pipeline. For more information, see RO-Crate. |
Directories
| Directory name | Description |
|---|---|
.devcontainer | Configuration files for GitHub Codespaces development environments. |
.github/ | GitHub-specific files, including issue templates, pull request templates, and GitHub Actions workflows. |
assets/ | Additional pipeline resources such as example input files, reference data, and documentation assets. |
bin/ | Scripts that are directly accessible within pipeline processes. Files in this directory can be called from within Nextflow processes without specifying the full path. |
conf/ | Configuration files for the pipeline. Includes base.config (defines CPU and memory requirements for low, medium, and high resource processes), igenomes.config (specifies locations for reference genomes), test.config and test_full.config (test configurations), and modules.config (module-specific settings). |
docs/ | Markdown files for pipeline documentation. |
modules/ | Pipeline-specific modules and shared nf-core modules. |
workflows/ | Main pipeline workflows that are executed from the main.nf file. |
subworkflows/ | Smaller subworkflows that typically consist of a few modules chained together. |