Skip to content

Commit

Permalink
Added FunctionVariant draft to schema/cat-vrs/recipe-source.yml, whic…
Browse files Browse the repository at this point in the history
…h also involved added drafting FunctionConstraint and GeneContextConstraint to schema/cat-vrs/def and schema/cat-vrs/json.
  • Loading branch information
brendanreardon committed Nov 18, 2024
1 parent f6bd507 commit 2b902c7
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 1 deletion.
33 changes: 33 additions & 0 deletions schema/cat-vrs/def/FunctionConstraint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. note:: This data class is at a **draft** maturity level and may \
change in future releases. Maturity \
levels are described in the :ref:`maturity-model`.

**Computational Definition**

A categorical label of the function change that members of this categorical variant satisfies.

**Information Model**

Some FunctionConstraint attributes are inherited from :ref:`Constraint`.

.. list-table::
:class: clean-wrap
:header-rows: 1
:align: left
:widths: auto

* - Field
- Flags
- Type
- Limits
- Description
* - type
-
- string
- 1..1
- MUST be "FunctionConstraint"
* - functionConsequence
-
- string
- 1..1
- A categorical label of the function change that members of this categorical variant satisfies, using ontology terms from [The Sequence Ontology](http://www.sequenceontology.org).
33 changes: 33 additions & 0 deletions schema/cat-vrs/def/GeneContextConstraint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. note:: This data class is at a **draft** maturity level and may \
change in future releases. Maturity \
levels are described in the :ref:`maturity-model`.

**Computational Definition**

A free-text description of the gene context that members of this categorical variant satisfies.

**Information Model**

Some FunctionConstraint attributes are inherited from :ref:`Constraint`.

.. list-table::
:class: clean-wrap
:header-rows: 1
:align: left
:widths: auto

* - Field
- Flags
- Type
- Limits
- Description
* - type
-
- string
- 1..1
- MUST be "GeneContextConstraint"
* - geneContext
-
- string
- 1..1
- A gene identifier.
37 changes: 37 additions & 0 deletions schema/cat-vrs/json/FunctionConstraint
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/cat-vrs/1.x/json/FunctionConstraint",
"title": "FunctionConstraint",
"type": "object",
"maturity": "draft",
"description": "A categorical label of the function change that members of this categorical variant satisfies.",
"properties": {
"type": {
"type": "string",
"const": "FunctionConstraint",
"default": "FunctionConstraint",
"description": "MUST be \"FunctionConstraint\""
},
"functionConsequence": {
"description": "A categorical label of the function change that members of this categorical variant satisfies, using ontology terms from [The Sequence Ontology](http://www.sequenceontology.org). ``SO:0002052`` refers to a [dominant negative variant](http://www.sequenceontology.org/browser/current_release/term/SO:0002052), a variant where the mutated gene product adversely affects the other (wild type) gene product. ``SO:0002054`` refers to a [loss of function variant](http://www.sequenceontology.org/browser/current_release/term/SO:0002054), a sequence variant whereby the gene product has diminished or abolished function. ``SO:0001561`` refers to a [polypeptide partial loss of function](http://www.sequenceontology.org/browser/current_release/term/SO:0001561), a sequence variant that causes some but not all loss of polypeptide function with respect to a reference sequence. ``SO:0002219`` refers to a [functionally normal](http://www.sequenceontology.org/browser/current_release/term/SO:0002219) variant, a sequence variant in which the function of a gene product is retained with respect to a reference. ``SO:0001557`` refers to a [polypeptide gain of function variant](http://www.sequenceontology.org/browser/current_release/term/SO:0001557), a sequence variant which causes gain of polypeptide function with respect to a reference sequence. ``SO:0002053`` refers to a [gain of function variant](http://www.sequenceontology.org/browser/current_release/term/SO:0002053), a sequence variant whereby new or enhanced function is conferred on the gene product.",
"type": "string",
"enum": [
"SO:0002052",
"SO:0002054",
"SO:0001561",
"SO:0002219",
"SO:0001557",
"SO:0002053
]
},
"description": {
"description": "A free-text description of the function change.",
"type": "string"
}
},
"required": [
"functionConsequence",
"type"
],
"additionalProperties": false
}
41 changes: 41 additions & 0 deletions schema/cat-vrs/json/GeneContextConstraint
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/cat-vrs/1.x/json/GeneContextConstraint",
"title": "GeneContextConstraint",
"type": "object",
"maturity": "draft",
"description": "A free-text description of the gene context that members of this categorical variant satisfies.",
"properties": {
"type": {
"type": "string",
"const": "GeneContextConstraint",
"default": "GeneContextConstraint",
"description": "MUST be \"GeneContextConstraint\""
},
"geneContext": {
"description": "A gene identifier",
"type": "string"
},
"description": {
"description": "A free-text description of the gene context.",
"type": "string"
},
"relations": {
"type": "array",
"ordered": false,
"items": {
"type": string,
"enum": [
"genome_liftover",
"transcript_projection"
]
},
"description": "Defined relationships from which members relate to the defining location. ``sequence_liftover`` refers to variants or locations that represent a congruent concept on a differing assembly of a human genome (e.g. \"GRCh37\" and \"GRCh38\") or gene (e.g. Locus Reference Genomic) sequence. ``transcript_projection`` refers to variants or locations that occur on transcripts projected from the defined genomic concept."
}
},
"required": [
"geneContext",
"type"
],
"additionalProperties": false
}
23 changes: 22 additions & 1 deletion schema/cat-vrs/recipes-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,25 @@ $defs:
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CopyCountConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CopyChangeConstraint"
required:
- constraints
- constraints

FunctionVariant:
maturity: draft
description: >-
A representation of the constraints for matching knowledge about function variants; e.g., gain-of-function or
loss-of-function.
allOf:
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CategoricalVariant"
- properties:
constraints:
description: >-
The constraints array must contain exactly two items:
a GeneContextConstraint and a FunctionConstraint.
minItems: 2
maxItems: 2
contains:
allOf:
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/GeneContextConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/FunctionConstraint"
required:
- constraints

0 comments on commit 2b902c7

Please sign in to comment.