overture-stack/SONG

Feature Request - change the validation rules in Song base schema to support tumour only targeted seq submissions

lindaxiang opened this issue · 5 comments

Detailed Description

Many programs are planning to submit targeted sequencing data, while either paired tumor-normal sequencing or tumor-only sequencing is acceptable, we need to make change to the validation rule in Song base schema to support that.

The validation rules are:

  1. For samples with experimental_strategy in ["WGS", "WXS"]
  • If tumourNormalDesignation is Normal, field matchedNormalSubmitterSampleId must be null
  • if tumourNormalDesignation is Tumour, field matchedNormalSubmitterSampleId must be filled in string with format "$ref":"#/definitions/common/submitterId"
  1. For samples experimental_strategy in ["Targeted-Seq", "RNA-Seq"]
  • If tumourNormalDesignation is Normal, field matchedNormalSubmitterSampleId must be null
  • if tumourNormalDesignation is Tumour, field matchedNormalSubmitterSampleId could be null or filled in string with format "$ref":"#/definitions/common/submitterId"

@lindaxiang experimental_strategy is not part of the song base schema, is this part of a custom schema you want to update instead?

The build in legacy schema sequencing_experiment has a library_strategy with options including WGS and WGX, but I would prefer that we manage custom schemas on specific Song instances and not in the Song code base.

@joneubank yeah, that's the problem:
Now experimental_strategy is defined in dynamic schema, while matchedNormalSubmitterSampleId and tumourNormalDesignation are defined in base schema,
However, we need to cross validate their values.
Do you have any idea how we can do it?
Is it doable we define the validation rule in dynamic schema by cross check the properties which are defined in base schema?

Is it doable we define the validation rule in dynamic schema by cross check the properties which are defined in base schema?
@lindaxiang it might actually be. we should run a test to confirm.

Proposal - #818

Accepted PR, merged and published. #818