-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from nextflow-io/docs-clarification
Docs clarification
- Loading branch information
Showing
3 changed files
with
84 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,37 @@ A full list of changes can be found in the [changelog](https://github.com/nextfl | |
|
||
## Updating your pipeline | ||
|
||
Updating your pipeline can be done in a couple simple steps. | ||
|
||
### Updating the name and version of the plugin | ||
|
||
The name and the version of the plugin should be updated from `nf-validation` to `[email protected]`: | ||
|
||
=== "nf-validation" | ||
|
||
```groovy | ||
plugins { | ||
id '[email protected]' | ||
} | ||
``` | ||
|
||
=== "nf-schema" | ||
|
||
```groovy | ||
plugins { | ||
id '[email protected]' | ||
} | ||
``` | ||
|
||
Additionally, all includes from `nf-validation` should be updated to `nf-schema`. This can easily be done with the following command: | ||
|
||
```bash | ||
find . -type f -name "*.nf" -exec sed -i -e "s/from 'plugin\/nf-validation'/from 'plugin\/nf-schema'/g" - | ||
e 's/from "plugin\/nf-validation"/from "plugin\/nf-schema"/g' {} + | ||
``` | ||
|
||
### Updating the JSON schema files | ||
|
||
If you aren't using any special features in your schemas, you can simply update your `nextflow_schema.json` file using the following command: | ||
|
||
```bash | ||
|
@@ -33,10 +64,16 @@ This will replace the old schema draft specification (`draft-07`) by the new one | |
|
||
!!! note | ||
|
||
Repeat this command for every JSON schema you use in your pipeline. e.g. for the default samplesheet schema in nf-core pipelines: | ||
`bash sed -i -e 's/http:\/\/json-schema.org\/draft-07\/schema/https:\/\/json-schema.org\/draft\/2020-12\/schema/g' -e 's/definitions/defs/g' assets/schema_input.json ` | ||
Repeat this command for every JSON schema used in your pipeline. e.g. for the default samplesheet schema in nf-core pipelines: | ||
`bash sed -i -e 's/http:\/\/json-schema.org\/draft-07\/schema/https:\/\/json-schema.org\/draft\/2020-12\/schema/g' -e 's/definitions/defs/g' assets/schema_input.json` | ||
|
||
!!! warning | ||
|
||
Next you should update the `.fromSamplesheet` channel factory to the `samplesheetToList` function. Following tabs shows the difference between the versions: | ||
This will not update changes to special fields in the schema, see the [guide](#updating-special-keywords-in-json-schemas) for special JSON schema keywords on how to update these | ||
|
||
### Update the samplesheet conversion | ||
|
||
The `.fromSamplesheet` channel factory should be converted to the `samplesheetToList` function. Following tabs shows how to use the function to get the same effect as the channel factory: | ||
|
||
=== "nf-validation" | ||
|
||
|
@@ -56,6 +93,39 @@ Next you should update the `.fromSamplesheet` channel factory to the `sampleshee | |
|
||
This change was necessary to make it possible for pipelines to be used as pluggable workflows. This also enables the validation and conversion of files generated by the pipeline. | ||
|
||
### Updating configuration | ||
|
||
The configuration parameters have been converted to a Nextflow configuration option. You can now access these options using the `validation` config scope: | ||
|
||
```groovy | ||
validation.<option> = <value> | ||
``` | ||
|
||
OR | ||
|
||
```groovy | ||
validation { | ||
<option1> = <value1> | ||
<option2> = <value2> | ||
} | ||
``` | ||
|
||
See this table for an overview of what the new configuration options are for the old parameters: | ||
|
||
| Old parameter | New config option(s) | | ||
| ----------------------------------------------------- | -------------------------------------------------------------------------------- | | ||
| `params.validationMonochromeLogs = <boolean>` | `validation.monochromeLogs = <boolean>` | | ||
| `params.validationLenientMode = <boolean>` | `validation.lenientMode = <boolean>` | | ||
| `params.validationFailUnrecognisedParams = <boolean>` | `validation.failUnrecognisedParams = <boolean>` | | ||
| `params.validationShowHiddenParams = <boolean>` | `validation.showHiddenParams = <boolean>` | | ||
| `params.validationIgnoreParams = <string>` | `validation.defaultIgnoreParams = <list>` and `validation.ignoreParams = <list>` | | ||
|
||
!!! note | ||
|
||
`defaultIgnoreParams` is meant to be used by pipeline developers to set the parameters which should always be ignored. `ignoreParams` is meant for the pipeline user to ignore certain parameters. | ||
|
||
## Updating special keywords in JSON schemas | ||
|
||
If you are using any special features in your schemas, you will need to update your schemas manually. Please refer to the [JSON Schema draft 2020-12 release notes](https://json-schema.org/draft/2020-12/release-notes) and [JSON schema draft 2019-09 release notes](https://json-schema.org/draft/2019-09/release-notes) for more information. | ||
|
||
However here are some guides to the more common migration patterns: | ||
|
@@ -185,34 +255,3 @@ When you use `dependentRequired` in your schemas, you should update it like this | |
} | ||
} | ||
``` | ||
|
||
### Updating configuration | ||
|
||
The configuration parameters have been converted to a Nextflow configuration option. You can now access these options using the `validation` config scope: | ||
|
||
```groovy | ||
validation.<option> = <value> | ||
``` | ||
|
||
OR | ||
|
||
```groovy | ||
validation { | ||
<option1> = <value1> | ||
<option2> = <value2> | ||
} | ||
``` | ||
|
||
See this table for an overview of what the new configuration options are for the old parameters | ||
|
||
| Old parameter | New config option(s) | | ||
| ----------------------------------------------------- | -------------------------------------------------------------------------------- | | ||
| `params.validationMonochromeLogs = <boolean>` | `validation.monochromeLogs = <boolean>` | | ||
| `params.validationLenientMode = <boolean>` | `validation.lenientMode = <boolean>` | | ||
| `params.validationFailUnrecognisedParams = <boolean>` | `validation.failUnrecognisedParams = <boolean>` | | ||
| `params.validationShowHiddenParams = <boolean>` | `validation.showHiddenParams = <boolean>` | | ||
| `params.validationIgnoreParams = <string>` | `validation.defaultIgnoreParams = <list>` and `validation.ignoreParams = <list>` | | ||
|
||
!!! note | ||
|
||
`defaultIgnoreParams` is meant to be used by pipeline developers to set the parameters which should always be ignored. `ignoreParams` is meant for the pipeline user to ignore certain parameters. |