+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/snapshots/default.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nextflow": "25.04.0"
},
"timestamp": "2025-05-07T13:29:04.284923"
}
Expand Down
2 changes: 1 addition & 1 deletion .github/snapshots/gpu.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nextflow": "25.04.0"
},
"timestamp": "2025-06-16T14:29:10.076573"
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
NXF_VER:
- "24.10.5"
- "25.04.0"
- "latest-everything"
steps:
- name: go to subdirectory and change nextflow workdir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
NXF_VER:
- "24.10.5"
- "25.04.0"
- "latest-everything"
steps:
- name: go to working directory
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
### Template

- Update the `download_pipeline` workflow to remove dependency on `dev` branch of tools ([#3734](https://github.com/nf-core/tools/pull/3734))
- Bump nf-schema to 2.5.0 and update the help message creation to be compatible with future Nextflow versions ([#3743](https://github.com/nf-core/tools/pull/3743))
- Bump minimum Nextflow version to 25.04.0 ([#3743](https://github.com/nf-core/tools/pull/3743))

### Linting

Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/.github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- isMain: false
profile: "singularity"
NXF_VER:
- "24.10.5"
- "25.04.0"
- "latest-everything"
env:
NXF_ANSI_LOG: false
Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)

[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
[![nf-core template version](https://img.shields.io/badge/nf--core_template-{{ nf_core_version }}-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/{{ nf_core_version }})
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
Expand Down
5 changes: 4 additions & 1 deletion nf_core/pipeline-template/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ workflow {
params.monochrome_logs,
args,
params.outdir,
params.input
params.input{% if nf_schema %},
params.help,
params.help_full,
params.show_hidden{% endif %}
)
{%- endif %}

Expand Down
37 changes: 7 additions & 30 deletions nf_core/pipeline-template/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,12 @@ profiles {
test_full { includeConfig 'conf/test_full.config' }
{%- endif %}
}
{%- if igenomes %}

// Set AWS client to anonymous when using the default igenomes_base
aws.client.anonymous = !params.igenomes_ignore && params.igenomes_base?.startsWith('s3://ngi-igenomes/igenomes/') ?: false

{%- endif %}
{% if nf_core_configs -%}
// Load nf-core custom profiles from different institutions

Expand Down Expand Up @@ -308,48 +313,20 @@ manifest {
description = """{{ description }}"""
mainScript = 'main.nf'
defaultBranch = '{{ default_branch }}'
nextflowVersion = '!>=24.10.5'
nextflowVersion = '!>=25.04.0'
version = '{{ version }}'
doi = ''
}

{% if nf_schema -%}
// Nextflow plugins
plugins {
id 'nf-schema@2.4.2' // Validation of pipeline parameters and creation of an input channel from a sample sheet
id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}

validation {
defaultIgnoreParams = ["genomes"]
monochromeLogs = params.monochrome_logs
help {
enabled = true
command = "nextflow run {{ name }} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"
fullParameter = "help_full"
showHiddenParameter = "show_hidden"
{%- if is_nfcore %}
beforeText = """
-\033[2m----------------------------------------------------\033[0m-
\033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m
\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m
\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m
\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m
\033[0;32m`._,._,\'\033[0m
\033[0;35m {{ name }} ${manifest.version}\033[0m
-\033[2m----------------------------------------------------\033[0m-
"""
afterText = """${manifest.doi ? "\n* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${manifest.doi ? "\n" : ""}
* The nf-core framework
https://doi.org/10.1038/s41587-020-0439-x

* Software dependencies
https://github.com/{{ name }}/blob/{{ default_branch }}/CITATIONS.md
"""{% endif %}
}{% if is_nfcore %}
summary {
beforeText = validation.help.beforeText
afterText = validation.help.afterText
}{% endif %}
}
{%- endif %}

Expand Down
14 changes: 13 additions & 1 deletion nf_core/pipeline-template/nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,19 @@
"fa_icon": "far calendar",
"description": "Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.",
"hidden": true
}
}{% if nf_schema %},
"help": {
"type": ["boolean", "string"],
"description": "Display the help message.",
},
"help_full": {
"type": "boolean",
"description": "Display the full detailed help message.",
},
"show_hidden": {
"type": "boolean",
"description": "Display hidden parameters in the help message (only works when --help or --help_full are provided).",
}{% endif %}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

{% if nf_schema %}include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { samplesheetToList } from 'plugin/nf-schema'{% endif %}
include { samplesheetToList } from 'plugin/nf-schema'
include { paramsHelp } from 'plugin/nf-schema'{% endif %}
{%- if email %}
include { completionEmail } from '../../nf-core/utils_nfcore_pipeline'
{%- endif %}
Expand All @@ -36,10 +37,52 @@ workflow PIPELINE_INITIALISATION {
nextflow_cli_args // array: List of positional nextflow CLI args
outdir // string: The output directory where the results will be saved
input // string: Path to input samplesheet
{% if nf_schema %}help // boolean: Display help message and exit
help_full // boolean: Show the full help message
show_hidden // boolean: Show hidden parameters in the help message{% endif %}

main:

ch_versions = Channel.empty()
{%- if nf_schema %}

//
// Print help message
//

{%- if is_nfcore %}
before_text = """
-\033[2m----------------------------------------------------\033[0m-
\033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m
\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m
\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m
\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m
\033[0;32m`._,._,\'\033[0m
\033[0;35m {{ name }} ${workflow.manifest.version}\033[0m
-\033[2m----------------------------------------------------\033[0m-
"""
after_text = """${workflow.manifest.doi ? "\n* The pipeline\n" : ""}${workflow.manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${workflow.manifest.doi ? "\n" : ""}
* The nf-core framework
https://doi.org/10.1038/s41587-020-0439-x

* Software dependencies
https://github.com/{{ name }}/blob/{{ default_branch }}/CITATIONS.md
"""{% endif %}
command = "nextflow run {${workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"

if(help || help_full) {
log.info paramsHelp(
params.help instanceof String ? params.help : "",
{%- if is_nfcore %}
beforeText: before_text,
afterText: after_text,{% endif %}
command: command,
showHidden: show_hidden,
fullHelp: help_full
)
exit 0
}
{%- endif %}

//
// Print version and exit if required and dump pipeline parameters to JSON file
Expand All @@ -56,11 +99,13 @@ workflow PIPELINE_INITIALISATION {
//
// Validate parameters and generate parameter summary to stdout
//
{% if is_nfcore -%}log.info(before_text){%- endif %}
UTILS_NFSCHEMA_PLUGIN (
workflow,
validate_params,
null
)
{% if is_nfcore -%}log.info(after_text){%- endif %}
{%- endif %}

//
Expand Down
4 changes: 0 additions & 4 deletions nf_core/pipelines/create/template_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ configurations:
nextflow_config:
- "manifest.name"
- "manifest.homePage"
- "validation.help.beforeText"
- "validation.help.afterText"
- "validation.summary.beforeText"
- "validation.summary.afterText"
multiqc_config:
- "report_comment"
nfcore_pipelines: False
Expand Down
16 changes: 2 additions & 14 deletions nf_core/pipelines/lint/nextflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,26 +183,14 @@ def nextflow_config(self) -> dict[str, list[str]]:

if "nf-schema" in found_plugins:
passed.append("Found nf-schema plugin")
if self.nf_config.get("validation.help.enabled", "false") == "false":
failed.append(
"The help message has not been enabled. Set the `validation.help.enabled` configuration option to `true` to enable help messages"
)
config_fail.extend([["validation.help.enabled"]])
config_warn.extend(
[
["validation.help.beforeText"],
["validation.help.afterText"],
["validation.help.command"],
["validation.summary.beforeText"],
["validation.summary.afterText"],
]
)
config_fail_ifdefined.extend(
[
"params.validationFailUnrecognisedParams",
"params.validationLenientMode",
"params.validationSchemaIgnoreParams",
"params.validationShowHiddenParams",
"validation.failUnrecognisedParams",
"validation.failUnrecognisedHeaders",
]
)

Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipelines/lint/readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def readme(self):

if "nextflow_badge" not in ignore_configs:
# Check that there is a readme badge showing the minimum required version of Nextflow
# [![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
# [![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
# and that it has the correct version
nf_badge_re = r"\[!\[Nextflow\]\(https://img\.shields\.io/badge/version-!?(?:%E2%89%A5|%3E%3D)([\d\.]+)-green\?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow\.io\)\]\(https://www\.nextflow\.io/\)"
match = re.search(nf_badge_re, content)
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载