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

Generate output schema from output definition #5213

Open
bentsherman opened this issue Aug 7, 2024 · 0 comments
Open

Generate output schema from output definition #5213

bentsherman opened this issue Aug 7, 2024 · 0 comments

Comments

@bentsherman
Copy link
Member

bentsherman commented Aug 7, 2024

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant