88~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99*/
1010
11- include { UTILS_NFSCHEMA_PLUGIN } from ' ../../nf-core/utils_nfschema_plugin'
11+ include { checkCondaChannels } from ' plugin/nf-core-utils'
12+ include { checkConfigProvided } from ' plugin/nf-core-utils'
13+ include { checkProfileProvided } from ' plugin/nf-core-utils'
14+ include { completionEmail } from ' plugin/nf-core-utils'
15+ include { completionSummary } from ' plugin/nf-core-utils'
16+ include { dumpParametersToJSON } from ' plugin/nf-core-utils'
17+ include { getWorkflowVersion } from ' plugin/nf-core-utils'
18+ include { softwareVersionsToYAML } from ' plugin/nf-core-utils'
19+ include { paramsHelp } from ' plugin/nf-schema'
20+ include { paramsSummaryLog } from ' plugin/nf-schema'
1221include { paramsSummaryMap } from ' plugin/nf-schema'
1322include { samplesheetToList } from ' plugin/nf-schema'
14- include { paramsHelp } from ' plugin/nf-schema'
15- include { completionEmail } from ' ../../nf-core/utils_nfcore_pipeline'
16- include { completionSummary } from ' ../../nf-core/utils_nfcore_pipeline'
17- include { UTILS_NFCORE_PIPELINE } from ' ../../nf-core/utils_nfcore_pipeline'
18- include { UTILS_NEXTFLOW_PIPELINE } from ' ../../nf-core/utils_nextflow_pipeline'
23+ include { validateParameters } from ' plugin/nf-schema'
1924
2025/*
2126~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -45,12 +50,15 @@ workflow PIPELINE_INITIALISATION {
4550 //
4651 // Print version and exit if required and dump pipeline parameters to JSON file
4752 //
48- UTILS_NEXTFLOW_PIPELINE (
49- version,
50- true ,
51- outdir,
52- workflow. profile. tokenize(' ,' ). intersect([' conda' , ' mamba' ]). size() >= 1 ,
53- )
53+ if (version) {
54+ log. info(" ${ workflow.manifest.name} ${ getWorkflowVersion()} " )
55+ System . exit(0 )
56+ }
57+ def timestamp = new java.util.Date (). format(' yyyy-MM-dd_HH-mm-ss' )
58+ dumpParametersToJSON(params, " ${ outdir} /pipeline_info/params_${ timestamp} .json" )
59+ if (workflow. profile. tokenize(' ,' ). intersect([' conda' , ' mamba' ]). size() >= 1 ) {
60+ checkCondaChannels()
61+ }
5462
5563 //
5664 // Validate parameters and generate parameter summary to stdout
@@ -80,20 +88,29 @@ workflow PIPELINE_INITIALISATION {
8088 before_text = before_text. replaceAll(/ \0 33\[ [0-9;]*m/ , ' ' )
8189 }
8290
83- command = " nextflow run ${ workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"
84-
85- UTILS_NFSCHEMA_PLUGIN (
86- workflow,
87- validate_params,
88- null ,
89- help,
90- help_full,
91- show_hidden,
92- before_text,
93- after_text,
94- command,
95- null ,
96- )
91+ def command = " nextflow run ${ workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"
92+
93+ if (help || help_full) {
94+ log. info paramsHelp(
95+ [
96+ beforeText : before_text,
97+ afterText : after_text,
98+ command : command,
99+ showHidden : show_hidden,
100+ fullHelp : help_full,
101+ ],
102+ (help instanceof String && help != " true" ) ? help : " " ,
103+ )
104+ System . exit(0 )
105+ }
106+
107+ log. info before_text
108+ log. info paramsSummaryLog(workflow, parameters_schema : " nextflow_schema.json" )
109+ log. info after_text
110+
111+ if (validate_params) {
112+ validateParameters(parameters_schema : " nextflow_schema.json" )
113+ }
97114
98115 extra_text = """
99116\0 33[1;37mExtra informations\0 33[0m
@@ -110,7 +127,8 @@ workflow PIPELINE_INITIALISATION {
110127 //
111128 // Check config provided to the pipeline
112129 //
113- UTILS_NFCORE_PIPELINE (nextflow_cli_args)
130+ checkConfigProvided()
131+ checkProfileProvided(nextflow_cli_args)
114132
115133 //
116134 // Custom validation for pipeline parameters
0 commit comments