InformaticsGenomicMedicine / DraftCoreDataModel

Draft of CoreDataModel
Apache License 2.0
0 stars 0 forks source link

Clarify validation of sequence context #4

Closed rrfreimuth closed 1 year ago

rrfreimuth commented 1 year ago

https://github.com/InformaticsGenomicMedicine/DraftCoreDataModel/blob/79450932a44ee677816f9c02e6f5660ea03e5ec1/src/core_variant.py#L24C8-L25

  1. Ensure the conditional statement works if chrom = 0 (which might be interpreted as false)
  2. Please change the error message to "Required to define either the pair (chrom AND genomeBuild) or sequenceId"
SalemBajjali commented 1 year ago

Part 2 of this issue has been fixed.

In this conditional statement I am only checking if the user inputs both chrom and genomeBuild or just sequenceId. If the user inputs and invalid value like chrom = 0, this is caught in the _validate_chrom step where the user is given this error message: ValueError: Invalid chrom input:"0". Allowed types: ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y', 'MT').

SalemBajjali commented 1 year ago

Reviewed with @rrfreimuth.