Skip to content

Commit

Permalink
Domain entities to Trial Use (#232)
Browse files Browse the repository at this point in the history
* add group classes

* TraitSet to TU

* add TherapyGroup to TU
  • Loading branch information
ahwagner authored Nov 27, 2024
1 parent af2d5da commit 0bc7d16
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 21 deletions.
4 changes: 2 additions & 2 deletions schema/va-spec/base/def/Condition.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. warning:: This data class is at a **draft** maturity level and may \
change significantly in future releases. Maturity \
.. note:: This data class is at a **trial use** maturity level and may \
change in future releases. Maturity \
levels are described in the :ref:`maturity-model`.

**Computational Definition**
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/def/Therapeutic.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. warning:: This data class is at a **draft** maturity level and may \
change significantly in future releases. Maturity \
.. note:: This data class is at a **trial use** maturity level and may \
change in future releases. Maturity \
levels are described in the :ref:`maturity-model`.

**Computational Definition**
Expand Down
6 changes: 3 additions & 3 deletions schema/va-spec/base/def/TherapyGroup.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. warning:: This data class is at a **draft** maturity level and may \
change significantly in future releases. Maturity \
.. note:: This data class is at a **trial use** maturity level and may \
change in future releases. Maturity \
levels are described in the :ref:`maturity-model`.

**Computational Definition**
Expand Down Expand Up @@ -36,7 +36,7 @@ Some TherapyGroup attributes are inherited from :ref:`gks-core:Element`.
- A list of extensions to the Entity, that allow for capture of information not directly supported by elements defined in the model.
* - groupType
-
- string
- :ref:`MappableConcept`
- 0..1
- The type of the therapy group.
* - therapies
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/def/TraitSet.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. warning:: This data class is at a **draft** maturity level and may \
change significantly in future releases. Maturity \
.. note:: This data class is at a **trial use** maturity level and may \
change in future releases. Maturity \
levels are described in the :ref:`maturity-model`.

**Computational Definition**
Expand Down
10 changes: 5 additions & 5 deletions schema/va-spec/base/domain-entities-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ imports:
$defs:
# Condition data structure for consolidating the different forms of conditions, individual vs co-occurring traits
Condition:
maturity: draft
maturity: trial use
description: >-
A set of traits (TraitSet) or a single trait (Disease, Phenotype, etc.) that represents
the object of a Variant Pathogenicity statement.
Expand All @@ -20,7 +20,7 @@ $defs:
# TraitSet data structure to provide support for co-occuring traits (i.e. diseases, phenotypes, etc.)
TraitSet:
type: object
maturity: draft
maturity: trial use
inherits: gks-core:Element
description: >-
A set of conditions (diseases, phenotypes, traits) that are co-occurring.
Expand All @@ -36,7 +36,7 @@ $defs:

# Therapeutic
Therapeutic:
maturity: draft
maturity: trial use
description: >-
A group of therapies (TherapyGroup) or a single therapy (drug, procedure, behavioral intervention, etc.).
oneOf:
Expand All @@ -46,13 +46,13 @@ $defs:
# TherapyGroup data structure to provide support for combination therapies (i.e. drug treatment, etc.)
TherapyGroup:
type: object
maturity: draft
maturity: trial use
inherits: gks-core:Element
description: >-
A group of therapies that are applied together to treat a condition.
properties:
groupType:
type: string
$ref: "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
description: The type of the therapy group.
therapies:
type: array
Expand Down
2 changes: 1 addition & 1 deletion schema/va-spec/base/json/Condition
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/va-spec/1.x/base/json/Condition",
"title": "Condition",
"maturity": "draft",
"maturity": "trial use",
"description": "A set of traits (TraitSet) or a single trait (Disease, Phenotype, etc.) that represents the object of a Variant Pathogenicity statement.",
"oneOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/va-spec/base/json/Therapeutic
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/va-spec/1.x/base/json/Therapeutic",
"title": "Therapeutic",
"maturity": "draft",
"maturity": "trial use",
"description": "A group of therapies (TherapyGroup) or a single therapy (drug, procedure, behavioral intervention, etc.).",
"oneOf": [
{
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/json/TherapyGroup
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://w3id.org/ga4gh/schema/va-spec/1.x/base/json/TherapyGroup",
"title": "TherapyGroup",
"type": "object",
"maturity": "draft",
"maturity": "trial use",
"description": "A group of therapies that are applied together to treat a condition.",
"properties": {
"id": {
Expand All @@ -20,7 +20,7 @@
"$comment": "Extension objects have a key-value data structure that allows definition of custom fields in the data itself. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems."
},
"groupType": {
"type": "string",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "The type of the therapy group."
},
"therapies": {
Expand Down
2 changes: 1 addition & 1 deletion schema/va-spec/base/json/TraitSet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://w3id.org/ga4gh/schema/va-spec/1.x/base/json/TraitSet",
"title": "TraitSet",
"type": "object",
"maturity": "draft",
"maturity": "trial use",
"description": "A set of conditions (diseases, phenotypes, traits) that are co-occurring.",
"properties": {
"id": {
Expand Down
8 changes: 8 additions & 0 deletions tests/fixtures/therapy-group.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id: civic.theragroup:e1090
therapies:
- primaryCode: ncit:C1005
label: Arsenic Trioxide
- primaryCode: C900
label: Tretinoin
groupType:
primaryCode: combination
6 changes: 6 additions & 0 deletions tests/fixtures/traitset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id: traitset001
traits:
- primaryCode: HP:0025769
label: Disordered formal thought process
- primaryCode: HP:0033051
label: Impaired executive functioning
8 changes: 8 additions & 0 deletions tests/test_definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ tests:
namespace: va-spec.base
definition: StudyGroup

# test domain entities
- test_file: traitset.yaml
namespace: va-spec.base
definition: TraitSet
- test_file: therapy-group.yaml
namespace: va-spec.base
definition: TherapyGroup

# test propositions
- test_file: EVFI-proposition.yaml
namespace: va-spec.base
Expand Down
2 changes: 1 addition & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def _get_trial_use_classes():
return set([x for x in js_def if x.startswith('va-spec') and js_def[x]['maturity'] == 'trial use'])

va_abstract_classes = {'va-spec.base:SubjectVariantProposition'}
va_abstract_classes = {'va-spec.base:SubjectVariantProposition', 'va-spec.base:Condition', 'va-spec.base:Therapeutic'}

def test_examples():
with open(test_path / 'test_definitions.yaml') as def_file:
Expand Down
10 changes: 9 additions & 1 deletion tests/tu_coverage_exceptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,12 @@ va-spec.base:Method:

# InformationEntity
- specifiedBy
- contributions
- contributions

va-spec.base:TraitSet:
# Element
- extensions

va-spec.base:TherapyGroup:
# Element
- extensions

0 comments on commit 0bc7d16

Please sign in to comment.