Skip to content

Commit

Permalink
* embed *Properties into recipes
Browse files Browse the repository at this point in the history
* refine DefiningContext to DefiningAllele & DefiningLocation
* redraft CategoricalCnv on recent design changes
  • Loading branch information
larrybabb committed Nov 5, 2024
1 parent 157a0c8 commit f919266
Show file tree
Hide file tree
Showing 24 changed files with 435 additions and 400 deletions.
8 changes: 4 additions & 4 deletions examples/canonicalAllele-ex1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ id: clinvar:662001
label: NM_004958.4(MTOR):c.5992_5993del (p.Met1998fs)
type: CategoricalVariant
constraints:
- type: DefiningContextConstraint
definingContext:
- type: DefiningAlleleContext
allele:
id: ga4gh:VA.PN-6_l2_yI1UPBRCtFnWkR52iZXKVJ8b
type: Allele
digest: PN-6_l2_yI1UPBRCtFnWkR52iZXKVJ8b
Expand Down Expand Up @@ -42,8 +42,8 @@ constraints:
- name: clinvar hgvs type
value: genomic, top-level
relations:
- sequence_liftover
- transcript_projection
- liftover_to
- transcribes_to
mappings:
- coding:
code: CA915941124
Expand Down
7 changes: 5 additions & 2 deletions examples/categoricalCnv-ex1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ label: GRCh38/hg38 7p22.1(chr7:5905831-6014161)x3
constraints:
- type: CopyCountConstraint
copies: 3
- type: DefiningContextConstraint
definingContext:
- type: DefiningLocationContext
location:
type: SequenceLocation
start: [null, 5945462]
end: [6053792, null]
Expand All @@ -14,6 +14,9 @@ constraints:
type: SequenceReference
refgetAccession: SQ.Ya6Rs7DHhDeg7YaOSg1EoNi3U_nQ9SvO
residueAlphabet: na
relations:
- liftover_to
matchCharacteristic: exact
extensions:
- name: vrs processing errors
value: "NC_000007.14:g.(?_5905831)_(6014161_?)dup: char 26: expected one of '=', 'con', 'copy', 'del', 'dup', 'ins', or 'inv'"
Expand Down
7 changes: 5 additions & 2 deletions examples/categoricalCnv-ex2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ constraints:
system: https://www.ebi.ac.uk/ols4/search?ontology=efo&q=
code: EFO:0030070
label: Copy Number Gain
- type: DefiningContextConstraint
definingContext:
- type: DefiningLocationContext
location:
type: SequenceLocation
start: [null, 5945462]
end: [6053792, null]
Expand All @@ -17,6 +17,9 @@ constraints:
type: SequenceReference
refgetAccession: SQ.Ya6Rs7DHhDeg7YaOSg1EoNi3U_nQ9SvO
residueAlphabet: na
relations:
- liftover_to
matchCharacteristic: exact
extensions:
- name: vrs processing errors
value: "NC_000007.14:g.(?_5905831)_(6014161_?)dup: char 26: expected one of '=', 'con', 'copy', 'del', 'dup', 'ins', or 'inv'"
Expand Down
4 changes: 2 additions & 2 deletions examples/proteinSequenceConsequence-ex1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ description: >-
treating patients that failed to respond to earlier generation TKI therapies.
label: EGFR L858R
constraints:
- type: "DefiningContextConstraint"
definingContext: vrs.json#/ga4gh:VA.kgjrhgf84CEndyLjKdAO0RxN-e3pJjxA
- type: "DefiningAlleleContext"
allele: vrs.json#/ga4gh:VA.kgjrhgf84CEndyLjKdAO0RxN-e3pJjxA
members:
- vrs.json#/ga4gh:VA.7jX7fHgVEqx4C4jMRyZOH0ZBHnLn7_gJ
- vrs.json#/ga4gh:VA.3_FsKSUHEdurPIw5gqpw6g0_Ga0TEXQh
Expand Down
91 changes: 75 additions & 16 deletions schema/cat-vrs/cat-vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $defs:

CategoricalVariant:
type: object
inherits: gks-core:DomainEntity
inherits: gks-core:Entity
maturity: draft
description: >-
A representation of a categorically-defined domain for variation, in which individual
Expand All @@ -42,6 +42,14 @@ $defs:
ordered: false
items:
$ref: "#/$defs/Constraint"
mappings:
type: array
ordered: false
items:
$ref: "/ga4gh/schema/gks-core/1.x/json/ConceptMapping"
description: >-
A list of mappings to concepts in terminologies or code systems. Each mapping should
include a coding and a relation.
# =============================================================================
# Constraint Definitions
Expand All @@ -52,7 +60,8 @@ $defs:
description: >-
Constraints are used to construct an intensional semantics of categorical variant types.
oneOf:
- $ref: "#/$defs/DefiningContextConstraint"
- $ref: "#/$defs/DefiningAlleleContext"
- $ref: "#/$defs/DefiningLocationContext"
- $ref: "#/$defs/CopyCountConstraint"
- $ref: "#/$defs/CopyChangeConstraint"
heritableProperties:
Expand All @@ -61,41 +70,91 @@ $defs:
heritableRequired:
- type

DefiningContextConstraint:
DefiningAlleleContext:
maturity: draft
type: object
inherits: Constraint
description: >-
The defining allele and its associated relationships that are congruent
with member variants.
properties:
type:
extends: type
const: DefiningAlleleContext
default: DefiningAlleleContext
description: 'MUST be "DefiningAlleleContext"'
allele:
oneOf:
- $ref: /ga4gh/schema/vrs/2.x/json/Allele
- $ref: /ga4gh/schema/gks-core/1.x/json/IRI
relations:
type: array
ordered: false
items:
type: string
enum:
- translates_from
- translates_from_reading_frame
- liftover_to
- transcribes_to
- translates_to
- translates_through
description: >-
Defined relationships from which members relate to the defining context.
``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. ``codon_translation``
refers to variants or locations that translate from the codon(s) represented by the defined concept.
required:
- allele

DefiningLocationContext:
maturity: draft
type: object
inherits: Constraint
description: >-
The location or location-state, congruent with other reference sequences,
about which categorical variation is being described.
The defining location and its associated relationships that are congruent
with member locations.
properties:
type:
extends: type
const: DefiningContextConstraint
default: DefiningContextConstraint
description: 'MUST be "DefiningContextConstraint"'
definingContext:
const: DefiningLocationContext
default: DefiningLocationContext
description: 'MUST be "DefiningLocationContext"'
location:
oneOf:
- $ref: /ga4gh/schema/vrs/2.x/json/Variation
- $ref: /ga4gh/schema/vrs/2.x/json/Location
- $ref: /ga4gh/schema/vrs/2.x/json/SequenceLocation
- $ref: /ga4gh/schema/gks-core/1.x/json/IRI
relations:
type: array
ordered: false
items:
type: string
enum:
- sequence_liftover
- transcript_projection
- codon_translation
- translates_from
- translates_from_reading_frame
- liftover_to
- transcribes_to
- translates_to
- translates_through
description: >-
Defined relationships between members of the categorical variant and the defining context.
Defined relationships from which members relate to the defining context.
``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. ``codon_translation``
refers to variants or locations that translate from the codon(s) represented by the defined concept.
matchCharacteristic:
type: string
description: >-
A characteristic of the location that is used to match the defining location to member locations.
enum:
- exact
- encompass
- within
- overlap
required:
- definingContext
- location
- matchCharacteristic

CopyCountConstraint:
maturity: draft
Expand Down
27 changes: 0 additions & 27 deletions schema/cat-vrs/def/CanonicalAlleleProperties.rst

This file was deleted.

27 changes: 0 additions & 27 deletions schema/cat-vrs/def/CategoricalCnvProperties.rst

This file was deleted.

10 changes: 5 additions & 5 deletions schema/cat-vrs/def/CategoricalVariant.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A representation of a categorically-defined domain for variation, in which indiv

**Information Model**

Some CategoricalVariant attributes are inherited from :ref:`gks-core:DomainEntity`.
Some CategoricalVariant attributes are inherited from :ref:`gks-core:Entity`.

.. list-table::
:class: clean-wrap
Expand Down Expand Up @@ -42,10 +42,6 @@ Some CategoricalVariant attributes are inherited from :ref:`gks-core:DomainEntit
- :ref:`Extension`
- 0..m
- A list of extensions to the Entity, that allow for capture of information not directly supported by elements defined in the model.
* - mappings
- :ref:`ConceptMapping`
- 0..m
- A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation.
* - type
- string
- 1..1
Expand All @@ -58,3 +54,7 @@ Some CategoricalVariant attributes are inherited from :ref:`gks-core:DomainEntit
- :ref:`Constraint`
- 0..m
-
* - mappings
- :ref:`ConceptMapping`
- 0..m
- A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation.
36 changes: 36 additions & 0 deletions schema/cat-vrs/def/DefiningAlleleContext.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

The defining allele and its associated relationships that are congruent with member variants.

**Information Model**

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

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

* - Field
- Type
- Limits
- Description
* - type
- string
- 1..1
- MUST be "DefiningAlleleContext"
* - allele
- :ref:`Allele` | :ref:`IRI`
- 1..1
-
* - relations
- string
- 0..m
- Defined relationships from which members relate to the defining context. ``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. ``codon_translation`` refers to variants or locations that translate from the codon(s) represented by the defined concept.
36 changes: 0 additions & 36 deletions schema/cat-vrs/def/DefiningContextConstraint.rst

This file was deleted.

Loading

0 comments on commit f919266

Please sign in to comment.