Skip to content

Biomarker

Referenced schema · Source · Dereferenced version

A Cat-VRS CategoricalVariant. Root type Biomarker with one subtype per biomarker_type value.

Root type shared by every biomarker. Subtypes below are selected by the biomarker_type field; the top-level schema closes the record.

Fields

Field Type Required Description
id string matching ^bmkr:\d+$ yes
type always CategoricalVariant yes
name string yes
allele string or null matching ^ga4gh:VA.[A-Za-z0-9_-]{32}$ yes Foreign key to alleles.id.
copyChange string or null matching ^copy_change:efo:\d+$ yes Foreign key to copy_changes.id.
function string or null matching ^func:so:\d+$ yes Foreign key to function_consequences.id.
genes array of string matching ^gene:hgnc:\d+$ yes
location array of string matching ^ga4gh:SL.[A-Za-z0-9_-]{32}$ yes
biomarker_type one of Copy number, Copy number (arm level), Gene fusion, Germline variant, Haplotype genotype, Homologous recombination, Microsatellite stability, Mismatch repair, Protein expression, Rearrangement, Somatic variant, Translocation, Tumor mutational burden, Wild type yes
extensions array of Extension yes

Subtypes

Every record matches exactly one subtype, which adds to the fields above.

Subtype Applies when Description
Copy Number biomarker_type is Copy number Gene-level copy number change.
Copy Number (arm level) biomarker_type is Copy number (arm level) Chromosome arm-level copy number change.
Gene fusion biomarker_type is Gene fusion Gene fusion: one or two partner genes joined via an AdjacencyConstraint at dereference time. Shares Rearrangement base's shape.
Germline Variant biomarker_type is Germline variant Germline variant in a single gene.
Haplotype genotype biomarker_type is Haplotype genotype Haplotype genotype, e.g. HLA-A*02:01.
Homologous Recombination biomarker_type is Homologous recombination Homologous recombination status.
Microsatellite Stability biomarker_type is Microsatellite stability Microsatellite instability status.
Mismatch Repair biomarker_type is Mismatch repair Mismatch repair status.
Protein expression biomarker_type is Protein expression Protein expression, e.g. PD-L1 TPS >= 1%.
Rearrangement biomarker_type is Rearrangement Chromosomal rearrangement that is neither a gene fusion nor a translocation (see Gene fusion, Translocation). Shares Rearrangement base's shape.
Somatic Variant biomarker_type is Somatic variant Somatic variant in a single gene.
Translocation biomarker_type is Translocation Chromosomal translocation between one or two partner genes. Shares Rearrangement base's shape.
Tumor mutational burden biomarker_type is Tumor mutational burden Tumor mutational burden classification.
Wild type biomarker_type is Wild type Absence of variants in a gene.

Copy Number

Gene-level copy number change.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Copy number
extensions array of extensions: cytoband (string or null, required)
genes array (exactly 1 item)
allele null
location array (at most 0 items)
copyChange string
function null

Copy Number (arm level)

Chromosome arm-level copy number change.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Copy number (arm level)
extensions array of extensions: chromosome (string, required), arm (one of p, q, required)
genes array (at most 0 items)
allele null
location array (exactly 1 item)
copyChange string
function null

Gene fusion

Gene fusion: one or two partner genes joined via an AdjacencyConstraint at dereference time. Shares Rearrangement base's shape.

Builds on Rearrangement base.

Field Type Required Description
biomarker_type always Gene fusion
genes array (1 to 2 items)
location array (at most 0 items)

Germline Variant

Germline variant in a single gene.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Germline variant
extensions array of extensions: chromosome (string, required), start_position (integer or null, required), end_position (integer or null, required), reference_allele (string or null, required), alternate_allele (string or null, required), cdna_change (string or null, required), protein_change (string or null, required), variant_annotation (string or null, required), exon (integer or string or null, required), rsid (string or null, required), hgvsg (string or null, required), hgvsc (string or null, required), requires_pathogenic (boolean, required)
genes array (exactly 1 item)
allele null
location array (exactly 1 item)
copyChange null
function null

Haplotype genotype

Haplotype genotype, e.g. HLA-A*02:01.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Haplotype genotype
genes array (at most 0 items)
allele null
location array (at most 0 items)
copyChange null
function null

Homologous Recombination

Homologous recombination status.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Homologous recombination
extensions array of extensions: status (string, required)
genes array (at most 0 items)
allele null
location array (at most 0 items)
copyChange null
function null

Microsatellite Stability

Microsatellite instability status.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Microsatellite stability
extensions array of extensions: status (one of Microsatellite instability-high (MSI-H), Microsatellite instability-low (MSI-L), Microsatellite stable (MSS), required)
genes array (at most 0 items)
allele null
location array (at most 0 items)
copyChange null
function null

Mismatch Repair

Mismatch repair status.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Mismatch repair
extensions array of extensions: status (one of Deficient, Proficient, required)
genes array (at most 0 items)
allele null
location array (at most 0 items)
copyChange null
function null

Protein expression

Protein expression, e.g. PD-L1 TPS >= 1%.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Protein expression
extensions array of extensions: marker (string, required), unit (string, required), equality (one of =, >=, <=, <, >, required), value (number or string, required)
genes array (at most 0 items)
allele null
location array (at most 0 items)
copyChange null
function null

Rearrangement

Chromosomal rearrangement that is neither a gene fusion nor a translocation (see Gene fusion, Translocation). Shares Rearrangement base's shape.

Builds on Rearrangement base.

Field Type Required Description
biomarker_type always Rearrangement
genes array (at most 2 items)
location array (at most 0 items)

Somatic Variant

Somatic variant in a single gene.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Somatic variant
extensions array of extensions: chromosome (string, required), start_position (integer or null, required), end_position (integer or null, required), reference_allele (string or null, required), alternate_allele (string or null, required), cdna_change (string or null, required), protein_change (string or null, required), variant_annotation (string or null, required), exon (integer or string or null, required), hgvsg (string or null, required), hgvsc (string or null, required), rsid (string or null), requires_oncogenic (boolean)
genes array (exactly 1 item)
copyChange null

Translocation

Chromosomal translocation between one or two partner genes. Shares Rearrangement base's shape.

Builds on Rearrangement base.

Field Type Required Description
biomarker_type always Translocation
genes array (at most 2 items)
location array (at most 2 items)

Tumor mutational burden

Tumor mutational burden classification.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Tumor mutational burden
extensions array of extensions: classification (string, required), minimum_mutations (number or null, required), minimum_mutations_per_megabase (number or null, required)
genes array (at most 0 items)
allele null
location array (at most 0 items)
copyChange null
function null

Wild type

Absence of variants in a gene.

Builds on Biomarker.

Field Type Required Description
biomarker_type always Wild type
genes array (exactly 1 item)
allele null
location array (exactly 1 item)
copyChange null
function null

Definitions

Rearrangement base

Structural shape shared by Rearrangement, Translocation, and Gene fusion: no allele, copy change, or function consequence, and no extensions besides biomarker_type. Each subtype sets its own location constraint.

Builds on Biomarker.

Field Type Required Description
allele null
copyChange null
function null

JSON Schema

Full JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://moalmanac.org/schemas/referenced/biomarkers.schema.json",
  "title": "Biomarker",
  "description": "A Cat-VRS CategoricalVariant. Root type `Biomarker` with one subtype per `biomarker_type` value.",
  "$ref": "#/$defs/Biomarker",
  "allOf": [
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Copy number"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Copy Number"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Copy number (arm level)"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Copy Number (arm level)"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Gene fusion"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Gene fusion"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Germline variant"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Germline Variant"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Haplotype genotype"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Haplotype genotype"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Homologous recombination"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Homologous Recombination"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Microsatellite stability"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Microsatellite Stability"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Mismatch repair"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Mismatch Repair"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Protein expression"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Protein expression"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Rearrangement"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Rearrangement"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Somatic variant"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Somatic Variant"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Translocation"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Translocation"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Tumor mutational burden"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Tumor mutational burden"
      }
    },
    {
      "if": {
        "required": [
          "biomarker_type"
        ],
        "properties": {
          "biomarker_type": {
            "const": "Wild type"
          }
        }
      },
      "then": {
        "$ref": "#/$defs/Wild type"
      }
    }
  ],
  "unevaluatedProperties": false,
  "$defs": {
    "Biomarker": {
      "description": "Root type shared by every biomarker. Subtypes below are selected by the `biomarker_type` field; the top-level schema closes the record.",
      "type": "object",
      "required": [
        "id",
        "type",
        "name",
        "allele",
        "copyChange",
        "function",
        "genes",
        "location",
        "biomarker_type",
        "extensions"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^bmkr:\\d+$"
        },
        "type": {
          "const": "CategoricalVariant"
        },
        "name": {
          "type": "string"
        },
        "allele": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^ga4gh:VA\\.[A-Za-z0-9_-]{32}$",
          "description": "Foreign key to `alleles.id`."
        },
        "copyChange": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^copy_change:efo:\\d+$",
          "description": "Foreign key to `copy_changes.id`."
        },
        "function": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^func:so:\\d+$",
          "description": "Foreign key to `function_consequences.id`."
        },
        "genes": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^gene:hgnc:\\d+$",
            "description": "Foreign key to `genes.id`."
          }
        },
        "location": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^ga4gh:SL\\.[A-Za-z0-9_-]{32}$",
            "description": "Foreign key to `sequence_locations.id`."
          }
        },
        "biomarker_type": {
          "enum": [
            "Copy number",
            "Copy number (arm level)",
            "Gene fusion",
            "Germline variant",
            "Haplotype genotype",
            "Homologous recombination",
            "Microsatellite stability",
            "Mismatch repair",
            "Protein expression",
            "Rearrangement",
            "Somatic variant",
            "Translocation",
            "Tumor mutational burden",
            "Wild type"
          ]
        },
        "extensions": {
          "type": "array",
          "items": {
            "$ref": "extension.schema.json"
          }
        }
      }
    },
    "Copy Number": {
      "description": "Gene-level copy number change.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Copy number"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "cytoband"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "cytoband"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "string"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Copy Number (arm level)": {
      "description": "Chromosome arm-level copy number change.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Copy number (arm level)"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "chromosome"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "arm"
                      },
                      "value": {
                        "enum": [
                          "p",
                          "q"
                        ]
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "chromosome"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "arm"
                      },
                      "value": {
                        "enum": [
                          "p",
                          "q"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "copyChange": {
              "type": "string"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Gene fusion": {
      "description": "Gene fusion: one or two partner genes joined via an AdjacencyConstraint at dereference time. Shares `Rearrangement base`'s shape.",
      "allOf": [
        {
          "$ref": "#/$defs/Rearrangement base"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Gene fusion"
            },
            "genes": {
              "type": "array",
              "minItems": 1,
              "maxItems": 2
            },
            "location": {
              "type": "array",
              "maxItems": 0
            }
          }
        }
      ]
    },
    "Germline Variant": {
      "description": "Germline variant in a single gene.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Germline variant"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "chromosome"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "start_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "end_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "reference_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "alternate_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "cdna_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "protein_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "variant_annotation"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "exon"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "rsid"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsg"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsc"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "requires_pathogenic"
                      },
                      "value": {
                        "type": "boolean"
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "chromosome"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "start_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "end_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "reference_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "alternate_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "cdna_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "protein_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "variant_annotation"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "exon"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "rsid"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsg"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsc"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "requires_pathogenic"
                      },
                      "value": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Haplotype genotype": {
      "description": "Haplotype genotype, e.g. HLA-A*02:01.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Haplotype genotype"
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Homologous Recombination": {
      "description": "Homologous recombination status.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Homologous recombination"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "status"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "status"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Microsatellite Stability": {
      "description": "Microsatellite instability status.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Microsatellite stability"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "status"
                      },
                      "value": {
                        "enum": [
                          "Microsatellite instability-high (MSI-H)",
                          "Microsatellite instability-low (MSI-L)",
                          "Microsatellite stable (MSS)"
                        ]
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "status"
                      },
                      "value": {
                        "enum": [
                          "Microsatellite instability-high (MSI-H)",
                          "Microsatellite instability-low (MSI-L)",
                          "Microsatellite stable (MSS)"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Mismatch Repair": {
      "description": "Mismatch repair status.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Mismatch repair"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "status"
                      },
                      "value": {
                        "enum": [
                          "Deficient",
                          "Proficient"
                        ]
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "status"
                      },
                      "value": {
                        "enum": [
                          "Deficient",
                          "Proficient"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Protein expression": {
      "description": "Protein expression, e.g. PD-L1 TPS >= 1%.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Protein expression"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "marker"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "unit"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "equality"
                      },
                      "value": {
                        "enum": [
                          "=",
                          ">=",
                          "<=",
                          "<",
                          ">"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "value"
                      },
                      "value": {
                        "type": [
                          "number",
                          "string"
                        ]
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "marker"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "unit"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "equality"
                      },
                      "value": {
                        "enum": [
                          "=",
                          ">=",
                          "<=",
                          "<",
                          ">"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "value"
                      },
                      "value": {
                        "type": [
                          "number",
                          "string"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Rearrangement": {
      "description": "Chromosomal rearrangement that is neither a gene fusion nor a translocation (see `Gene fusion`, `Translocation`). Shares `Rearrangement base`'s shape.",
      "allOf": [
        {
          "$ref": "#/$defs/Rearrangement base"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Rearrangement"
            },
            "genes": {
              "type": "array",
              "maxItems": 2
            },
            "location": {
              "type": "array",
              "maxItems": 0
            }
          }
        }
      ]
    },
    "Rearrangement base": {
      "description": "Structural shape shared by `Rearrangement`, `Translocation`, and `Gene fusion`: no allele, copy change, or function consequence, and no extensions besides `biomarker_type`. Each subtype sets its own `location` constraint.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "allele": {
              "type": "null"
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Translocation": {
      "description": "Chromosomal translocation between one or two partner genes. Shares `Rearrangement base`'s shape.",
      "allOf": [
        {
          "$ref": "#/$defs/Rearrangement base"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Translocation"
            },
            "genes": {
              "type": "array",
              "maxItems": 2
            },
            "location": {
              "type": "array",
              "maxItems": 2
            }
          }
        }
      ]
    },
    "Somatic Variant": {
      "description": "Somatic variant in a single gene.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Somatic variant"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "chromosome"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "start_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "end_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "reference_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "alternate_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "cdna_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "protein_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "variant_annotation"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "exon"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsg"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsc"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "rsid"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "requires_oncogenic"
                      },
                      "value": {
                        "type": "boolean"
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "chromosome"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "start_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "end_position"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "reference_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "alternate_allele"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "cdna_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "protein_change"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "variant_annotation"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "exon"
                      },
                      "value": {
                        "type": [
                          "integer",
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsg"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "hgvsc"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "copyChange": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Tumor mutational burden": {
      "description": "Tumor mutational burden classification.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Tumor mutational burden"
            },
            "extensions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "classification"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "minimum_mutations"
                      },
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    }
                  },
                  {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "minimum_mutations_per_megabase"
                      },
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    }
                  }
                ]
              },
              "allOf": [
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "classification"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "minimum_mutations"
                      },
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    }
                  }
                },
                {
                  "contains": {
                    "$ref": "extension.schema.json",
                    "properties": {
                      "name": {
                        "const": "minimum_mutations_per_megabase"
                      },
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "genes": {
              "type": "array",
              "maxItems": 0
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "maxItems": 0
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    },
    "Wild type": {
      "description": "Absence of variants in a gene.",
      "allOf": [
        {
          "$ref": "#/$defs/Biomarker"
        },
        {
          "properties": {
            "biomarker_type": {
              "const": "Wild type"
            },
            "genes": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "allele": {
              "type": "null"
            },
            "location": {
              "type": "array",
              "minItems": 1,
              "maxItems": 1
            },
            "copyChange": {
              "type": "null"
            },
            "function": {
              "type": "null"
            }
          }
        }
      ]
    }
  }
}