$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: 'array'
items:
  $ref: '#/definitions/Interpretation'
  minItems: 1
  maxItems: 5
  
definitions:
  Observation:
    type: object
    properties:
      variation:
        $ref: "../core.json#/definitions/HGVSExpression"
      zygosity:
        $ref: "../core.json#/definitions/Zygosity"
        
  Interpretation:
    type: object
    properties:
      variation:
        $ref: "../core.json#/definitions/HGVSExpression"
      related_variation:
        type: array
        items:
          $ref: "../core.json#/definitions/HGVSExpression"
      condition:
        type: string
        example:
          - "breast_cancer"
      inheritance:
        $ref: "../core.json#/definitions/Inheritance"
      source:
        type: string
        example: 'strand:STRAN-012-345-789'
      classification:
        type: object
        properties:
          scheme:
            type: string
            enum: [ACMG]
          value:
            $ref: "../core.json#/definitions/ACMGClassification"
      evidence:
        type: object
        properties:
          summary:
            type: string
          # criteria: PM2, etc
          # concern: This makes the Interpretation block ACMG-specific
          references:
            type: array
            items:
              $ref: "../structs.json#/definitions/Reference"
      last_updated:
        $ref: "../core.json#/definitions/UTCTimestamp"
