From cf14aa170425a326ff58393a681b3e2d1631052d Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:35:56 +0100 Subject: [PATCH 1/9] Pipeline template: Use INIITIALISE subworkflow instead of WorkflowMain.initialise() Changes: - Guts WorkflowMain, particularly the initialise() method - Replaces it with INIITIALISE subworkflow - Should be easier to maintain via nf-core/modules (more regular updates) - Uses more native Nextflow for bioinformatics developers to follow Should incidentally fix #2289 --- CHANGELOG.md | 1 + .../pipeline-template/lib/WorkflowMain.groovy | 46 ---------------- nf_core/pipeline-template/main.nf | 19 +------ nf_core/pipeline-template/modules.json | 9 +++ .../subworkflows/nf-core/initialise/main.nf | 55 +++++++++++++++++++ .../subworkflows/nf-core/initialise/meta.yml | 13 +++++ .../pipeline-template/workflows/pipeline.nf | 9 --- 7 files changed, 80 insertions(+), 72 deletions(-) create mode 100644 nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf create mode 100644 nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef51b9962..02025f19a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - ([#2415](https://github.com/nf-core/tools/pull/2415#issuecomment-1709847086)) Add autoMounts for apptainer. - Remove `igenomes_base` from the schema, so that nf-validation doesn't create a file path and throw errors offline for s3 objects. - Update Gitpod profile resources to reflect base environment settings. +- Use INITIALISE subworkflow to start pipeline and validate parameters etc. ### Download diff --git a/nf_core/pipeline-template/lib/WorkflowMain.groovy b/nf_core/pipeline-template/lib/WorkflowMain.groovy index 5824dae2fb..9049d0b27c 100755 --- a/nf_core/pipeline-template/lib/WorkflowMain.groovy +++ b/nf_core/pipeline-template/lib/WorkflowMain.groovy @@ -2,54 +2,8 @@ // This file holds several functions specific to the main.nf workflow in the {{ name }} pipeline // -import nextflow.Nextflow - class WorkflowMain { - // - // Citation string for pipeline - // - public static String citation(workflow) { - return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + - // TODO nf-core: Add Zenodo DOI for pipeline after first release - //"* The pipeline\n" + - //" https://doi.org/10.5281/zenodo.XXXXXXX\n\n" + - "* The nf-core framework\n" + - " https://doi.org/10.1038/s41587-020-0439-x\n\n" + - "* Software dependencies\n" + - " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md" - } - - - // - // Validate parameters and print summary to screen - // - public static void initialise(workflow, params, log) { - - // Print workflow version and exit on --version - if (params.version) { - String workflow_version = NfcoreTemplate.version(workflow) - log.info "${workflow.manifest.name} ${workflow_version}" - System.exit(0) - } - - // Check that a -profile or Nextflow config has been provided to run the pipeline - NfcoreTemplate.checkConfigProvided(workflow, log) - - // Check that conda channels are set-up correctly - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - Utils.checkCondaChannels(log) - } - - // Check AWS batch settings - NfcoreTemplate.awsBatch(workflow, params) - - // Check input has been provided - if (!params.input) { - Nextflow.error("Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'") - } - } - {%- if igenomes %} // // Get attribute from genome config file e.g. fasta diff --git a/nf_core/pipeline-template/main.nf b/nf_core/pipeline-template/main.nf index 3d632eb8c5..b520d1f815 100644 --- a/nf_core/pipeline-template/main.nf +++ b/nf_core/pipeline-template/main.nf @@ -30,23 +30,7 @@ params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { validateParameters; paramsHelp } from 'plugin/nf-validation' - -// Print help message if needed -if (params.help) { - def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs) - def citation = '\n' + WorkflowMain.citation(workflow) + '\n' - def String command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv --genome GRCh37 -profile docker" - log.info logo + paramsHelp(command) + citation + NfcoreTemplate.dashedLine(params.monochrome_logs) - System.exit(0) -} - -// Validate input parameters -if (params.validate_params) { - validateParameters() -} - -WorkflowMain.initialise(workflow, params, log) +include { INITIALISE } from './subworkflows/nf-core/initialise/main.nf' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -60,6 +44,7 @@ include { {{ short_name|upper }} } from './workflows/{{ short_name }}' // WORKFLOW: Run main {{ name }} analysis pipeline // workflow {{ prefix_nodash|upper }}_{{ short_name|upper }} { + INITIALISE() {{ short_name|upper }} () } diff --git a/nf_core/pipeline-template/modules.json b/nf_core/pipeline-template/modules.json index 2154873150..99c00c5dc5 100644 --- a/nf_core/pipeline-template/modules.json +++ b/nf_core/pipeline-template/modules.json @@ -21,6 +21,15 @@ "installed_by": ["modules"] } } + }, + "subworkflows": { + "nf-core": { + "initialise": { + "branch": "master", + "git_sha": "709d34798f0fd91052be97ebb83f2a76d2174ba0", + "installed_by": ["subworkflows"] + } + } } } } diff --git a/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf b/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf new file mode 100644 index 0000000000..85b6cd8e79 --- /dev/null +++ b/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf @@ -0,0 +1,55 @@ +// This is a reimplementation of the basic initialise methods in the nf-core template +// The role of this subworkflow is to check the input parameters and print help messages +// Use this to start your nf-core pipeline + +include { paramsHelp; paramsSummaryLog; validateParameters } from 'plugin/nf-validation' + +workflow INITIALISE { + + // Print workflow version and exit on --version + if (params.version) { + String version_string = "" + + if (workflow.manifest.version) { + def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' + version_string += "${prefix_v}${workflow.manifest.version}" + } + + if (workflow.commitId) { + def git_shortsha = workflow.commitId.substring(0, 7) + version_string += "-g${git_shortsha}" + } + log.info "${workflow.manifest.name} ${version_string}" + System.exit(0) + } + + // Print citation for nf-core + def citation = "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + + "* The nf-core framework\n" + + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + + "* Software dependencies\n" + + " ${workflow.manifest.homePage}/blob/master/CITATIONS.md" + log.info citation + + // Print help message if needed + if (params.help) { + def String command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv -profile docker" + log.info paramsHelp(command) + System.exit(0) + } + + if ( params.validate_parameters != false ){ + validateParameters() + } + + if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { + log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + + " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + + " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + + " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + + "Please refer to the quick start section and usage docs for the pipeline.\n " + } + + log.info paramsSummaryLog(workflow) +} diff --git a/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml b/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml new file mode 100644 index 0000000000..b1ee015df8 --- /dev/null +++ b/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml @@ -0,0 +1,13 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "initialise" +description: Validate input parameters and print help messages +keywords: + - admin + - check + - help + - version +modules: +input: +output: +authors: + - "@adamrtalbot" diff --git a/nf_core/pipeline-template/workflows/pipeline.nf b/nf_core/pipeline-template/workflows/pipeline.nf index 9dfb0155f1..fb2ba96404 100644 --- a/nf_core/pipeline-template/workflows/pipeline.nf +++ b/nf_core/pipeline-template/workflows/pipeline.nf @@ -6,15 +6,6 @@ include { paramsSummaryLog; paramsSummaryMap } from 'plugin/nf-validation' -def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs) -def citation = '\n' + WorkflowMain.citation(workflow) + '\n' -def summary_params = paramsSummaryMap(workflow) - -// Print parameter summary log to screen -log.info logo + paramsSummaryLog(workflow) + citation - -Workflow{{ short_name[0]|upper }}{{ short_name[1:] }}.initialise(params, log) - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CONFIG FILES From e9be0298415d90b16dfcbcc5a70e96fcf1deaba2 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:48:14 +0100 Subject: [PATCH 2/9] Template fixes --- nf_core/pipeline-template/nextflow.config | 2 +- nf_core/pipeline-template/nextflow_schema.json | 2 +- nf_core/pipeline-template/workflows/pipeline.nf | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 31d6d90ccb..eeed49f31c 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -62,7 +62,7 @@ params { validationLenientMode = false validationSchemaIgnoreParams = 'genomes,igenomes_base' validationShowHiddenParams = false - validate_params = true + validate_parameters = true } diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index 080797b4eb..4c6c9beb77 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -237,7 +237,7 @@ "description": "Custom MultiQC yaml file containing HTML including a methods description.", "fa_icon": "fas fa-cog" }, - "validate_params": { + "validate_parameters": { "type": "boolean", "description": "Boolean whether to validate parameters against the schema at runtime", "default": true, diff --git a/nf_core/pipeline-template/workflows/pipeline.nf b/nf_core/pipeline-template/workflows/pipeline.nf index fb2ba96404..74fcedfa0a 100644 --- a/nf_core/pipeline-template/workflows/pipeline.nf +++ b/nf_core/pipeline-template/workflows/pipeline.nf @@ -4,7 +4,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { paramsSummaryLog; paramsSummaryMap } from 'plugin/nf-validation' +include { paramsSummaryMap } from 'plugin/nf-validation' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -50,6 +50,9 @@ include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoft // Info required for completion email and summary def multiqc_report = [] +// Get map of parameter values +def summary_params = paramsSummaryMap(workflow) + workflow {{ short_name|upper }} { ch_versions = Channel.empty() From cc01dd0ede532fa3f22340ad534b4fc3377653f9 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:12:46 +0100 Subject: [PATCH 3/9] Made sure it matches existing template --- nf_core/pipeline-template/main.nf | 2 +- nf_core/pipeline-template/modules.json | 2 +- nf_core/pipeline-template/nextflow.config | 2 +- nf_core/pipeline-template/nextflow_schema.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nf_core/pipeline-template/main.nf b/nf_core/pipeline-template/main.nf index b520d1f815..0a4bad7790 100644 --- a/nf_core/pipeline-template/main.nf +++ b/nf_core/pipeline-template/main.nf @@ -44,7 +44,7 @@ include { {{ short_name|upper }} } from './workflows/{{ short_name }}' // WORKFLOW: Run main {{ name }} analysis pipeline // workflow {{ prefix_nodash|upper }}_{{ short_name|upper }} { - INITIALISE() + INITIALISE(params.version, params.help, params.validate_params) {{ short_name|upper }} () } diff --git a/nf_core/pipeline-template/modules.json b/nf_core/pipeline-template/modules.json index 99c00c5dc5..1e893d5c51 100644 --- a/nf_core/pipeline-template/modules.json +++ b/nf_core/pipeline-template/modules.json @@ -26,7 +26,7 @@ "nf-core": { "initialise": { "branch": "master", - "git_sha": "709d34798f0fd91052be97ebb83f2a76d2174ba0", + "git_sha": "7b55a4631bebd1cf827a448d0b70386681fea475", "installed_by": ["subworkflows"] } } diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index eeed49f31c..31d6d90ccb 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -62,7 +62,7 @@ params { validationLenientMode = false validationSchemaIgnoreParams = 'genomes,igenomes_base' validationShowHiddenParams = false - validate_parameters = true + validate_params = true } diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index 4c6c9beb77..080797b4eb 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -237,7 +237,7 @@ "description": "Custom MultiQC yaml file containing HTML including a methods description.", "fa_icon": "fas fa-cog" }, - "validate_parameters": { + "validate_params": { "type": "boolean", "description": "Boolean whether to validate parameters against the schema at runtime", "default": true, From 61fbeb830c192f9b4d2321e66308ac751db34919 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:13:07 +0100 Subject: [PATCH 4/9] fixup --- .../subworkflows/nf-core/initialise/main.nf | 99 +++++++++++-------- 1 file changed, 56 insertions(+), 43 deletions(-) diff --git a/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf b/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf index 85b6cd8e79..0cbd37993b 100644 --- a/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf +++ b/nf_core/pipeline-template/subworkflows/nf-core/initialise/main.nf @@ -2,54 +2,67 @@ // The role of this subworkflow is to check the input parameters and print help messages // Use this to start your nf-core pipeline -include { paramsHelp; paramsSummaryLog; validateParameters } from 'plugin/nf-validation' +include { paramsHelp; paramsSummaryLog; paramsSummaryMap; validateParameters } from 'plugin/nf-validation' workflow INITIALISE { - // Print workflow version and exit on --version - if (params.version) { - String version_string = "" + take: + version // bool + help // bool + validate_params // bool - if (workflow.manifest.version) { - def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' - version_string += "${prefix_v}${workflow.manifest.version}" + main: + + // Print workflow version and exit on --version + if (version) { + String version_string = "" + + if (workflow.manifest.version) { + def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' + version_string += "${prefix_v}${workflow.manifest.version}" + } + + if (workflow.commitId) { + def git_shortsha = workflow.commitId.substring(0, 7) + version_string += "-g${git_shortsha}" + } + log.info "${workflow.manifest.name} ${version_string}" + System.exit(0) + } + + // Print citation for nf-core + def citation = "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + + "* The nf-core framework\n" + + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + + "* Software dependencies\n" + + " ${workflow.manifest.homePage}/blob/master/CITATIONS.md" + log.info citation + + // Print help message if needed + if (params.help) { + def String command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv -profile docker" + log.info paramsHelp(command) + System.exit(0) } - if (workflow.commitId) { - def git_shortsha = workflow.commitId.substring(0, 7) - version_string += "-g${git_shortsha}" + if ( params.validate_params != false ){ + validateParameters() } - log.info "${workflow.manifest.name} ${version_string}" - System.exit(0) - } - - // Print citation for nf-core - def citation = "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + - "* The nf-core framework\n" + - " https://doi.org/10.1038/s41587-020-0439-x\n\n" + - "* Software dependencies\n" + - " ${workflow.manifest.homePage}/blob/master/CITATIONS.md" - log.info citation - - // Print help message if needed - if (params.help) { - def String command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv -profile docker" - log.info paramsHelp(command) - System.exit(0) - } - - if ( params.validate_parameters != false ){ - validateParameters() - } - - if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { - log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + - "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + - " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + - " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + - " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + - "Please refer to the quick start section and usage docs for the pipeline.\n " - } - - log.info paramsSummaryLog(workflow) + + if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { + log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + + " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + + " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + + " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + + "Please refer to the quick start section and usage docs for the pipeline.\n " + } + + log.info paramsSummaryLog(workflow) + + summary_params = paramsSummaryMap(workflow) + + emit: + summary_params + } From 8153dc457591bfd9808b04ec829ab4e361e7b54e Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:13:31 +0100 Subject: [PATCH 5/9] Update tests to remove INITIALISE subworkflow before testing --- tests/subworkflows/remove.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/subworkflows/remove.py b/tests/subworkflows/remove.py index 53a948778b..d07a0fa336 100644 --- a/tests/subworkflows/remove.py +++ b/tests/subworkflows/remove.py @@ -12,6 +12,10 @@ def test_subworkflows_remove_uninstalled_subworkflow(self): def test_subworkflows_remove_subworkflow(self): """Test removing subworkflow and all it's dependencies after installing it""" + # Remove initialise subworkflow for clean slate + self.subworkflow_remove.remove("initialise") + + # Install subworkflow self.subworkflow_install.install("bam_sort_stats_samtools") subworkflow_path = Path(self.subworkflow_install.dir, "subworkflows", "nf-core") @@ -34,6 +38,10 @@ def test_subworkflows_remove_subworkflow(self): def test_subworkflows_remove_subworkflow_keep_installed_module(self): """Test removing subworkflow and all it's dependencies after installing it, except for a separately installed module""" + # Remove initialise subworkflow for clean slate + self.subworkflow_remove.remove("initialise") + + # Install subworkflow and module self.subworkflow_install.install("bam_sort_stats_samtools") self.mods_install.install("samtools/index") @@ -44,6 +52,7 @@ def test_subworkflows_remove_subworkflow_keep_installed_module(self): mod_json_before = ModulesJson(self.pipeline_dir).get_modules_json() assert self.subworkflow_remove.remove("bam_sort_stats_samtools") + mod_json_after = ModulesJson(self.pipeline_dir).get_modules_json() assert Path.exists(subworkflow_path) is False From 7e307e62ae164913ec2d02df12dd8e0b3277e73a Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:25:33 +0100 Subject: [PATCH 6/9] CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02025f19a8..6b97f3c755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ - ([#2415](https://github.com/nf-core/tools/pull/2415#issuecomment-1709847086)) Add autoMounts for apptainer. - Remove `igenomes_base` from the schema, so that nf-validation doesn't create a file path and throw errors offline for s3 objects. - Update Gitpod profile resources to reflect base environment settings. -- Use INITIALISE subworkflow to start pipeline and validate parameters etc. +- ([#2430](https://github.com/nf-core/tools/pull/2430)) - Use INITIALISE subworkflow to start pipeline and validate parameters etc. ### Download From 83ccc5ed1249226ac52d9f39e485524fac828ba0 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 21 Sep 2023 18:03:15 +0100 Subject: [PATCH 7/9] Test for updating modules fixed --- tests/subworkflows/update.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/subworkflows/update.py b/tests/subworkflows/update.py index 698086e186..6ff2387096 100644 --- a/tests/subworkflows/update.py +++ b/tests/subworkflows/update.py @@ -162,6 +162,9 @@ def test_update_with_config_dont_update(self): def test_update_with_config_fix_all(self): """Fix the version of all nf-core subworkflows""" + # Remove intialise + self.subworkflow_remove.remove("initialise") + # Install subworkflow at the latest version assert self.subworkflow_install.install("fastq_align_bowtie2") From eab144261e1070a57a03eebc1777c4bda6f83ee4 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:05:01 +0100 Subject: [PATCH 8/9] initialise-subworkflow-update --- nf_core/pipeline-template/modules.json | 2 +- .../subworkflows/nf-core/initialise/meta.yml | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/modules.json b/nf_core/pipeline-template/modules.json index 1e893d5c51..49486fb7f9 100644 --- a/nf_core/pipeline-template/modules.json +++ b/nf_core/pipeline-template/modules.json @@ -26,7 +26,7 @@ "nf-core": { "initialise": { "branch": "master", - "git_sha": "7b55a4631bebd1cf827a448d0b70386681fea475", + "git_sha": "2a3d1b469385914c4eeca70f36bc378473049d93", "installed_by": ["subworkflows"] } } diff --git a/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml b/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml index b1ee015df8..1d36484790 100644 --- a/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml +++ b/nf_core/pipeline-template/subworkflows/nf-core/initialise/meta.yml @@ -6,8 +6,28 @@ keywords: - check - help - version -modules: +components: [] input: + - version: + type: boolean + description: | + Structure: val(version) + Boolean to show the pipeline version and exit. + - help: + type: boolean + description: | + Structure: val(help) + Boolean to show the pipeline help message and exit. + - validate_params: + type: boolean + description: | + Structure: val(validate_params) + Whether to validate the parameters prior to starting the pipeline. output: + - summary_params: + type: value + description: | + Structure: val(summary_params) + A map of the parameters used in the pipeline. authors: - "@adamrtalbot" From 31a47a83337561fbb51118f89c324624cee2ee83 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:59:14 +0100 Subject: [PATCH 9/9] Re-add nf-core logo back to template --- nf_core/pipeline-template/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/nf_core/pipeline-template/main.nf b/nf_core/pipeline-template/main.nf index 0a4bad7790..606c56cd21 100644 --- a/nf_core/pipeline-template/main.nf +++ b/nf_core/pipeline-template/main.nf @@ -44,6 +44,7 @@ include { {{ short_name|upper }} } from './workflows/{{ short_name }}' // WORKFLOW: Run main {{ name }} analysis pipeline // workflow {{ prefix_nodash|upper }}_{{ short_name|upper }} { + log.info NfcoreTemplate.logo(workflow, params.monochrome_logs) INITIALISE(params.version, params.help, params.validate_params) {{ short_name|upper }} () }