diff --git a/src/ga4gh/va_spec/base/validators.py b/src/ga4gh/va_spec/base/validators.py index 8e18ec5..997e8bd 100644 --- a/src/ga4gh/va_spec/base/validators.py +++ b/src/ga4gh/va_spec/base/validators.py @@ -127,8 +127,8 @@ def _validate_method_type_evidence_outcome( not valid for the specified method type, or if method type is invalid """ try: - parsed_method_type = cls.MethodType[method_type.upper()] - except KeyError as e: + parsed_method_type = cls.MethodType(method_type) + except ValueError as e: msg = f"{method_type!r} is not a valid {cls.__qualname__}.MethodType" raise ValueError(msg) from e allowed_criteria = cls.ALLOWED_CRITERIA_BY_METHOD_TYPE[parsed_method_type] diff --git a/src/ga4gh/va_spec/ccv_2022/models.py b/src/ga4gh/va_spec/ccv_2022/models.py index 86ed3f3..df3db3d 100644 --- a/src/ga4gh/va_spec/ccv_2022/models.py +++ b/src/ga4gh/va_spec/ccv_2022/models.py @@ -272,6 +272,7 @@ class VariantOncogenicityStatement(CCV2022MetadataMixin, Statement): ) classification: MappableConcept | iriReference = Field( ..., + description="A single term or phrase classifying the subject variant based on the result of direction and strength assessments of the Statement's Proposition, using terms from the ClinGen/CGC/VICC 2022 Guidelines for Oncogenicity.", ) specifiedBy: Method | iriReference = Field( ...,