Skip to content

Generate output schema from output definition #5213

@bentsherman

Description

@bentsherman

Spun off from #5103

Nextflow should be able to generate an output schema from the workflow output definition, essentially as a list of index file schemas. See nf-core/fetchngs#312 for a concrete example (schema_outputs.yml).

For now, the index file should specify a schema file (using fetchngs as example):

output {
  'fastq' {
    index {
      path 'samplesheet.csv'
      schema 'assets/schema_samplesheet.yml'
    }
  }
}

This output definition would produce the following output schema:

$schema: 'http://json-schema.org/draft-07/schema'
$id: 'https://raw.githubusercontent.com/nf-core/fetchngs/master/schema_outputs.yml'
title: 'nf-core/fetchngs pipeline outputs'
description: ''
type: object
properties:
  samplesheet:
    type: string
    format: file-path
    mimetype: text/csv
    schema: assets/schema_samplesheet.yml

Extra notes:

  • Schema file should be JSON or YAML
  • Can be extended in the future to define index schema in the DSL directly instead of referencing an external schema file
  • See Flag files for downstream reporting via publishDir #4042 for discussion of other relevant metadata, which can be defined in the output target DSL
  • Should be generated on each run or via some separate command.
  • Should eventually be used with parameter schema for chaining pipelines.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions