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

Make FileType validations configurable in dynamic schemas #852

Open
2 of 3 tasks
joneubank opened this issue Aug 28, 2024 · 1 comment
Open
2 of 3 tasks

Make FileType validations configurable in dynamic schemas #852

joneubank opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
breaking-change Changes to the code might result in breaking-changes

Comments

@joneubank
Copy link
Contributor

joneubank commented Aug 28, 2024

Summary of request

It is desired to have dynamic schemas define the file types that can be submitted for each type of analysis. As a practical example, the file types submitted to sequencing experiments (BAM) are not the same as for variant calls (VCF), and if a new analysis schema was created for Volumetric Imaging files another file type would be required.

Details

Currently the allowed file types are an arbitrary list defined in the base schema. With this feature request, this would be changed such that:

  • The base schema allows any string value for file types
  • There is a mechanism in dynamic schemas to define additional restrictions on file.fileType for that Analysis Type

Desired solution

  1. Modify the Base Schema such that:
  • fileType is its own definition
  • The only validation for fileType is that it is a string
  • file.fileType references the fileType definition
  • fileType is a required property of file
  1. Modify the Analysis Type Registration schema such that:
  • If the user provides a definition for file.fileType it will merge with the definition from the base schema.
  • This will allow the user to add additional restrictions on file.fileType for this analysis type

I am not sure if the current schema merging process will allow type definitions to be extended/merged in this way. Hopefully some quick trials will determine if this is possible.

If not possible in this way, we should discuss other mechanisms for adding fileType validation rules to a schema. It is always an option that the user provides these additional validations separately from the dynamic schema definition and we programatically add those rules into the merged analysis schema.

Additional context

Once this process is modified, we may also need to make some minor updates to related processes:

  • Data migration to update the two legacy analysis types that Song has pre-loaded into the database. The list of valid file types for both sequencing-experiment and variant-calling should be specific to those analysis types, not the full list they are right now.
@joneubank joneubank added the breaking-change Changes to the code might result in breaking-changes label Oct 2, 2024
@justincorrigible
Copy link
Member

note re definiton merging: it seems SANBI has run into some issues trying to do that, and they have kindly documented their findings here. Sharing their ticket here in case it helps save some research

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes to the code might result in breaking-changes
Projects
None yet
Development

No branches or pull requests

3 participants