Skip to content

Commit 24b99f3

Browse files
committed
Merge branch 'fix_bke_taxonomy_model_20250924' of https://github.com/puja-trivedi/models into fix_bke_taxonomy_model_20250924
2 parents da370a6 + 0c90466 commit 24b99f3

File tree

4 files changed

+53
-14
lines changed

4 files changed

+53
-14
lines changed

erdiagram-autogen/bke_taxonomy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Abbreviation {
5252
uriorcurieList xref
5353
string term
5454
string meaning
55-
string entity_type
55+
abbreviation_entity_type entity_type
5656
iri_type iri
5757
uriorcurieList category
5858
stringList type
@@ -183,7 +183,7 @@ CellTypeSet {
183183
string description
184184
integer order
185185
uriorcurieList xref
186-
string cell_type_set_type
186+
cell_type_set_type cell_type_set_type
187187
iri_type iri
188188
uriorcurieList category
189189
stringList type

json-schema-autogen/bke_taxonomy.json

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@
7474
]
7575
},
7676
"entity_type": {
77-
"description": "The entity type which the abbreviation term denotes.",
78-
"type": [
79-
"string",
80-
"null"
81-
]
77+
"$ref": "#/$defs/AbbreviationEntityType",
78+
"description": "The entity type which the abbreviation term denotes."
8279
},
8380
"full_name": {
8481
"description": "a long-form human readable name for a thing",
@@ -197,6 +194,16 @@
197194
"title": "Abbreviation",
198195
"type": "object"
199196
},
197+
"AbbreviationEntityType": {
198+
"description": "",
199+
"enum": [
200+
"cell type",
201+
"gene",
202+
"structure"
203+
],
204+
"title": "AbbreviationEntityType",
205+
"type": "string"
206+
},
200207
"Activity": {
201208
"additionalProperties": false,
202209
"description": "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.",
@@ -941,11 +948,8 @@
941948
]
942949
},
943950
"cell_type_set_type": {
944-
"description": "A tag denoting the type or purpose of the cell type set.",
945-
"type": [
946-
"string",
947-
"null"
948-
]
951+
"$ref": "#/$defs/CellTypeSetType",
952+
"description": "A tag denoting the type or purpose of the cell type set."
949953
},
950954
"contains_taxon": {
951955
"description": "One of potentially many cell types taxons which together defines the cell type set.",
@@ -1106,6 +1110,15 @@
11061110
"title": "CellTypeSet",
11071111
"type": "object"
11081112
},
1113+
"CellTypeSetType": {
1114+
"description": "",
1115+
"enum": [
1116+
"taxonomic level",
1117+
"neighborhood"
1118+
],
1119+
"title": "CellTypeSetType",
1120+
"type": "string"
1121+
},
11091122
"CellTypeTaxon": {
11101123
"additionalProperties": false,
11111124
"description": "A cell type taxon is a node in a taxonomy. Taxons represents a unit of cell type classification and is defined by a set of clusters. Taxons may be organized into a heirarchy and levels. Taxons at higher levels represents broader cell type classes and partitioned into more specific types at lower levels. Additionally, taxons may be organized into neighborhoods or related groups.",

jsonld-context-autogen/bke_taxonomy.context.jsonld

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@
199199
"@id": "denotes_parcellation_term"
200200
},
201201
"entity_type": {
202+
"@context": {
203+
"text": "skos:notation",
204+
"description": "skos:prefLabel",
205+
"meaning": "@id"
206+
},
202207
"@id": "entity_type"
203208
},
204209
"meaning": {
@@ -244,6 +249,11 @@
244249
"@id": "biolink:category"
245250
},
246251
"cell_type_set_type": {
252+
"@context": {
253+
"text": "skos:notation",
254+
"description": "skos:prefLabel",
255+
"meaning": "@id"
256+
},
247257
"@id": "cell_type_set_type"
248258
},
249259
"contains_taxon": {

models_py-autogen/bke_taxonomy.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ class DISTANCEUNIT(str, Enum):
116116
meter = "m"
117117

118118

119+
class AbbreviationEntityType(str, Enum):
120+
# Abbreviation denotes a Cell Type entity.
121+
cell_type = "cell type"
122+
# Abbreviation denotes a Gene entity.
123+
gene = "gene"
124+
# Abbreviation denotes a Structure entity.
125+
structure = "structure"
126+
127+
128+
class CellTypeSetType(str, Enum):
129+
# Denotes CellTypeSet is at Taxonomic level.
130+
taxonomic_level = "taxonomic level"
131+
# Denotes CellTypeSet is at Neighborhood level.
132+
neighborhood = "neighborhood"
133+
134+
119135

120136
class OntologyClass(ConfiguredBaseModel):
121137
"""
@@ -11159,7 +11175,7 @@ class CellTypeSet(ProvEntity, NamedThing):
1115911175
'narrow_mappings': ['gff3:Dbxref', 'gpi:DB_Xrefs'],
1116011176
'slot_uri': 'biolink:xref'} })
1116111177
contains_taxon: Optional[List[str]] = Field(default=None, description="""One of potentially many cell types taxons which together defines the cell type set.""", json_schema_extra = { "linkml_meta": {'alias': 'contains_taxon', 'domain_of': ['CellTypeSet']} })
11162-
cell_type_set_type: Optional[str] = Field(default=None, description="""A tag denoting the type or purpose of the cell type set.""", json_schema_extra = { "linkml_meta": {'alias': 'cell_type_set_type',
11178+
cell_type_set_type: Optional[CellTypeSetType] = Field(default=None, description="""A tag denoting the type or purpose of the cell type set.""", json_schema_extra = { "linkml_meta": {'alias': 'cell_type_set_type',
1116311179
'domain_of': ['CellTypeSet'],
1116411180
'examples': [{'value': 'taxonomic_level'}],
1116511181
'local_names': {'allen': {'local_name_source': 'allen',
@@ -14637,7 +14653,7 @@ class Abbreviation(ProvEntity, NamedThing):
1463714653
'domain_of': ['Abbreviation'],
1463814654
'examples': [{'value': 'intratelencephalic-projecting glutamatergic cortical '
1463914655
'neuron'}]} })
14640-
entity_type: Optional[str] = Field(default=None, description="""The entity type which the abbreviation term denotes.""", json_schema_extra = { "linkml_meta": {'alias': 'entity_type',
14656+
entity_type: Optional[AbbreviationEntityType] = Field(default=None, description="""The entity type which the abbreviation term denotes.""", json_schema_extra = { "linkml_meta": {'alias': 'entity_type',
1464114657
'domain_of': ['Abbreviation'],
1464214658
'examples': [{'value': 'cell type'}]} })
1464314659
was_derived_from: Optional[str] = Field(default=None, description="""A derivation is a transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a pre-existing entity.""", json_schema_extra = { "linkml_meta": {'alias': 'was_derived_from',

0 commit comments

Comments
 (0)