|
8 | 8 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
9 | 9 | */ |
10 | 10 |
|
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' |
21 | | -include { paramsSummaryMap } from 'plugin/nf-schema' |
22 | | -include { samplesheetToList } from 'plugin/nf-schema' |
23 | | -include { validateParameters } from 'plugin/nf-schema' |
| 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 { paramsHelp } from 'plugin/nf-schema' |
| 19 | +include { paramsSummaryLog } from 'plugin/nf-schema' |
| 20 | +include { paramsSummaryMap } from 'plugin/nf-schema' |
| 21 | +include { samplesheetToList } from 'plugin/nf-schema' |
| 22 | +include { validateParameters } from 'plugin/nf-schema' |
24 | 23 |
|
25 | 24 | /* |
26 | 25 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -54,8 +53,9 @@ workflow PIPELINE_INITIALISATION { |
54 | 53 | log.info("${workflow.manifest.name} ${getWorkflowVersion()}") |
55 | 54 | System.exit(0) |
56 | 55 | } |
57 | | - def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') |
58 | | - dumpParametersToJSON(params, "${outdir}/pipeline_info/params_${timestamp}.json") |
| 56 | + if (outdir) { |
| 57 | + dumpParametersToJSON(outdir, params) |
| 58 | + } |
59 | 59 | if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { |
60 | 60 | checkCondaChannels() |
61 | 61 | } |
@@ -91,22 +91,24 @@ workflow PIPELINE_INITIALISATION { |
91 | 91 | def command = "nextflow run ${workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>" |
92 | 92 |
|
93 | 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 : "", |
| 94 | + log.info( |
| 95 | + paramsHelp( |
| 96 | + [ |
| 97 | + beforeText: before_text, |
| 98 | + afterText: after_text, |
| 99 | + command: command, |
| 100 | + showHidden: show_hidden, |
| 101 | + fullHelp: help_full, |
| 102 | + ], |
| 103 | + (help instanceof String && help != "true") ? help : "", |
| 104 | + ) |
103 | 105 | ) |
104 | 106 | System.exit(0) |
105 | 107 | } |
106 | 108 |
|
107 | | - log.info before_text |
108 | | - log.info paramsSummaryLog(workflow, parameters_schema: "nextflow_schema.json") |
109 | | - log.info after_text |
| 109 | + log.info(before_text) |
| 110 | + log.info(paramsSummaryLog(workflow, parameters_schema: "nextflow_schema.json")) |
| 111 | + log.info(after_text) |
110 | 112 |
|
111 | 113 | if (validate_params) { |
112 | 114 | validateParameters(parameters_schema: "nextflow_schema.json") |
@@ -272,12 +274,12 @@ def paramsSummaryMultiqc(summary_params) { |
272 | 274 | } |
273 | 275 |
|
274 | 276 | def yaml_file_text = "id: '${workflow.manifest.name.replace('/', '-')}-summary'\n" as String |
275 | | - yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" |
276 | | - yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" |
277 | | - yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" |
278 | | - yaml_file_text += "plot_type: 'html'\n" |
279 | | - yaml_file_text += "data: |\n" |
280 | | - yaml_file_text += "${summary_section}" |
| 277 | + yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" |
| 278 | + yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" |
| 279 | + yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" |
| 280 | + yaml_file_text += "plot_type: 'html'\n" |
| 281 | + yaml_file_text += "data: |\n" |
| 282 | + yaml_file_text += "${summary_section}" |
281 | 283 |
|
282 | 284 | return yaml_file_text |
283 | 285 | } |
|
0 commit comments