$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:
        description: Region of the chromosome containing the CNV
        $ref: "../../core.json#/definitions/ChromosomeRegion"
      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
            description: Interpretation summary
            example: "lorem ipsum"
      event:
        type: string
        description: Type of CNV event
        # Enum values are a subset of GeneticVariationType from core.yaml
        enum: [ "COPY_NUMBER_GAIN", "COPY_NUMBER_LOSS" ]
      iscn_nomenclature:
        description: ISCN Nomenclature of the CNV
        $ref: "../../core.json#/definitions/ISCNNomenclature"
      cytoband:
        description: Gene or genomic region impacted by a CNV
        $ref: "../../core.json#/definitions/Cytoband"
      size_mb:
        type: number
        description: Size (in megabases) of the CNV
        example: 0.673486
      number_of_genes:
        type: integer
        description: Number of genes
        example: 6
      hgvs_g:
        description: Genomic HGVS of the CNV
        $ref: "../../core.json#/definitions/HGVSExpression"
