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-validation. This can be useful if you run a Nextflow pipeline in an environment that doesn't support colored logging.
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
.
failUnrecognisedParams
By default the validateParameters()
function will only give a warning if an unrecognised parameter has been given. This usually indicates that a typo has been made and can be easily overlooked when the plugin only emits a warning. You can turn this warning into an error with the failUnrecognisedParams
option.
failUnrecognisedHeaders
By default the samplesheetToList()
function will only give a warning if an unrecognised header is present in the samplesheet. This usually indicates that a typo has been made and can be easily overlooked when the plugin only emits a warning. You can turn this warning into an error with the failUnrecognisedHeaders
option.
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.
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
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()