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(nf-schema): replace nf-validation@1.3 by nf-schema@2.0.0 #1287

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
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/rnaseq/master/assets/schema_input.json",
"title": "nf-core/rnaseq pipeline - params.input schema",
"description": "Schema for the file provided with params.input",
Expand Down
15 changes: 9 additions & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,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

}

Expand Down Expand Up @@ -278,7 +274,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
Expand Down
49 changes: 14 additions & 35 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/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",
Expand Down Expand Up @@ -812,67 +812,46 @@
"default": true,
"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)."
}
}
}
},
"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"
}
]
}
6 changes: 3 additions & 3 deletions subworkflows/nf-core/utils_nfvalidation_plugin/main.nf

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

6 changes: 3 additions & 3 deletions workflows/rnaseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,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_SUBSAMPLE_FQ_SALMON } from '../../subworkflows/nf-core/fastq_subsample_fq_salmon'
Expand Down Expand Up @@ -111,7 +111,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) {
Expand Down
Loading