Skip to content

Json schema improvements #341

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

Closed
Closed
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
2 changes: 1 addition & 1 deletion assets/schema_input.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/nf-core/fetchngs/master/assets/schema_input.json",
"title": "nf-core/fetchngs pipeline - params.input schema",
"description": "Schema for the file provided with params.input",
Expand Down
4 changes: 2 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": ["subworkflows"]
},
"utils_nfvalidation_plugin": {
"utils_nfschema_plugin": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e",
"installed_by": ["subworkflows"]
}
}
Expand Down
10 changes: 5 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ params {
max_time = '240.h'

// Schema validation default options
validationFailUnrecognisedParams = false
validationLenientMode = false
validationShowHiddenParams = false
validationSchemaIgnoreParams = ''
// validationFailUnrecognisedParams = false
// validationLenientMode = false
// validationShowHiddenParams = false
// validationSchemaIgnoreParams = ''
validate_params = true

// Deprecated options
Expand Down Expand Up @@ -176,7 +176,7 @@ singularity.registry = 'quay.io'

// Nextflow plugins
plugins {
id 'nf-validation@1.1.3' // Validation of pipeline parameters and creation of an input channel from a sample sheet
id 'nf-schema@2.3.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}

// Export these variables to prevent local Python/R libraries from conflicting with those in the container
Expand Down
14 changes: 7 additions & 7 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/nf-core/fetchngs/master/nextflow_schema.json",
"title": "nf-core/fetchngs pipeline parameters",
"description": "Pipeline to fetch metadata and raw FastQ files from public databases",
"type": "object",
"definitions": {
"$defs": {
"input_output_options": {
"title": "Input/output options",
"type": "object",
Expand Down Expand Up @@ -269,19 +269,19 @@
},
"allOf": [
{
"$ref": "#/definitions/input_output_options"
"$ref": "#/$defs/input_output_options"
},
{
"$ref": "#/definitions/institutional_config_options"
"$ref": "#/$defs/institutional_config_options"
},
{
"$ref": "#/definitions/max_job_request_options"
"$ref": "#/$defs/max_job_request_options"
},
{
"$ref": "#/definitions/generic_options"
"$ref": "#/$defs/generic_options"
},
{
"$ref": "#/definitions/deprecated_options"
"$ref": "#/$defs/deprecated_options"
}
]
}
15 changes: 6 additions & 9 deletions subworkflows/local/utils_nfcore_fetchngs_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
========================================================================================
*/

include { UTILS_NFVALIDATION_PLUGIN } from '../../nf-core/utils_nfvalidation_plugin'
include { fromSamplesheet } from 'plugin/nf-validation'
include { paramsSummaryMap } from 'plugin/nf-validation'
include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin'
include { samplesheetToList } from 'plugin/nf-schema'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline'
include { completionEmail } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary } from '../../nf-core/utils_nfcore_pipeline'
Expand Down Expand Up @@ -56,13 +56,10 @@ workflow PIPELINE_INITIALISATION {
pre_help_text = nfCoreLogo(monochrome_logs)
post_help_text = '\n' + workflowCitation() + '\n' + dashedLine(monochrome_logs)
def String workflow_command = "nextflow run ${workflow.manifest.name} -profile <docker/singularity/.../institute> --input ids.csv --outdir <OUTDIR>"
UTILS_NFVALIDATION_PLUGIN (
help,
workflow_command,
pre_help_text,
post_help_text,
UTILS_NFSCHEMA_PLUGIN (
workflow,
validate_params,
"nextflow_schema.json"
null
)

//
Expand Down
46 changes: 46 additions & 0 deletions subworkflows/nf-core/utils_nfschema_plugin/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions subworkflows/nf-core/utils_nfschema_plugin/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading