Skill Tracer
Skills › Scientific Agent Skills › nextflow › nf-core-tools.md

nf-core-tools.md

133 lines · skills/nextflow/references/nf-core-tools.md at 5f2bc03

Open on GitHub
1# nf-core Tools CLI Reference
2
3`nf-core` is a Python CLI for creating, linting, testing, and running nf-core-style pipelines, modules, and subworkflows. Target: **4.1.0**, Python >=3.10,<4. Command signatures were checked against the installed release. Source: https://nf-co.re/docs/nf-core-tools and https://github.com/nf-core/tools/tree/4.1.0 . Remote downloads, scaffolding, schema web GUI and container runs below are illustrative; review before invoking.
4

nf-core Tools CLI Reference

nf-core is a Python CLI for creating, linting, testing, and running nf-core-style pipelines, modules, and subworkflows. Target: 4.1.0, Python >=3.10,<4. Command signatures were checked against the installed release. Source: https://nf-co.re/docs/nf-core-tools and https://github.com/nf-core/tools/tree/4.1.0 . Remote downloads, scaffolding, schema web GUI and container runs below are illustrative; review before invoking.

Raw lines 1 to 4
5## Install
6
7```bash
8uv tool install "nf-core==4.1.0"
9conda install -c bioconda nf-core
10nf-core --version
11```
13In tools **4.1.0** the commands are grouped under `pipelines`, `modules`, `subworkflows`, and `test-datasets`. (Old flat commands such as `nf-core lint` have been removed and return an error.) Run `nf-core --help` or `nf-core <group> --help` to see current options, or `nf-core interface` for a graphical TUI command explorer.
15For `modules`/`subworkflows`, group-level options go **before** the subcommand, e.g. to target a non-default component repo: `nf-core modules -g <git-url> -b <branch> install fastqc`.

Install

uv tool install "nf-core==4.1.0"
conda install -c bioconda nf-core
nf-core --version

In tools 4.1.0 the commands are grouped under pipelines, modules, subworkflows, and test-datasets. (Old flat commands such as nf-core lint have been removed and return an error.) Run nf-core --help or nf-core <group> --help to see current options, or nf-core interface for a graphical TUI command explorer.

For modules/subworkflows, group-level options go before the subcommand, e.g. to target a non-default component repo: nf-core modules -g <git-url> -b <branch> install fastqc.

Raw lines 5 to 16
17## Pipelines
19| Command | Purpose |
20|---------|---------|
21| `nf-core pipelines list [keywords]` | List/search nf-core pipelines (`--json`, `--sort`) |
22| `nf-core pipelines create` | Scaffold a new pipeline from the template (interactive TUI; `--name --description --author` supply identity; use `--template-yaml` for reproducible options) |
23| `nf-core pipelines launch <name>` | Interactive, schema-validated run command + params file |
24| `nf-core pipelines download <name>` | Download pipeline + containers for offline use (`--revision`, `--container-system singularity`, `--outdir`) |
25| `nf-core pipelines lint` | Lint the pipeline in the current dir against nf-core standards (`--release`, `--fix`, `--dir`) |
26| `nf-core pipelines schema build` | Create/update `nextflow_schema.json` (opens a web editor) |
27| `nf-core pipelines schema validate <pipeline> <params.json>` | Validate params against the schema |
28| `nf-core pipelines schema lint` | Lint the schema file |
29| `nf-core pipelines schema docs` | Generate parameter docs from the schema |
30| `nf-core pipelines create-params-file <name>` | Generate a documented YAML params file |
31| `nf-core pipelines bump-version <ver>` | Bump the pipeline version across files |
32| `nf-core pipelines sync` | Merge template updates into a pipeline (TEMPLATE branch) |
33| `nf-core pipelines rocrate` | Generate an RO-Crate metadata record |
34| `nf-core pipelines create-logo <text>` | Render an nf-core-style logo |

Pipelines

CommandPurpose
nf-core pipelines list [keywords]List/search nf-core pipelines (--json, --sort)
nf-core pipelines createScaffold a new pipeline from the template (interactive TUI; --name --description --author supply identity; use --template-yaml for reproducible options)
nf-core pipelines launch <name>Interactive, schema-validated run command + params file
nf-core pipelines download <name>Download pipeline + containers for offline use (--revision, --container-system singularity, --outdir)
nf-core pipelines lintLint the pipeline in the current dir against nf-core standards (--release, --fix, --dir)
nf-core pipelines schema buildCreate/update nextflow_schema.json (opens a web editor)
nf-core pipelines schema validate <pipeline> <params.json>Validate params against the schema
nf-core pipelines schema lintLint the schema file
nf-core pipelines schema docsGenerate parameter docs from the schema
nf-core pipelines create-params-file <name>Generate a documented YAML params file
nf-core pipelines bump-version <ver>Bump the pipeline version across files
nf-core pipelines syncMerge template updates into a pipeline (TEMPLATE branch)
nf-core pipelines rocrateGenerate an RO-Crate metadata record
nf-core pipelines create-logo <text>Render an nf-core-style logo
Raw lines 17 to 35
36### Create a pipeline
38```bash
39nf-core pipelines create # interactive: name, description, author
40# non-interactive:
41nf-core pipelines create --name mypipe --description "My pipeline" --author me
42```
44This generates the full nf-core template (see `references/developing.md` for the layout) with CI, linting, schema, and a `test` profile wired up. Develop on a feature branch; keep the `TEMPLATE` branch for `sync`.

Create a pipeline

nf-core pipelines create                # interactive: name, description, author
# non-interactive:
nf-core pipelines create --name mypipe --description "My pipeline" --author me

This generates the full nf-core template (see references/developing.md for the layout) with CI, linting, schema, and a test profile wired up. Develop on a feature branch; keep the TEMPLATE branch for sync.

Raw lines 36 to 45
46### Lint before pushing
48```bash
49cd my-pipeline
50nf-core pipelines lint # run in the repo root
51nf-core pipelines lint --release # stricter checks for a release
52```
54Linting enforces nf-core structure, required files, schema/params consistency, module versions, and formatting. CI runs this on every PR.

Lint before pushing

cd my-pipeline
nf-core pipelines lint                   # run in the repo root
nf-core pipelines lint --release         # stricter checks for a release

Linting enforces nf-core structure, required files, schema/params consistency, module versions, and formatting. CI runs this on every PR.

Raw lines 46 to 55
56## Modules
58Manage reusable process modules from the central [nf-core/modules](https://github.com/nf-core/modules) repo, or author your own.
60| Command | Purpose |
61|---------|---------|
62| `nf-core modules list remote [keyword]` | List modules available in nf-core/modules |
63| `nf-core modules list local` | List modules installed in the current pipeline |
64| `nf-core modules info <tool>` | Show a module's inputs/outputs/description |
65| `nf-core modules install <tool>` | Install a module into `modules/nf-core/` |
66| `nf-core modules update <tool>` | Update an installed module (`--all`, `--diff`) |
67| `nf-core modules remove <tool>` | Remove an installed module |
68| `nf-core modules patch <tool>` | Record local changes to an installed module as a patch |
69| `nf-core modules create [tool]` | Scaffold a new module (`main.nf`, `meta.yml`, `tests/`) |
70| `nf-core modules lint <tool>` | Lint a module against module specs |
71| `nf-core modules test <tool>` | Run tests twice for snapshot stability in a modules repository; not a pipeline repository |
72| `nf-core modules bump-versions` | Bump tool versions in modules |
74```bash
75# Reuse before you rebuild: install an existing module
76nf-core modules install fastqc
77nf-core modules install samtools/sort
79# In a modules repository: author a new one, then lint + test it
80nf-core modules create mytool
81nf-core modules lint mytool
82nf-core modules test mytool
83```
85In a pipeline repository, run `nf-test test <test-path>` directly for local/modified components. `nf-core modules test` is scoped to nf-core/modules-like repositories and rejects pipeline repositories.
87Tool naming uses `tool` or `tool/subtool` (e.g. `samtools/sort`). Installed modules are pinned by git SHA in `modules.json`.

Modules

Manage reusable process modules from the central nf-core/modules repo, or author your own.

CommandPurpose
nf-core modules list remote [keyword]List modules available in nf-core/modules
nf-core modules list localList modules installed in the current pipeline
nf-core modules info <tool>Show a module's inputs/outputs/description
nf-core modules install <tool>Install a module into modules/nf-core/
nf-core modules update <tool>Update an installed module (--all, --diff)
nf-core modules remove <tool>Remove an installed module
nf-core modules patch <tool>Record local changes to an installed module as a patch
nf-core modules create [tool]Scaffold a new module (main.nf, meta.yml, tests/)
nf-core modules lint <tool>Lint a module against module specs
nf-core modules test <tool>Run tests twice for snapshot stability in a modules repository; not a pipeline repository
nf-core modules bump-versionsBump tool versions in modules
# Reuse before you rebuild: install an existing module
nf-core modules install fastqc
nf-core modules install samtools/sort

# In a modules repository: author a new one, then lint + test it
nf-core modules create mytool
nf-core modules lint mytool
nf-core modules test mytool

In a pipeline repository, run nf-test test <test-path> directly for local/modified components. nf-core modules test is scoped to nf-core/modules-like repositories and rejects pipeline repositories.

Tool naming uses tool or tool/subtool (e.g. samtools/sort). Installed modules are pinned by git SHA in modules.json.

Raw lines 56 to 88
89## Subworkflows
91Same lifecycle as modules, for chains of modules. Source: https://nf-co.re/docs
93| Command | Purpose |
94|---------|---------|
95| `nf-core subworkflows list remote/local` | List available/installed subworkflows |
96| `nf-core subworkflows info <name>` | Show a subworkflow's interface |
97| `nf-core subworkflows install <name>` | Install into `subworkflows/nf-core/` |
98| `nf-core subworkflows update <name>` | Update an installed subworkflow |
99| `nf-core subworkflows remove <name>` | Remove a subworkflow |
100| `nf-core subworkflows create [name]` | Scaffold a new subworkflow |
101| `nf-core subworkflows lint <name>` | Lint against subworkflow specs |
102| `nf-core subworkflows test <name>` | Run the subworkflow's nf-test suite |
104```bash
105nf-core subworkflows install bam_sort_stats_samtools
106nf-core subworkflows create align_bwa
107nf-core subworkflows test align_bwa
108```

Subworkflows

Same lifecycle as modules, for chains of modules. Source: https://nf-co.re/docs

CommandPurpose
nf-core subworkflows list remote/localList available/installed subworkflows
nf-core subworkflows info <name>Show a subworkflow's interface
nf-core subworkflows install <name>Install into subworkflows/nf-core/
nf-core subworkflows update <name>Update an installed subworkflow
nf-core subworkflows remove <name>Remove a subworkflow
nf-core subworkflows create [name]Scaffold a new subworkflow
nf-core subworkflows lint <name>Lint against subworkflow specs
nf-core subworkflows test <name>Run the subworkflow's nf-test suite
nf-core subworkflows install bam_sort_stats_samtools
nf-core subworkflows create align_bwa
nf-core subworkflows test align_bwa
Raw lines 89 to 109
110## Test datasets
112```bash
113nf-core test-datasets list-branches # list test-data branches
114nf-core test-datasets list # list files on a selected branch
115nf-core test-datasets search <term> # find small test files in nf-core/test-datasets
116```
118Use these tiny, version-controlled files in module/pipeline tests (see `references/testing.md`).

Test datasets

nf-core test-datasets list-branches     # list test-data branches
nf-core test-datasets list              # list files on a selected branch
nf-core test-datasets search <term>     # find small test files in nf-core/test-datasets

Use these tiny, version-controlled files in module/pipeline tests (see references/testing.md).

Raw lines 110 to 119
120## Typical developer loop
122```bash
123nf-core pipelines create # scaffold
124nf-core modules install fastqc # reuse community modules
125nf-core modules create mytool # add a custom one
126nf-test test path/to/main.nf.test # test a local component in a pipeline
127nf-core subworkflows install bam_sort_stats_samtools
128nf-core pipelines schema build # keep schema in sync with params
129nf-core pipelines lint # validate everything
130prettier --write . # format (Harshil alignment)
131```
133See `references/developing.md` for what each generated file should contain, and `references/testing.md` for nf-test details.

Typical developer loop

nf-core pipelines create                       # scaffold
nf-core modules install fastqc                 # reuse community modules
nf-core modules create mytool                  # add a custom one
nf-test test path/to/main.nf.test               # test a local component in a pipeline
nf-core subworkflows install bam_sort_stats_samtools
nf-core pipelines schema build                 # keep schema in sync with params
nf-core pipelines lint                          # validate everything
prettier --write .                             # format (Harshil alignment)

See references/developing.md for what each generated file should contain, and references/testing.md for nf-test details.

Raw lines 120 to 133