Skip to content

Commit 39e1c25

Browse files
committed
polish
1 parent e80b2d8 commit 39e1c25

1 file changed

Lines changed: 35 additions & 33 deletions

File tree

  • subworkflows/local/utils_nfcore_seqinspector_pipeline

subworkflows/local/utils_nfcore_seqinspector_pipeline/main.nf

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@
88
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
*/
1010

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'
2423

2524
/*
2625
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -54,8 +53,9 @@ workflow PIPELINE_INITIALISATION {
5453
log.info("${workflow.manifest.name} ${getWorkflowVersion()}")
5554
System.exit(0)
5655
}
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+
}
5959
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
6060
checkCondaChannels()
6161
}
@@ -91,22 +91,24 @@ workflow PIPELINE_INITIALISATION {
9191
def command = "nextflow run ${workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"
9292

9393
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+
)
103105
)
104106
System.exit(0)
105107
}
106108

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)
110112

111113
if (validate_params) {
112114
validateParameters(parameters_schema: "nextflow_schema.json")
@@ -272,12 +274,12 @@ def paramsSummaryMultiqc(summary_params) {
272274
}
273275

274276
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}"
281283

282284
return yaml_file_text
283285
}

0 commit comments

Comments
 (0)