Skip to content

Error in CNVtranslator notebook example #575

Description

@mbaudis

The CNVtranslator notebook no. 6 uses an EFO class (CURIE) as input. However, the current translator fails (requires the string label value).

cnc = cnv_translator.translate_from("NC_000014.9:g.45002867_45015056del", "hgvs", copy_change="EFO:0030067")
...
pydantic_core._pydantic_core.ValidationError: 1 validation error for CopyNumberChange
copyChange
  Input should be 'complete genomic loss', 'high-level loss', 'low-level loss', 'loss', 'regional base ploidy', 'gain', 'low-level gain' or 'high-level gain' [type=enum, input_value='EFO:0030067', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/enum

This works:

cnc = cnv_translator.translate_from("NC_000014.9:g.45002867_45015056del", "hgvs", cop\
y_change="loss")

This is probably due to a change in the enum values from the well formed curies to malformed string labels. This is a nice example why this shouldn't be done: EFO:0030067 is variously labeled as "loss" (as used in VRS v2) or (authoritative) "copy number loss"1.

Recommendation: Use (or at least allow) the CURIEs. And/or use the exact labels from the ontology definition.

Footnotes

  1. I am myself not consistent in the use since it is a label.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions