$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: 5
    type: 'array'
  
definitions:      
  Interpretation:
    type: object
    properties:
      chromosome_region:
        type: string
        pattern: '^chr[a-zA-Z0-9]+:\d+-\d+$'
        example: "chr15:22748502-23372000"
      classification:
        type: object
        properties:
          scheme:
            type: string
            enum: [ACMG]
          value:
            anyOf:
              - $ref: "../../core.json#/definitions/ACMGClassification"
              - const: "NEGATIVE"
      evidence:
        type: object
        properties:
          summary:
            type: string
            example: "lorem ipsum"
      event:
        type: string
        enum: ["COPY_NUMBER_GAIN", "COPY_NUMBER_LOSS"]
      iscn_nomenclature:
        type: string
        example: "test"
      cytoband:
        type: string
        example: "chr15q11.2"
      size_mb:
        type: number
        example: "0.673486"
      number_of_genes:
        type: number
        example: "6"
