Summary log
paramsSummaryLog()
This function returns a string that can be logged to the terminal, summarizing the parameters provided to the pipeline.
Note
The summary prioritizes displaying only the parameters that are different than the default schema values.
Parameters which don't have a default in the JSON Schema and which have a value of null
, ""
, false
or 'false'
won't be returned in the map.
This is to streamline the extensive parameter lists often associated with pipelines, and highlight the customized elements.
This feature is essential for users to verify their configurations, like checking for typos or confirming proper resolution,
without wading through an array of default settings.
The function takes two arguments:
- The
WorkflowMetadata
object,workflow
(required) - File name of a schema file (optional, default:
nextflow_schema.json
).
Typical usage:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/nf-core/testpipeline/master/nextflow_schema.json",
"title": "nf-core/testpipeline pipeline parameters",
"description": "this is a test",
"type": "object",
"$defs": {
"input_output_options": {
"title": "Input/output options",
"type": "object",
"fa_icon": "fas fa-terminal",
"description": "Define where the pipeline should find input data and save output data.",
"required": ["input", "outdir"],
"properties": {
"input": {
"type": "string",
"format": "file-path",
"mimetype": "text/csv",
"schema": "assets/schema_input.json",
"pattern": "^\\S+\\.(csv|tsv|yaml|json)$",
"description": "Path to comma-separated file containing information about the samples in the experiment.",
"help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row. See [usage docs](https://nf-co.re/testpipeline/usage#samplesheet-input).",
"fa_icon": "fas fa-file-csv"
},
"outdir": {
"type": "string",
"format": "directory-path",
"description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.",
"fa_icon": "fas fa-folder-open"
}
}
}
},
"allOf": [
{
"$ref": "#/$defs/input_output_options"
}
]
}
Output:
N E X T F L O W ~ version 23.04.1
Launching `pipeline/main.nf` [sleepy_goldberg] DSL2 - revision: 7a280216f3
Core Nextflow options
runName : sleepy_goldberg
launchDir : /Users/demo/GitHub/nextflow-io/nf-schema/examples/paramsSummaryLog
workDir : /Users/demo/GitHub/nextflow-io/nf-schema/examples/paramsSummaryLog/work
projectDir : /Users/demo/GitHub/nextflow-io/nf-schema/examples/paramsSummaryLog/pipeline
userName : demo
profile : standard
configFiles:
Input/output options
input : samplesheet.csv
outdir : results
!! Only displaying parameters that differ from the pipeline defaults !!
------------------------------------------------------
Coloured logs
By default, the summary output is coloured using ANSI escape codes.
If you prefer, you can disable these by using the argument monochrome_logs, e.g. paramsHelp(monochrome_logs: true)
. Alternatively this can be set at a global level via parameter --monochrome_logs
or adding params.monochrome_logs = true
to a configuration file. Not --monochromeLogs
or params.monochromeLogs
is also supported.
paramsSummaryMap()
This function returns a Groovy Map summarizing parameters/workflow options used by the pipeline. As above, it only returns the provided parameters that are different to the default values.
This function takes the same arguments as paramsSummaryLog()
: the workflow
object and an optional schema file path.
Note
Parameters which don't have a default in the JSON Schema and which have a value of null
, ""
, false
or 'false'
won't be returned in the map.
Typical usage:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/nf-core/testpipeline/master/nextflow_schema.json",
"title": "nf-core/testpipeline pipeline parameters",
"description": "this is a test",
"type": "object",
"$defs": {
"input_output_options": {
"title": "Input/output options",
"type": "object",
"fa_icon": "fas fa-terminal",
"description": "Define where the pipeline should find input data and save output data.",
"required": ["input", "outdir"],
"properties": {
"input": {
"type": "string",
"format": "file-path",
"mimetype": "text/csv",
"schema": "assets/schema_input.json",
"pattern": "^\\S+\\.(csv|tsv|yaml|json)$",
"description": "Path to comma-separated file containing information about the samples in the experiment.",
"help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row. See [usage docs](https://nf-co.re/testpipeline/usage#samplesheet-input).",
"fa_icon": "fas fa-file-csv"
},
"outdir": {
"type": "string",
"format": "directory-path",
"description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.",
"fa_icon": "fas fa-folder-open"
}
}
}
},
"allOf": [
{
"$ref": "#/$defs/input_output_options"
}
]
}
Output:
N E X T F L O W ~ version 23.04.1
Launching `pipeline/main.nf` [happy_lamport] DSL2 - revision: c45338cd96
[Core Nextflow options:[runName:happy_lamport, launchDir:/Users/ewels/GitHub/nextflow-io/nf-schema/examples/paramsSummaryMap, workDir:/Users/ewels/GitHub/nextflow-io/nf-schema/examples/paramsSummaryMap/work, projectDir:/Users/ewels/GitHub/nextflow-io/nf-schema/examples/paramsSummaryMap/pipeline, userName:ewels, profile:standard, configFiles:], Input/output options:[input:samplesheet.csv, outdir:results]]