Skip to content
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

FEAT: Improve schema usage for input #1243

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ lint:
- docs/images/nf-core-sarek_logo_light.png
- lib/NfcoreTemplate.groovy
- lib/NfcoreSchema.groovy
schema_params: False
template_strings: False
multiqc_config: False
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- [#1243](https://github.com/nf-core/sarek/pull/1243) - Improve json schema usage for input

### Fixed

- [#1232](https://github.com/nf-core/sarek/pull/1232) - Fix Zenodo IDs in manifest
Expand Down
18 changes: 5 additions & 13 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@
"help_text": "A design file with information about the samples in your experiment. Use this parameter to specify the location of the input files. It has to be a comma-separated file with a header row. See [usage docs](https://nf-co.re/sarek/usage#input).\n\nIf no input file is specified, sarek will attempt to locate one in the `{outdir}` directory. If no input should be supplied, i.e. when --step is supplied or --build_from_index, then set --input false",
"fa_icon": "fas fa-file-csv",
"schema": "assets/schema_input.json",
"anyOf": [
{
"type": "string",
"format": "file-path",
"exists": true,
"mimetype": "text/csv",
"pattern": "^\\S+\\.csv$"
},
{
"type": "boolean",
"enum": ["false"]
}
Comment on lines -29 to -32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't this done so --step would work without input?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tried it locally with:

nextflow run . -profile test,docker --outdir results

followed by:

nextflow run . -profile test,docker --outdir results --input false --step recalibrate

and it worked without failures.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally yes, but we fixed it in nf-validation, now parameters evaluating to false are not validated

]
"type": "string",
"format": "file-path",
"exists": true,
"mimetype": "text/csv",
"pattern": "^\\S+\\.csv$"
},
"input_restart": {
"type": "string",
Expand Down