Configuration
The plugin can be configured using several configuration options. These options have to be in the validation scope which means you can write them in two ways:
OR
parametersSchema
This option can be used to set the parameters JSON schema to be used by the plugin. This will affect parameter validation (validateParameters()), the summary logs (paramsSummaryLog() and paramsSummaryMap()) and the creation of the help messages.
This option can either be a path relative to the root of the pipeline directory or a full path to the JSON schema (Be wary to not use hardcoded local paths to ensure your pipeline will keep working on other systems)
monochromeLogs
This option can be used to turn of the colored logs from nf-schema. This can be useful if you run a Nextflow pipeline in an environment that doesn't support colored logging. This option will automatically be set to true when ANSI logging is disabled in Nextflow.
lenientMode
This option can be used to make the type validation more lenient. In normal cases a value of "12" will fail if the type is an integer. This will succeed in lenient mode since that string can be cast to an integer.
showHiddenParams
Deprecated
This configuration option has been deprecated since v2.1.0. Please use validation.help.showHidden instead.
By default the parameters, that have the "hidden": true annotation in the JSON schema, will not be shown in the help message. Turning on this option will make sure the hidden parameters are also shown.
ignoreParams
This option can be used to turn off the validation for certain parameters. It takes a list of parameter names as input.
Currently, the parameter nf_test_output is added to ignoreParams by default.
defaultIgnoreParams
Warning
This option should only be used by pipeline developers
This option does exactly the same as validation.ignoreParams, but provides pipeline developers with a way to set the default parameters that should be ignored. This way the pipeline users don't have to re-specify the default ignored parameters when using the validation.ignoreParams option.
maxErrValSize
Configure the maximum characters of a value that may be shown in an error message. It takes a whole number above or equal to 1. A value will be truncated when it goes over the maximum amount of characters.
Setting this option to -1 will allow any amount of characters for values.
See the below example where the limit is to 20 characters:
help
The validation.help config scope can be used to configure the creation of the help message.
This scope contains the following options:
enabled
This option is used to enable the creation of the help message when the help parameters are used in the nextflow run command.
shortParameter
This option can be used to change the --help parameter to another parameter. This parameter will print out the help message with all top level parameters.
--giveMeHelp will now display the help message instead of --help for this example. This parameter will print out the help message.
fullParameter
This option can be used to change the --helpFull parameter to another parameter.
--giveMeHelpFull will now display the expanded help message instead of --helpFull for this example.
showHiddenParameter
This option can be used to change the --showHidden parameter to another parameter. This parameter tells the plugin to also include the hidden parameters into the help message.
--showMeThoseHiddenParams will now make sure hidden parameters will be shown instead of --showHidden for this example.
showHidden
By default the parameters, that have the "hidden": true annotation in the JSON schema, will not be shown in the help message. Turning on this option will make sure the hidden parameters are also shown.
beforeText
This option does not affect the help message created by the paramsHelp() function
Any string provided to this option will printed before the help message.
Info
All color values (like \033[0;31m, which means the color red) will be filtered out when validation.monochromeLogs is set to true
command
This option does not affect the help message created by the paramsHelp() function
This option can be used to add an example command to the help message. This will be printed after the beforeText and before the help message.
validation.help.command = "nextflow run main.nf --input samplesheet.csv --outdir output" // default: ""
This example will print the following message:
Info
All color values (like \033[0;31m, which means the color red) will be filtered out when validation.monochromeLogs is set to true
afterText
This option does not affect the help message created by the paramsHelp() function
Any string provided to this option will be printed after the help message.
validation.help.afterText = "Please cite the pipeline owners when using this pipeline" // default: ""
Info
All color values (like \033[0;31m, which means the color red) will be filtered out when validation.monochromeLogs is set to true
enumLength
This option can be used to set the maximum length of enum values in the help message. This is useful when the enum values are very long and would make the help message hard to read.
The default value is set to the value in the COLUMNS environment variable or 100 characters if that variable isn't set. Set this option to -1 to disable the length limit.
Summary
The validation.summary config scope can be used to configure the output of the paramsSummaryLog() function.
This scope contains the following options:
beforeText
Any string provided to this option will printed before the parameters log message.
Info
All color values (like \033[0;31m, which means the color red) will be filtered out when validation.monochromeLogs is set to true
afterText
Any string provided to this option will be printed after the parameters log message.
validation.summary.afterText = "Please cite the pipeline owners when using this pipeline" // default: ""
Info
All color values (like \033[0;31m, which means the color red) will be filtered out when validation.monochromeLogs is set to true
hideParams
Takes a list of parameter names to exclude from the parameters summary created by paramsSummaryMap() and paramsSummaryLog()
Logging
The validation.logging config scope can be used to configure the logging of the plugin.
These config options can receive the following values:
skip: Skip loggingdebug: Log debug messages (only printed in the.nextflow.logfile)info: Log info messages (also printed in the terminal)warn: Log warning messages (also printed in the terminal, but in yellow)error: Fail the pipeline and print the error message
This scope contains the following options:
unrecognisedParams
This option can be used to configure the logging of unrecognised parameters.
unrecognisedHeaders
This option can be used to configure the logging of unrecognised headers in samplesheets.