-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft] Provide mapping from nextflow_schema.json to pipeline parameters format #3913
Comments
LinksCloud Pipeline Configuration Parameters sourceNextFlow nf-core pipeline does not receive parameters from environment variables. nf-core pipeline can receive parameters from the command line options or its config file (option
or there should be a code for this in the pipeline itself like this:
nf-core pipelines do not have such a code. Then, if we want to set pipeline parameters in the platform config, we will need to transfer these parameters either to the command line options, or merge them into the config file in the Properties/parameters mappingbold - required to translate
Type mappingPossible values of the nf-core pipeline attribute
Please note, in nf-core config, Group/section level parametersExample of nf-core config group-level parameters: "input_output_options": {
"title": "Input/output options", // <- transform to `section` attribute in config.json
"description": "Define the pipeline",
"required": [ "input", "outdir" ], // <- transform to `required` attribute in config.json
"properties": {
"input": {
"type": "string",
"format": "file-path",
"exists": true,
...
},
...
}
} During the convertion:
Validation attributesPossible validation attributes of the nf-core config:
`oneOf` attribute
"oneOf": [
{
"type": "integer",
"minimum": 250
},
{
"type": "integer",
"minimum": 0,
"maximum": 0
}
] This attribute shall be transformed to
So, specified example will be transformed in "type": "string",
"validation": [
{
"throw": "(<CURRENT_PARAMETER> < 250) || (<CURRENT_PARAMETER> < 0 || <CURRENT_PARAMETER> > 0)",
"message": "<CURRENT_PARAMETER> shall be greater or equal than 250. <CURRENT_PARAMETER> shall be no less than 0 and no greater than 0"
}
"oneOf": [
{
"type": "string",
"enum": ["auto"]
},
{
"type": "number",
"minimum": 0
}
] This attribute shall be transformed to
So, specified example will be transformed in "type": "string",
"validation": [
{
"throw": "(<CURRENT_PARAMETER> != 'auto') || (<CURRENT_PARAMETER> < 0)",
"message": "<CURRENT_PARAMETER> shall be no less than 0. <CURRENT_PARAMETER> may be 'auto'"
} |
Background
Nextflow allows to describe pipeline parameters as
nextflow_schema.json
file, Cloud Pipeline uses a similar approach withparameters
section inconfig.json
file.Approach
parameters
section inconfig.json
file as part of platform documentationnextflow_schema.json
andparameters
section inconfig.json
file as a comment to this issueThe text was updated successfully, but these errors were encountered: