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

[BUG] ]Validation Error: GenomicVariations fails on caseLevelData.zygosity.id #32

Open
hcvdwerf opened this issue Oct 22, 2024 · 0 comments

Comments

@hcvdwerf
Copy link

hcvdwerf commented Oct 22, 2024

When running the script convert_csvTObff.py using the provided example files as input, I encountered a ValidationError related to GenomicVariations. The error suggests that the value provided for caseLevelData.zygosity.id is invalid, as it does not conform to the required CURIE format.

Steps to Reproduce:

  1. Use the example input files provided for the project.
  2. Run python convert_csvTObff.py on the given dataset.
  3. The dataset contains a caseLevelData.zygosity.id with a value of '1/0'.
  4. The script attempts to validate this value using pydantic validation in the GenomicVariations class.

Expected Behavior:
The value for caseLevelData.zygosity.id should either pass validation or provide a clearer error message on why it fails. If 1/0 is an incorrect value, the error message should suggest the correct format or offer more detailed guidance

pydantic_core._pydantic_core.ValidationError: 1 validation error for GenomicVariations caseLevelData.zygosity.id Value error, id must be CURIE, e.g. NCIT:C42331 [type=value_error, input_value='1/0', input_type=str] For further information visit https://errors.pydantic.dev/2.6/v/value_error

Traceback
Traceback (most recent call last): File "/usr/src/app/genomicVariations_csv.py", line 527, in <module> dict_generado, total_i=generate(dict_properties,list_of_headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/app/genomicVariations_csv.py", line 513, in generate GenomicVariations(**definitivedict) File "/usr/src/app/validators/genomicVariations.py", line 646, in __init__ super().__init__(**data) File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 171, in __init__ self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 1 validation error for GenomicVariations caseLevelData.zygosity.id Value error, id must be CURIE, e.g. NCIT:C42331 [type=value_error, input_value='1/0', input_type=str] For further information visit https://errors.pydantic.dev/2.6/v/value_error

Additional info
I delete following lines from GenomicVariations.csv where error occured as indicated by error message. After each deletion, run the conversion script convert_csvTObff.py again to assess if the issue was resolved.
line: 113
line: 114
line: 83
line: 82
line: 113
line: 96
line: 86

The same error kept occurring till after removing the aforementioned lines, then new error messages were generated, indicating additional issues beyond the original scope.

If removing all the lines after 60, then the remaining lines succeeded in conversion

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