Skip to content

Commit

Permalink
split out genes and conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
ahwagner committed Mar 3, 2024
1 parent 3114f45 commit 69ef2ff
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 85 deletions.
66 changes: 66 additions & 0 deletions schema/conditions-source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
$schema: http://json-schema.org/draft/2020-12/schema
title: GKS Common Library Conditions Definitions
strict: true

imports:
core: core-source.yaml

$defs:
Condition:
inherits: core:DomainEntity
description: >-
A disease or other medical disorder.
oneOf:
- $ref: "#/$defs/TraitSet"
- $ref: "#/$defs/Disease"
- $ref: "#/$defs/Phenotype"

TraitSet:
type: object
maturity: draft
description: >-
A set of phenotype and/or disease concepts that together constitute a condition.
inherits: Condition
properties:
type:
extends: type
const: TraitSet
default: TraitSet
description: MUST be "TraitSet".
traits:
type: array
ordered: false
items:
anyOf:
- $ref: "#/$defs/Disease"
- $ref: "#/$defs/Phenotype"
minItems: 2
required:
- traits

Disease:
type: object
maturity: draft
inherits: Condition
description: >-
A particular abnormal condition that negatively affects the structure or function
of all or part of an organism and is not immediately due to any external injury.
properties:
type:
extends: type
const: Disease
default: Disease
description: MUST be "Disease".

Phenotype:
type: object
maturity: draft
inherits: Condition
description: >-
An observable characteristic or trait of an organism.
properties:
type:
extends: type
const: Phenotype
default: Phenotype
description: MUST be "Phenotype".
72 changes: 0 additions & 72 deletions schema/core-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,75 +138,3 @@ $defs:
type: string
heritableRequired:
- type

Condition:
inherits: DomainEntity
description: >-
A disease or other medical disorder.
oneOf:
- $ref: "#/$defs/TraitSet"
- $ref: "#/$defs/Disease"
- $ref: "#/$defs/Phenotype"

TraitSet:
type: object
maturity: draft
description: >-
A set of phenotype and/or disease concepts that together constitute a condition.
inherits: Condition
properties:
type:
extends: type
const: TraitSet
default: TraitSet
description: MUST be "TraitSet".
traits:
type: array
ordered: false
items:
anyOf:
- $ref: "#/$defs/Disease"
- $ref: "#/$defs/Phenotype"
minItems: 2
required:
- traits

Disease:
type: object
maturity: draft
inherits: Condition
description: >-
A particular abnormal condition that negatively affects the structure or function
of all or part of an organism and is not immediately due to any external injury.
properties:
type:
extends: type
const: Disease
default: Disease
description: MUST be "Disease".

Phenotype:
type: object
maturity: draft
inherits: Condition
description: >-
An observable characteristic or trait of an organism.
properties:
type:
extends: type
const: Phenotype
default: Phenotype
description: MUST be "Phenotype".

Gene:
inherits: DomainEntity
maturity: draft
description: >-
A basic physical and functional unit of heredity.
type: object
properties:
type:
type: string
const: "Gene"
default: "Gene"
description: MUST be "Gene"
6 changes: 3 additions & 3 deletions schema/def/Disease.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A particular abnormal condition that negatively affects the structure or functio

**Information Model**

Some Disease attributes are inherited from :ref:`DomainEntity`.
Some Disease attributes are inherited from :ref:`core:DomainEntity`.

.. list-table::
:class: clean-wrap
Expand All @@ -29,11 +29,11 @@ Some Disease attributes are inherited from :ref:`DomainEntity`.
- 0..1
- A free-text description of the entity.
* - extensions
- :ref:`Extension`
- `Extension <core.json#/$defs/Extension>`_
- 0..m
-
* - mappings
- :ref:`Mapping`
- `Mapping <core.json#/$defs/Mapping>`_
- 0..m
-
* - aliases
Expand Down
6 changes: 3 additions & 3 deletions schema/def/Gene.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A basic physical and functional unit of heredity.

**Information Model**

Some Gene attributes are inherited from :ref:`DomainEntity`.
Some Gene attributes are inherited from :ref:`core:DomainEntity`.

.. list-table::
:class: clean-wrap
Expand All @@ -29,11 +29,11 @@ Some Gene attributes are inherited from :ref:`DomainEntity`.
- 0..1
- A free-text description of the entity.
* - extensions
- :ref:`Extension`
- `Extension <core.json#/$defs/Extension>`_
- 0..m
-
* - mappings
- :ref:`Mapping`
- `Mapping <core.json#/$defs/Mapping>`_
- 0..m
-
* - type
Expand Down
6 changes: 3 additions & 3 deletions schema/def/Phenotype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ An observable characteristic or trait of an organism.

**Information Model**

Some Phenotype attributes are inherited from :ref:`DomainEntity`.
Some Phenotype attributes are inherited from :ref:`core:DomainEntity`.

.. list-table::
:class: clean-wrap
Expand All @@ -29,11 +29,11 @@ Some Phenotype attributes are inherited from :ref:`DomainEntity`.
- 0..1
- A free-text description of the entity.
* - extensions
- :ref:`Extension`
- `Extension <core.json#/$defs/Extension>`_
- 0..m
-
* - mappings
- :ref:`Mapping`
- `Mapping <core.json#/$defs/Mapping>`_
- 0..m
-
* - aliases
Expand Down
6 changes: 3 additions & 3 deletions schema/def/TraitSet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A set of phenotype and/or disease concepts that together constitute a condition.

**Information Model**

Some TraitSet attributes are inherited from :ref:`DomainEntity`.
Some TraitSet attributes are inherited from :ref:`core:DomainEntity`.

.. list-table::
:class: clean-wrap
Expand All @@ -29,11 +29,11 @@ Some TraitSet attributes are inherited from :ref:`DomainEntity`.
- 0..1
- A free-text description of the entity.
* - extensions
- :ref:`Extension`
- `Extension <core.json#/$defs/Extension>`_
- 0..m
-
* - mappings
- :ref:`Mapping`
- `Mapping <core.json#/$defs/Mapping>`_
- 0..m
-
* - aliases
Expand Down
20 changes: 20 additions & 0 deletions schema/genes-source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$schema: http://json-schema.org/draft/2020-12/schema
title: GKS Common Library Gene Definition
strict: true

imports:
core: core-source.yaml

$defs:
Gene:
inherits: core:DomainEntity
maturity: draft
description: >-
A basic physical and functional unit of heredity.
type: object
properties:
type:
type: string
const: "Gene"
default: "Gene"
description: MUST be "Gene"
2 changes: 1 addition & 1 deletion schema/therapeutics-source.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$schema: http://json-schema.org/draft/2020-12/schema
title: GKS Common Library Core Definitions
title: GKS Common Library Therapeutics Definitions
strict: true

imports:
Expand Down

0 comments on commit 69ef2ff

Please sign in to comment.