-
Notifications
You must be signed in to change notification settings - Fork 780
Module System Implementation #6768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 19 commits
f5b6b86
f5822a5
24a741f
2432e90
31bf49c
b091d73
a03f630
36e9085
d4418ed
fc327c4
c3b02a8
73e9707
c154d35
e924509
412ba53
119c632
ad0bba2
4826533
c20a408
90dc444
afddf21
18a9e70
a2adf6e
292e4f2
e96c6ef
0b83a2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -262,7 +262,136 @@ $ nextflow secrets set AWS_ACCESS_KEY_ID | |
| $ nextflow secrets delete AWS_ACCESS_KEY_ID | ||
| ``` | ||
|
|
||
| See {ref}`cli-secrets` for more information. | ||
| See {ref}`cli-secrets` for more information. | ||
|
|
||
| ## Module management | ||
|
|
||
| :::{versionadded} 26.04.0 | ||
| ::: | ||
|
|
||
| Module management commands enable working with reusable, registry-based modules. The Nextflow module system allows you to install, run, search, and publish standardized modules from registries, eliminating duplicate work and spreading improvements throughout the community. | ||
|
|
||
| Use these commands to discover modules in registries, install them into your project, run them directly without creating a workflow, and publish your own modules for others to use. | ||
|
|
||
| ### Installing modules | ||
|
|
||
| The `module install` command downloads modules from a registry and makes them available in your workflow. Modules are stored locally in the `modules/` directory and version information is tracked in `nextflow_spec.json`. | ||
|
|
||
| Use this to add reusable modules to your pipeline, manage module versions, or update modules to newer versions. | ||
|
|
||
| ```console | ||
| $ nextflow module install nf-core/fastqc | ||
| $ nextflow module install nf-core/fastqc -version 1.0.0 | ||
| ``` | ||
|
|
||
| After installation, module will be available in `modules/@nf-core/fastqc` and included in `nextflow_spec.json` | ||
|
|
||
| Use the `-force` flag to reinstall a module even if local modifications exist. | ||
|
|
||
| See {ref}`cli-module-install` for more information. | ||
|
|
||
| ### Running modules directly | ||
|
|
||
| The `module run` command executes a module directly from the registry without requiring a wrapper workflow. This provides immediate access to module functionality for ad-hoc tasks or testing. | ||
|
|
||
| Use this to quickly run a module, test module functionality, or execute one-off data processing tasks. | ||
|
|
||
| ```console | ||
| $ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz' | ||
| $ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz' -version 1.0.0 | ||
| ``` | ||
|
|
||
| The command accepts all standard Nextflow execution options (`-profile`, `-resume`, etc.): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't really say in the new docs where Could we get
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's move this to #6650 |
||
|
|
||
| ```console | ||
| $ nextflow module run nf-core/salmon \ | ||
| --reads reads.fq \ | ||
| --index salmon_index \ | ||
| -profile docker \ | ||
| -resume | ||
| ``` | ||
|
|
||
| See {ref}`cli-module-run` for more information. | ||
|
|
||
| ### Listing modules | ||
|
|
||
| The `module list` command displays all modules currently installed in your project, showing their versions and integrity status. | ||
|
|
||
| Use this to review installed modules, check module versions, or detect local modifications. | ||
|
|
||
| ```console | ||
| $ nextflow module list | ||
| $ nextflow module list -json | ||
| ``` | ||
|
|
||
| The output shows each module's name, installed version, and whether it has been modified locally. Use `-json` for machine-readable output suitable for scripting. | ||
|
|
||
| See {ref}`cli-module-list` for more information. | ||
|
|
||
| ### Searching for modules | ||
|
|
||
| The `module search` command queries the module registry to discover available modules by keyword or name. | ||
|
|
||
| Use this to find modules for specific tasks, explore available tools, or discover community contributions. | ||
|
|
||
| ```console | ||
| $ nextflow module search alignment | ||
| $ nextflow module search "quality control" -limit 10 | ||
| $ nextflow module search bwa -json | ||
| ``` | ||
|
|
||
| Results include module names, versions, descriptions, and download statistics. Use `-limit` to control the number of results and `-json` for programmatic access. | ||
|
|
||
| See {ref}`cli-module-search` for more information. | ||
|
|
||
| ### Viewing module information | ||
|
|
||
| The `module info` command displays detailed metadata and usage information for a specific module from the registry. | ||
|
|
||
| Use this to understand module requirements, view input/output specifications, see available tools, or generate usage templates before installing or running a module. | ||
|
|
||
| ```console | ||
| $ nextflow module info nf-core/fastqc | ||
| $ nextflow module info nf-core/fastqc -version 1.0.0 | ||
| $ nextflow module info nf-core/fastqc -json | ||
| ``` | ||
|
|
||
| The output includes the module's version, description, authors, keywords, tools, input/output channels, and a generated usage template showing how to run the module. Use `-json` for machine-readable output suitable for programmatic access. | ||
|
|
||
| See {ref}`cli-module-info` for more information. | ||
|
|
||
| ### Removing modules | ||
|
|
||
| The `module remove` command deletes modules from your project, removing local files and configuration entries. | ||
|
|
||
| Use this to clean up unused modules, free disk space, or remove deprecated modules from your pipeline. | ||
|
|
||
| ```console | ||
| $ nextflow module remove nf-core/fastqc | ||
| $ nextflow module remove nf-core/fastqc -keep-config | ||
| $ nextflow module remove nf-core/fastqc -keep-files | ||
| ``` | ||
|
|
||
| By default, both local files and configuration entries are removed. Use `-keep-config` to preserve version information in `nextflow_spec.json`, or `-keep-files` to remove only the configuration entry while keeping local files. | ||
|
|
||
| See {ref}`cli-module-remove` for more information. | ||
|
|
||
| ### Publishing modules | ||
|
|
||
| The `module publish` command uploads modules to a registry, making them available for others to install and use. | ||
|
|
||
| Use this to share your modules with the community, contribute to module libraries, or distribute modules within your organization. | ||
|
|
||
| ```console | ||
| $ nextflow module publish myorg/my-module | ||
| $ nextflow module publish myorg/my-module -dry-run | ||
| ``` | ||
|
|
||
| Publishing requires authentication via the `NXF_REGISTRY_TOKEN` environment variable or `registry.apiKey` in the Nextflow configuration. The module must include `main.nf`, `meta.yaml`, and `README.md` files. | ||
|
|
||
| Use `-dry-run` to validate your module structure without uploading. | ||
|
|
||
| See {ref}`cli-module-publish` for more information. | ||
|
|
||
| ## Configuration and validation | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.