Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

design refinement of existing CatVrs recipes #64

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Collaborator

@DanielPuthawala DanielPuthawala Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larrybabb I'm think we should reevaluate whether it makes sense to keep mappings in CategoricalVariant.

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"
Comment on lines +63 to 66
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that the word constraint was dropped from the DefiningAlleleContext and DefiningLocationcontext, but should we be consistent and make the drop the word constraint from the others as well or is there a rationale for distinguishing between them?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, have we discussed yet updating the CopyCountConstraint and CopyChangeConstraint into a single copy constraint along the lines of the most recent iteration of that constraint in the discussion here?

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given recent thinking wrt hypothetical lower-order AdjacencyConstraint, which takes, eg, two vrs:Location arguments and the stipulates that they are now adjacent (potentially mediated by a linker sequence, etc), the gates are open to the idea that a single vrs object may satisfy be reused to satisfy the arguments of multiple states (which also means the logic is now non-linear, which I don't think is a problem, but I'll make a note in my brain to ponder later).

So, is there a reason to have the dichotomy of a DefiningLocationContext and DefiningAlleleContext instead of a DefiningLocationContext and a DefiningStateContext where the latter state context functions more akin to a sequence or functional entity (like a gene) completely divorced from a location in the genome, and therefore a system where a vrs:Allele would be sufficient to satisfy both the DefiningLocationContext and DefiningStateContext, but a vrs:Location would only satisfy the DefiningLocationContext?

Or put another way, in splitting out the DefiningContextConstraint, we now have one constraint that only handles location information, and another that... does the smae thing as the prior DefiningContextConstraint.

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.
Comment on lines +104 to +107
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are now out of date. Need to update with descriptions appropriate to the nee;y enumerated relations. @ahwagner what is translates_through?

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto above, this needs to be updated in line with the new relations.

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am excited to see what this gets us.

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
Loading