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

migrate to nf-schema #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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 main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { validateParameters; paramsHelp } from 'plugin/nf-validation'
include { validateParameters; paramsHelp } from 'plugin/nf-schema'

// Print help message if needed
if (params.help) {
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ singularity.registry = 'quay.io'

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

// Load igenomes.config if required
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/test/master/nextflow_schema.json",
"title": "nf-core/test pipeline parameters",
"description": "testing",
"type": "object",
"definitions": {
"$defs": {
Copy link
Member Author

Choose a reason for hiding this comment

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

if $defs is correct, something's wrong with the migration guide cc @ewels

Copy link
Member Author

Choose a reason for hiding this comment

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

yup: the replacement in the automatic migration script uses $defs, not defs

Screenshot 2024-07-10 at 09 18 37

"input_output_options": {
"title": "Input/output options",
"type": "object",
Expand Down Expand Up @@ -300,19 +300,19 @@
},
"allOf": [
{
"$ref": "#/definitions/input_output_options"
"$ref": "#/defs/input_output_options"
},
{
"$ref": "#/definitions/reference_genome_options"
"$ref": "#/defs/reference_genome_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 workflows/test.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { paramsSummaryLog; paramsSummaryMap } from 'plugin/nf-validation'
include { paramsSummaryLog; paramsSummaryMap } from 'plugin/nf-schema'

def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs)
def citation = '\n' + WorkflowMain.citation(workflow) + '\n'
Expand Down Expand Up @@ -70,8 +70,8 @@ workflow TEST {
file(params.input)
)
ch_versions = ch_versions.mix(INPUT_CHECK.out.versions)
// TODO: OPTIONAL, you can use nf-validation plugin to create an input channel from the samplesheet with Channel.fromSamplesheet("input")
// See the documentation https://nextflow-io.github.io/nf-validation/samplesheets/fromSamplesheet/
// TODO: OPTIONAL, you can use nf-schema plugin to create an input channel from the samplesheet with Channel.fromSamplesheet("input")
// See the documentation https://nextflow-io.github.io/nf-schema/samplesheets/fromSamplesheet/
Copy link
Member Author

Choose a reason for hiding this comment

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

@ewels this link is no longer valid, not sure if this is something to be consider either in templates potentially including this comment, or in the automatic migration command suggested by https://nextflow-io.github.io/nf-schema/latest/migration_guide/#updating-the-name-and-version-of-the-plugin, or whether an equivalent samplesheet should be served from the updated location

Copy link
Member

Choose a reason for hiding this comment

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

// ! There is currently no tooling to help you write a sample sheet schema

//
Expand Down
Loading