diff --git a/pyproject.toml b/pyproject.toml index c0627f6..8d9c00c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,8 +31,8 @@ keywords = [ requires-python = ">=3.10" dynamic = ["version"] dependencies = [ - "ga4gh.vrs~=2.4.0-a0", - "ga4gh.cat_vrs~=0.8.0-a0", + "ga4gh.vrs~=2.4.0-a1", + "ga4gh.cat_vrs~=0.8.0-a1", "pydantic>=2.0,<3.0", "typing_extensions", ] diff --git a/src/ga4gh/va_spec/acmg_2015/models.py b/src/ga4gh/va_spec/acmg_2015/models.py index 362645d..466605c 100644 --- a/src/ga4gh/va_spec/acmg_2015/models.py +++ b/src/ga4gh/va_spec/acmg_2015/models.py @@ -9,6 +9,7 @@ from ga4gh.core.models import MappableConcept, iriReference from ga4gh.va_spec.base.core import ( + Direction, EvidenceLine, Method, Statement, @@ -40,7 +41,7 @@ class AcmgClassification(str, Enum): class VariantPathogenicityEvidenceLine(EvidenceLine): """An Evidence Line that describes how a specific type of information was - interpreted as evidence for or againtst a variant's pathogenicity. In the ACMG + interpreted as evidence for or against a variant's pathogenicity. In the ACMG Framework, evidence is assessed by determining if a specific criterion (e.g. 'PM2') with a default strength (e.g. 'moderate') is 'met' or 'not met', and in some cases adjusting the default strength based on the quality and abundance of evidence. @@ -48,15 +49,19 @@ class VariantPathogenicityEvidenceLine(EvidenceLine): targetProposition: VariantPathogenicityProposition | None = Field( default=None, - description="A Variant Pathogenicity Proposition against which specific information was assessed, in determining the strength and direction of support this information provides as evidence.", + description="A Variant Pathogenicity Proposition against which a specific type of evidence was assessed, to determine the strength and direction of support this evidence provides for or against the proposition's validity.", + ) + directionOfEvidenceProvided: Direction = Field( + ..., + description="The direction of support that the Evidence Line is determined to provide toward its target Proposition (supports, disputes, neutral). For ACMG-based assessments, if a pathogenicity criterion is 'met' in the Evidence Line the direction is 'supports', if a benignity criterion is 'met' the direction is 'disputes', and if a criteria is 'not met' the direction is 'none'.", ) strengthOfEvidenceProvided: MappableConcept | None = Field( default=None, - description="The strength of support that an Evidence Line is determined to provide for or against the proposed pathogenicity of the assessed variant. Strength is evaluated relative to the direction indicated by the 'directionOfEvidenceProvided' attribute. The indicated enumeration constrains the nested MappableConcept.primaryCoding > Coding.code attribute when capturing evidence strength. Conditional requirement: if directionOfEvidenceProvided is either 'supports' or 'disputes', then this attribute is required. If it is 'none', then this attribute is not allowed.", + description="The strength of support that an Evidence Line is determined to provide for or against the proposed pathogenicity of the assessed variant. Strength is evaluated relative to the direction indicated by the 'directionOfEvidenceProvided' attribute, and captured using a MappableConcept, whose nested 'code' field is bound to an enumerated set of values. Conditional requirement: if `directionOfEvidenceProvided` is either 'supports' or 'disputes', then this attribute is required. If it is 'none', then this attribute is not allowed.", ) specifiedBy: Method | iriReference = Field( ..., - description="The guidelines that were followed to assess variant information as evidence for or against the assessed variant's pathogenicity.", + description="The guidelines or rubrics followed in interpreting evidence, to determine the strength and direction of support that it provides for or against a variant's pathogenicity. While the ACMG Criteria themselves provide minimal guidance, typically a more detailed, disease- or gene- specific rubric is followed to determine if a given criterion was met, and how strongly (e.g. the ClinGen Hearing Loss Expert Panel guidelines for ACMG interpretations).", ) class Criterion(str, Enum): diff --git a/src/ga4gh/va_spec/base/core.py b/src/ga4gh/va_spec/base/core.py index 541569d..ebf39c6 100644 --- a/src/ga4gh/va_spec/base/core.py +++ b/src/ga4gh/va_spec/base/core.py @@ -429,6 +429,7 @@ class VariantClinicalSignificanceProposition( """ model_config = ConfigDict(use_enum_values=True) + type: Literal["VariantClinicalSignificanceProposition"] = Field( default="VariantClinicalSignificanceProposition", description="MUST be 'VariantClinicalSignificanceProposition'.", diff --git a/src/ga4gh/va_spec/base/domain_entities.py b/src/ga4gh/va_spec/base/domain_entities.py index baaf172..c9bb9a7 100644 --- a/src/ga4gh/va_spec/base/domain_entities.py +++ b/src/ga4gh/va_spec/base/domain_entities.py @@ -44,7 +44,7 @@ class Condition(RootModel): class TherapyGroup(Element, BaseModelForbidExtra): """A group of two or more therapies that are applied in combination to a single patient/subject, or applied individually to a different subset of participants in a - research study + research study. """ model_config = ConfigDict(use_enum_values=True) diff --git a/src/ga4gh/va_spec/ccv_2022/models.py b/src/ga4gh/va_spec/ccv_2022/models.py index a0c20bd..5139934 100644 --- a/src/ga4gh/va_spec/ccv_2022/models.py +++ b/src/ga4gh/va_spec/ccv_2022/models.py @@ -9,6 +9,7 @@ from ga4gh.core.models import MappableConcept, iriReference from ga4gh.va_spec.base.core import ( + Direction, EvidenceLine, Method, Statement, @@ -24,21 +25,31 @@ class VariantOncogenicityEvidenceLine(EvidenceLine): - """An Evidence Line that describes how information about the specific evidence of a - variant was interpreted as evidence for or against the variant's oncogenicity. + """An Evidence Line that describes how evidence for a variant was interpreted to + determine if a specific CCV 2022 criterion code is met, and the strength that + evidence this provides for or against the variant's oncogenicity. An Evidence Line + that describes how a specific type of information was interpreted as evidence for + or against a variant's oncogenicity. In the CCV Framework, evidence is assessed by + determining if a specific criterion (e.g. 'OM2') with a default strength + (e.g. 'moderate') is 'met' or 'not met', and in some cases adjusting the default + strength based on the quality and abundance of evidence. """ targetProposition: VariantOncogenicityProposition | None = Field( default=None, - description="A Variant Oncogenicity Proposition against which evidence information was assessed, in determining the strength and direction of support this information provides as evidence.", + description="A Variant Oncoogenicity Proposition against which a specific type of evidence was assessed, to determine the strength and direction of support this evidence provides for or against the proposition's validity.", + ) + directionOfEvidenceProvided: Direction = Field( + ..., + description="The direction of support that the Evidence Line is determined to provide toward its target Proposition (supports, disputes, neutral). For CCV-based assessments, if a oncogenicity criterion is 'met' in the Evidence Line the direction is 'supports', if a benignity criterion is 'met' the direction is 'disputes', and if a criteria is 'not met' the direction is 'none'.", ) strengthOfEvidenceProvided: MappableConcept | None = Field( default=None, - description="The strength of support that an Evidence Line is determined to provide for or against the proposed pathogenicity of the assessed variant. Strength is evaluated relative to the direction indicated by the 'directionOfEvidenceProvided' attribute. The indicated enumeration constrains the nested MappableConcept.primaryCoding > Coding.code attribute when capturing evidence strength.", + description="The strength of support that an Evidence Line is determined to provide for or against the proposed oncogenicity of the assessed variant. Strength is evaluated relative to the direction indicated by the 'directionOfEvidenceProvided' attribute, and captured using a MappableConcept, whose nested 'code' field is bound to an enumerated set of values. Conditional requirement: if `directionOfEvidenceProvided` is either 'supports' or 'disputes', then this attribute is required. If it is 'none', then this attribute is not allowed.", ) specifiedBy: Method | iriReference = Field( ..., - description="The guidelines that were followed to assess the variant information as evidence for or against the assessed variant's oncogenicity.", + description="The guidelines or rubrics followed in interpreting evidence, to determine the strength and direction of support that it provides for or against a variant's oncogenicity. While the CCV Criteria themselves provide minimal guidance, typically a more detailed, gene- or cancer- specific rubric is followed to determine if a given criterion was met, and how strongly.", ) class Criterion(str, Enum): @@ -99,9 +110,9 @@ def validate_model(cls, values: dict) -> dict: # noqa: N805 class VariantOncogenicityStatement(Statement): - """A statement reporting a conclusion from a single study about whether a - variant is associated with oncogenicity (positive or negative) - based on - interpretation of the study's results. + """A statement reporting a conclusion from a single study about whether a variant is + associated with oncogenicity (positive or negative) - based on interpretation of the + study's results. """ proposition: VariantOncogenicityProposition = Field( @@ -110,11 +121,9 @@ class VariantOncogenicityStatement(Statement): ) strength: MappableConcept | None = Field( default=None, - description="The strength of support that an CCV 2022 Oncogenicity statement is determined to provide for or against the proposed oncogenicity of the assessed variant. Strength is evaluated relative to the direction indicated by the 'direction' attribute. The indicated enumeration constrains the nested MappableConcept.primaryCoding > Coding.code attribute when capturing evidence strength.", - ) - classification: MappableConcept = Field( - ..., + description="The strength of support that an CCV 2022 Oncogenicity statement is determined to provide for or against the proposed oncogenicity of the assessed variant. Strength is evaluated relative to the direction indicated by the 'direction' attribute. The indicated enumeration constrains the nested MappableConcept.primaryCoding > Coding.code attribute when capturing evidence strength. Conditional requirement: if directionOfEvidenceProvided is either 'supports' or 'disputes', then this attribute is required. If it is 'neutral', then this attribute is not allowed.", ) + classification: MappableConcept specifiedBy: Method | iriReference = Field( ..., description="The method that specifies how the oncogenicity classification is ultimately assigned to the variant, based on assessment of evidence.",