diff --git a/assets/schema_input.json b/assets/schema_input.json index 1af6309dd..e6de3c264 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -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/rnaseq/master/assets/schema_input.json", "title": "nf-core/rnaseq pipeline - params.input schema", "description": "Schema for the file provided with params.input", diff --git a/nextflow.config b/nextflow.config index 1c46d7c2e..9d7e638b8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -130,11 +130,7 @@ params { max_time = '240.h' // Schema validation default options - validationFailUnrecognisedParams = false - validationLenientMode = false - validationSchemaIgnoreParams = 'genomes,igenomes_base' - validationShowHiddenParams = false - validate_params = true + validate_params = true } @@ -288,7 +284,14 @@ 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.0.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet +} + +validation { + failUnrecognisedParams = false + lenientMode = true + defaultIgnoreParams = [ 'genomes', 'igenomes_base' ] + showHiddenParams = false } // Load igenomes.config if required diff --git a/nextflow_schema.json b/nextflow_schema.json index d89b6398e..99a6263d3 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -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/rnaseq/master/nextflow_schema.json", "title": "nf-core/rnaseq pipeline parameters", "description": "RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control.", "type": "object", - "definitions": { + "$defs": { "input_output_options": { "title": "Input/output options", "type": "object", @@ -827,27 +827,6 @@ "fa_icon": "fas fa-check-square", "hidden": true }, - "validationShowHiddenParams": { - "type": "boolean", - "fa_icon": "far fa-eye-slash", - "description": "Show all params when using `--help`", - "hidden": true, - "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters." - }, - "validationFailUnrecognisedParams": { - "type": "boolean", - "fa_icon": "far fa-check-circle", - "description": "Validation of parameters fails when an unrecognised parameter is found.", - "hidden": true, - "help_text": "By default, when an unrecognised parameter is found, it returns a warinig." - }, - "validationLenientMode": { - "type": "boolean", - "fa_icon": "far fa-check-circle", - "description": "Validation of parameters in lenient more.", - "hidden": true, - "help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)." - }, "pipelines_testdata_base_path": { "type": "string", "fa_icon": "far fa-check-circle", @@ -860,40 +839,40 @@ }, "allOf": [ { - "$ref": "#/definitions/input_output_options" + "$ref": "#/defs/input_output_options" }, { - "$ref": "#/definitions/reference_genome_options" + "$ref": "#/defs/reference_genome_options" }, { - "$ref": "#/definitions/read_trimming_options" + "$ref": "#/defs/read_trimming_options" }, { - "$ref": "#/definitions/read_filtering_options" + "$ref": "#/defs/read_filtering_options" }, { - "$ref": "#/definitions/umi_options" + "$ref": "#/defs/umi_options" }, { - "$ref": "#/definitions/alignment_options" + "$ref": "#/defs/alignment_options" }, { - "$ref": "#/definitions/optional_outputs" + "$ref": "#/defs/optional_outputs" }, { - "$ref": "#/definitions/quality_control" + "$ref": "#/defs/quality_control" }, { - "$ref": "#/definitions/process_skipping_options" + "$ref": "#/defs/process_skipping_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" } ] } diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf index 2585b65d1..50155c08c 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf @@ -8,9 +8,9 @@ ======================================================================================== */ -include { paramsHelp } from 'plugin/nf-validation' -include { paramsSummaryLog } from 'plugin/nf-validation' -include { validateParameters } from 'plugin/nf-validation' +include { paramsHelp } from 'plugin/nf-schema' +include { paramsSummaryLog } from 'plugin/nf-schema' +include { validateParameters } from 'plugin/nf-schema' /* ======================================================================================== diff --git a/workflows/rnaseq/main.nf b/workflows/rnaseq/main.nf index facd42e5f..550c0346f 100755 --- a/workflows/rnaseq/main.nf +++ b/workflows/rnaseq/main.nf @@ -46,8 +46,8 @@ include { BEDTOOLS_GENOMECOV as BEDTOOLS_GENOMECOV_REV } from '../../mod // // SUBWORKFLOW: Consisting entirely of nf-core/modules // -include { paramsSummaryMap } from 'plugin/nf-validation' -include { fromSamplesheet } from 'plugin/nf-validation' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' include { paramsSummaryMultiqc } from '../../subworkflows/nf-core/utils_nfcore_pipeline' include { softwareVersionsToYAML } from '../../subworkflows/nf-core/utils_nfcore_pipeline' include { FASTQ_ALIGN_HISAT2 } from '../../subworkflows/nf-core/fastq_align_hisat2' @@ -107,7 +107,7 @@ workflow RNASEQ { // Create channel from input file provided through params.input // Channel - .fromSamplesheet("input") + .fromList(samplesheetToList(params.input, "$projectDir/assets/schema_input.json")) .map { meta, fastq_1, fastq_2 -> if (!fastq_2) {