$schema: 'https://json-schema.org/draft/2020-12/schema'

title: 'Variant Annotation Format'

description: >-
  The variant annotation/interpretation format stores associations of
  variation with annotations/intreptations.

type: 'object'
properties:
  _version: 
    $ref: "../../core.json#/definitions/Version"
  findings:
    items:
      $ref: "#/definitions/Interpretation"
    minItems: 1
    maxItems: 10
    type: 'array'
  references:
    type: array
    items:
      $ref: "../../structs.json#/definitions/Reference"
  
definitions: 
  Interpretation:
    type: object
    properties:
      classification:
        type: object
        properties:
          scheme:
            type: string
            enum: [ACMG]
          value:
            type: string
            anyOf:
              - $ref: "../../core.json#/definitions/ACMGClassification"
              - const: "NEGATIVE"
      condition:
        type: ["string", "null"]
        example:
          - "breast_cancer"
      evidence:
        type: object
        properties:
          summary:
            type: string
            description: Interpretation summary 
            example: "lorem ipsum"
      gene_symbol:
        type: string
        description: Gene symbol
        example: "PEX1"
      inheritance:
        description: Who the variant is inherited from
        $ref: "../../core.json#/definitions/InheritancePattern"
      zygosity:
        description: Zygosity of the variant in the individual
        $ref: "../../core.json#/definitions/Zygosity" 
      variation:
        $ref: "../../structs.json#/definitions/RareDiseaseVariation"
      gene_info:
        type: string
        description: Information text about the gene
        example: "This gene encodes a member of the AAA ATPase family, a large group of ATPases associated with diverse cellular activities. This protein is cytoplasmic but is often anchored to a peroxisomal membrane where it forms a heteromeric complex and plays a role in the import of proteins into peroxisomes and peroxisome biogenesis. Mutations in this gene have been associated with complementation group 1 peroxisomal disorders such as neonatal adrenoleukodystrophy, infantile Refsum disease, and Zellweger syndrome. Alternatively spliced transcript variants have been found for this gene. [provided by RefSeq, Sep 2013]"
      variant_description:
        type: string
        description: Long text description of the variant
        example: "Non-canonical splice variant c.1359+601A>G located in intron 6 of the PEX1 gene is predicted by computational tools to create a cryptic splice site. This could lead to disrupted production of the PEX1 gene product. This variant is absent from large population databases, including gnomAD. This variant was not found in ClinVar. This variant has not been reported in the literature. Based on the evidence above and according to the ACMG/AMP variant interpretation guidelines, this variant has been classified as a variant of uncertain significance. Additional information is needed to resolve the significance of this variant."
      mode_of_inheritance:
        description: Mode of inheritance
        type: ["string", "null"]
        $ref: "../../core.json#/definitions/Inheritance"
