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

Implement validation of nested schema #25

Open
mirpedrol opened this issue May 8, 2023 · 5 comments
Open

Implement validation of nested schema #25

mirpedrol opened this issue May 8, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@mirpedrol
Copy link
Collaborator

Implement validation of nested schema.
For example, maps or nf-core igenomes.

@awgymer
Copy link
Collaborator

awgymer commented Jul 19, 2023

Does this ticket also cover simple arrays?

@mirpedrol
Copy link
Collaborator Author

To add more context, this issue comes from the original issue in nf-core nf-core/tools#1554

Simple arrays should already be validated with "type": "array", however I haven't tested it. Do you have a test case to verify that?

@awgymer
Copy link
Collaborator

awgymer commented Jul 19, 2023

May be some crossed wires here.
I specifically am wanting to use yaml (or json) samplesheets with an array field.
My specific case is that I have a pipeline which does tumour/normal analysis and can take an arbitrary number of tumour input files for any given normal.
i.e. something like

---
- id: sample1
  normal: /path/to/some/file.bam
  tumour:
    - /path/to/tumour1.bam
    - /path/to/tumour2.bam
  cancer_type: aml

And then I would want to create some channel like: [[id: sample1], [normal_bam], [tumour_bams]]
In a perfect world that would be possible via fromSamplesheet but for now I would be happy with just having the samplesheet schema validation.

@mirpedrol
Copy link
Collaborator Author

I see, then this is worth a different issue, as it is a functionality for the channel factory more than validation. Thanks for pointing this use case out :)

@nvnieuwk nvnieuwk added the enhancement New feature or request label Oct 2, 2023
@nvnieuwk
Copy link
Collaborator

Maybe we should also look into implementing this in version 2.0?

@nvnieuwk nvnieuwk transferred this issue from nextflow-io/nf-validation Apr 23, 2024
@nvnieuwk nvnieuwk added this to the 2.1.0 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants