From 396ee43cd3aed535f0bd20fd63f0e255f89591d1 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 27 Jul 2023 10:23:54 -0400 Subject: [PATCH 01/78] first --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 672778849..534c10c7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,8 @@ dynamic = ["version"] zarr = ["zarr>=2.12.0"] tqdm = ["tqdm>=4.41.0"] linkml = ["linkml-runtime>=1.5.0"] +schemasheets = ["schemasheets>=0.1.23"] +oaklib = ["oaklib>=0.5.12"] [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf" From 1664400eb478024cae89489621e8d9794f1e3b95 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 27 Jul 2023 10:46:55 -0400 Subject: [PATCH 02/78] schemamaker --- src/hdmf/term_set.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index a86838a89..43d353c92 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -23,8 +23,28 @@ def __init__(self, except ImportError: msg = "Install linkml_runtime" raise ValueError(msg) + try: + from schemasheets import schemamaker + except ImportError: + msg = "Install schemasheets" + raise ValueError(msg) + try: + from oaklib import "..." + except ImportError: + msg = "Install oaklib" + raise ValueError(msg) self.term_schema_path = term_schema_path - self.view = SchemaView(self.term_schema_path) + self.schemasheets_folder = schemasheets_folder + self.sheets_dest = sheets_dest + if self.schemasheets_folder is not None and self.sheets_dest is not None: + if self.term_schema_path is not None: + msg ="..." + raise ValueError(msg) + else: + schema_maker = SchemaMaker + self.view = SchemaView(self.sheets_dest) + else: + self.view = SchemaView(self.term_schema_path) self.sources = self.view.schema.prefixes def __repr__(self): From c9f90e4bb125b087f54e7f12864f13b9cedfd237 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Thu, 27 Jul 2023 08:13:56 -0700 Subject: [PATCH 03/78] schemasheets support integration --- src/hdmf/term_set.py | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 43d353c92..02197bc28 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -1,5 +1,11 @@ +import yaml +import glob from collections import namedtuple from .utils import docval +from linkml_runtime.utils.schemaview import SchemaView +from linkml_runtime.utils.schema_as_dict import schema_as_dict +from schemasheets.schemamaker import SchemaMaker + class TermSet(): @@ -13,36 +19,21 @@ class TermSet(): """ def __init__(self, term_schema_path: str, + schemasheets_folder: str ): """ :param term_schema_path: The path to LinkML YAML enumeration schema """ - try: - from linkml_runtime.utils.schemaview import SchemaView - except ImportError: - msg = "Install linkml_runtime" - raise ValueError(msg) - try: - from schemasheets import schemamaker - except ImportError: - msg = "Install schemasheets" - raise ValueError(msg) - try: - from oaklib import "..." - except ImportError: - msg = "Install oaklib" - raise ValueError(msg) self.term_schema_path = term_schema_path self.schemasheets_folder = schemasheets_folder - self.sheets_dest = sheets_dest if self.schemasheets_folder is not None and self.sheets_dest is not None: if self.term_schema_path is not None: msg ="..." raise ValueError(msg) else: - schema_maker = SchemaMaker - self.view = SchemaView(self.sheets_dest) + self.term_schema_path = self.__schemasheets_convert(self.schemasheets_folder) + self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) self.sources = self.view.schema.prefixes @@ -114,3 +105,17 @@ def __getitem__(self, term): except KeyError: msg = 'Term not in schema' raise ValueError(msg) + + def __schemasheets_convert(self): + schema_maker = SchemaMaker() + tsv_file_paths = glob.glob(self.schemasheets_folder + "/*.tsv") + schema = schema_maker.create_schema(tsv_file_paths) + schema_dict = schema_as_dict(schema) + + schemasheet_schema_path = glob.glob(self.schemasheets_folder + "/schemasheet_schema.yaml")[0] + + with open(schemasheet_schema_path, "w") as f: + yaml.dump(schema_dict, f) + + return schemasheet_schema_path + \ No newline at end of file From c3aeac2b2d162a937d468b3cffb2a2046db20719 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Thu, 27 Jul 2023 12:40:35 -0700 Subject: [PATCH 04/78] schemasheets files for term set test --- tests/unit/test_term_set_input/schemasheets/classes.tsv | 3 +++ tests/unit/test_term_set_input/schemasheets/enums.tsv | 9 +++++++++ tests/unit/test_term_set_input/schemasheets/prefixes.tsv | 4 ++++ tests/unit/test_term_set_input/schemasheets/schema.tsv | 3 +++ tests/unit/test_term_set_input/schemasheets/slots.tsv | 3 +++ 5 files changed, 22 insertions(+) create mode 100644 tests/unit/test_term_set_input/schemasheets/classes.tsv create mode 100644 tests/unit/test_term_set_input/schemasheets/enums.tsv create mode 100644 tests/unit/test_term_set_input/schemasheets/prefixes.tsv create mode 100644 tests/unit/test_term_set_input/schemasheets/schema.tsv create mode 100644 tests/unit/test_term_set_input/schemasheets/slots.tsv diff --git a/tests/unit/test_term_set_input/schemasheets/classes.tsv b/tests/unit/test_term_set_input/schemasheets/classes.tsv new file mode 100644 index 000000000..c080ca35d --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/classes.tsv @@ -0,0 +1,3 @@ +class slot +> class slot +BrainSample cell_type \ No newline at end of file diff --git a/tests/unit/test_term_set_input/schemasheets/enums.tsv b/tests/unit/test_term_set_input/schemasheets/enums.tsv new file mode 100644 index 000000000..4b576d610 --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/enums.tsv @@ -0,0 +1,9 @@ +valueset value mapping description +> enum permissible_value meaning description +NeuronOrGlialCellTypeEnum Enumeration to capture various cell types found in the brain. +NeuronOrGlialCellTypeEnum PYRAMIDAL_NEURON CL:0000598 Neurons with a pyramidal shaped cell body (soma) and two distinct dendritic trees. +NeuronOrGlialCellTypeEnum INTERNEURON CL:0000099 Neurons whose axons (and dendrites) are limited to a single brain area. +NeuronOrGlialCellTypeEnum MOTOR_NEURON CL:0000100 Neurons whose cell body is located in the motor cortex, brainstem or the spinal cord, and whose axon (fiber) projects to the spinal cord or outside of the spinal cord to directly or indirectly control effector organs, mainly muscles and glands. +NeuronOrGlialCellTypeEnum ASTROCYTE CL:0000127 Characteristic star-shaped glial cells in the brain and spinal cord. +NeuronOrGlialCellTypeEnum OLIGODENDROCYTE CL:0000128 Type of neuroglia whose main functions are to provide support and insulation to axons within the central nervous system (CNS) of jawed vertebrates. +NeuronOrGlialCellTypeEnum MICROGLIAL_CELL CL:0000129 Microglia are the resident immune cells of the brain and constantly patrol the cerebral microenvironment to respond to pathogens and damage. \ No newline at end of file diff --git a/tests/unit/test_term_set_input/schemasheets/prefixes.tsv b/tests/unit/test_term_set_input/schemasheets/prefixes.tsv new file mode 100644 index 000000000..122b4b3c2 --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/prefixes.tsv @@ -0,0 +1,4 @@ +prefix URI +> prefix prefix_reference +linkml https://w3id.org/linkml/ +CL http://purl.obolibrary.org/obo/cl.owl \ No newline at end of file diff --git a/tests/unit/test_term_set_input/schemasheets/schema.tsv b/tests/unit/test_term_set_input/schemasheets/schema.tsv new file mode 100644 index 000000000..52c6a8471 --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/schema.tsv @@ -0,0 +1,3 @@ +schema uri title description +> schema id title description +nwb_static_enums https://w3id.org/linkml/examples/nwb_static_enums static enums example this schema demonstrates the use of static enums \ No newline at end of file diff --git a/tests/unit/test_term_set_input/schemasheets/slots.tsv b/tests/unit/test_term_set_input/schemasheets/slots.tsv new file mode 100644 index 000000000..b6665bd42 --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/slots.tsv @@ -0,0 +1,3 @@ +term required +> slot required +cell_type TRUE \ No newline at end of file From ddd09ed27d43ae76cf59f096a924f583581b737c Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Thu, 27 Jul 2023 13:12:27 -0700 Subject: [PATCH 05/78] unit test for schemasheets integration --- src/hdmf/term_set.py | 7 +++---- tests/unit/test_term_set.py | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 02197bc28..b927fac3c 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -18,16 +18,15 @@ class TermSet(): :ivar view: SchemaView of the term set schema """ def __init__(self, - term_schema_path: str, - schemasheets_folder: str + term_schema_path: str=None, + schemasheets_folder: str=None ): """ :param term_schema_path: The path to LinkML YAML enumeration schema - """ self.term_schema_path = term_schema_path self.schemasheets_folder = schemasheets_folder - if self.schemasheets_folder is not None and self.sheets_dest is not None: + if self.schemasheets_folder is not None: if self.term_schema_path is not None: msg ="..." raise ValueError(msg) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index cc3d07964..b398cf67b 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -1,6 +1,10 @@ +import os +import unittest + from hdmf.term_set import TermSet from hdmf.testing import TestCase -import unittest + +CUR_DIR = os.path.dirname(os.path.realpath(__file__)) try: @@ -43,4 +47,11 @@ def test_get_item(self): def test_get_item_key_error(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') with self.assertRaises(ValueError): - termset['Homo Ssapiens'] + termset['Homo Ssapiens'] + + @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + def test_view_set_sheets(self): + folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") + termset = TermSet(schemasheets_folder=folder) + expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] + self.assertEqual(list(termset.view_set), expected) From 0cbd222ac6db82e661b68f6574854f4d3775c507 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 27 Jul 2023 16:38:41 -0400 Subject: [PATCH 06/78] test --- src/hdmf/term_set.py | 9 ++-- tests/unit/test_term_set.py | 2 +- .../schemasheets/file.yaml | 52 +++++++++++++++++++ 3 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 tests/unit/test_term_set_input/schemasheets/file.yaml diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index b927fac3c..14d1a8483 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -1,5 +1,6 @@ import yaml import glob +import os from collections import namedtuple from .utils import docval from linkml_runtime.utils.schemaview import SchemaView @@ -31,7 +32,7 @@ def __init__(self, msg ="..." raise ValueError(msg) else: - self.term_schema_path = self.__schemasheets_convert(self.schemasheets_folder) + self.term_schema_path = self.__schemasheets_convert() self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) @@ -104,17 +105,15 @@ def __getitem__(self, term): except KeyError: msg = 'Term not in schema' raise ValueError(msg) - + def __schemasheets_convert(self): schema_maker = SchemaMaker() tsv_file_paths = glob.glob(self.schemasheets_folder + "/*.tsv") schema = schema_maker.create_schema(tsv_file_paths) schema_dict = schema_as_dict(schema) - - schemasheet_schema_path = glob.glob(self.schemasheets_folder + "/schemasheet_schema.yaml")[0] + schemasheet_schema_path = os.path.join(self.schemasheets_folder, "file.yaml") with open(schemasheet_schema_path, "w") as f: yaml.dump(schema_dict, f) return schemasheet_schema_path - \ No newline at end of file diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index b398cf67b..71c106e34 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -47,7 +47,7 @@ def test_get_item(self): def test_get_item_key_error(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') with self.assertRaises(ValueError): - termset['Homo Ssapiens'] + termset['Homo Ssapiens'] @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): diff --git a/tests/unit/test_term_set_input/schemasheets/file.yaml b/tests/unit/test_term_set_input/schemasheets/file.yaml new file mode 100644 index 000000000..72bade0d0 --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/file.yaml @@ -0,0 +1,52 @@ +classes: + BrainSample: + slot_usage: + cell_type: {} + slots: + - cell_type +default_prefix: TEMP +default_range: string +description: this schema demonstrates the use of static enums +enums: + NeuronOrGlialCellTypeEnum: + description: Enumeration to capture various cell types found in the brain. + permissible_values: + ASTROCYTE: + description: Characteristic star-shaped glial cells in the brain and spinal + cord. + meaning: CL:0000127 + INTERNEURON: + description: Neurons whose axons (and dendrites) are limited to a single brain + area. + meaning: CL:0000099 + MICROGLIAL_CELL: + description: Microglia are the resident immune cells of the brain and constantly + patrol the cerebral microenvironment to respond to pathogens and damage. + meaning: CL:0000129 + MOTOR_NEURON: + description: Neurons whose cell body is located in the motor cortex, brainstem + or the spinal cord, and whose axon (fiber) projects to the spinal cord or + outside of the spinal cord to directly or indirectly control effector organs, + mainly muscles and glands. + meaning: CL:0000100 + OLIGODENDROCYTE: + description: Type of neuroglia whose main functions are to provide support + and insulation to axons within the central nervous system (CNS) of jawed + vertebrates. + meaning: CL:0000128 + PYRAMIDAL_NEURON: + description: Neurons with a pyramidal shaped cell body (soma) and two distinct + dendritic trees. + meaning: CL:0000598 +id: https://w3id.org/linkml/examples/nwb_static_enums +imports: +- linkml:types +name: nwb_static_enums +prefixes: + CL: http://purl.obolibrary.org/obo/cl.owl + TEMP: https://example.org/TEMP/ + linkml: https://w3id.org/linkml/ +slots: + cell_type: + required: true +title: static enums example From cee5b2025c16e58770c9a7ed01b594914a67cc76 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Fri, 28 Jul 2023 06:32:58 -0700 Subject: [PATCH 07/78] add oaklib to termset --- src/hdmf/term_set.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 14d1a8483..33678ea16 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -6,6 +6,7 @@ from linkml_runtime.utils.schemaview import SchemaView from linkml_runtime.utils.schema_as_dict import schema_as_dict from schemasheets.schemamaker import SchemaMaker +from oaklib.utilities.subsets.value_set_expander import ValueSetExpander @@ -20,16 +21,19 @@ class TermSet(): """ def __init__(self, term_schema_path: str=None, - schemasheets_folder: str=None + schemasheets_folder: str=None, + expand_terms: list=None ): """ :param term_schema_path: The path to LinkML YAML enumeration schema """ self.term_schema_path = term_schema_path self.schemasheets_folder = schemasheets_folder + self.expand_terms = expand_terms + if self.schemasheets_folder is not None: if self.term_schema_path is not None: - msg ="..." + msg = "..." raise ValueError(msg) else: self.term_schema_path = self.__schemasheets_convert() @@ -117,3 +121,7 @@ def __schemasheets_convert(self): yaml.dump(schema_dict, f) return schemasheet_schema_path + + def __enum_expander(self): + expander = ValueSetExpander() + \ No newline at end of file From 2ca9cb6cb7340aabf31f00744f7e50b8a9cc9ee2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 13:35:12 +0000 Subject: [PATCH 08/78] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/hdmf/term_set.py | 4 ++-- tests/unit/test_term_set_input/schemasheets/classes.tsv | 2 +- tests/unit/test_term_set_input/schemasheets/enums.tsv | 2 +- tests/unit/test_term_set_input/schemasheets/prefixes.tsv | 2 +- tests/unit/test_term_set_input/schemasheets/schema.tsv | 2 +- tests/unit/test_term_set_input/schemasheets/slots.tsv | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 33678ea16..98e91c818 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -121,7 +121,7 @@ def __schemasheets_convert(self): yaml.dump(schema_dict, f) return schemasheet_schema_path - + def __enum_expander(self): expander = ValueSetExpander() - \ No newline at end of file + diff --git a/tests/unit/test_term_set_input/schemasheets/classes.tsv b/tests/unit/test_term_set_input/schemasheets/classes.tsv index c080ca35d..d3d83d558 100644 --- a/tests/unit/test_term_set_input/schemasheets/classes.tsv +++ b/tests/unit/test_term_set_input/schemasheets/classes.tsv @@ -1,3 +1,3 @@ class slot > class slot -BrainSample cell_type \ No newline at end of file +BrainSample cell_type diff --git a/tests/unit/test_term_set_input/schemasheets/enums.tsv b/tests/unit/test_term_set_input/schemasheets/enums.tsv index 4b576d610..b76e4e92c 100644 --- a/tests/unit/test_term_set_input/schemasheets/enums.tsv +++ b/tests/unit/test_term_set_input/schemasheets/enums.tsv @@ -6,4 +6,4 @@ NeuronOrGlialCellTypeEnum INTERNEURON CL:0000099 Neurons whose axons (and dendri NeuronOrGlialCellTypeEnum MOTOR_NEURON CL:0000100 Neurons whose cell body is located in the motor cortex, brainstem or the spinal cord, and whose axon (fiber) projects to the spinal cord or outside of the spinal cord to directly or indirectly control effector organs, mainly muscles and glands. NeuronOrGlialCellTypeEnum ASTROCYTE CL:0000127 Characteristic star-shaped glial cells in the brain and spinal cord. NeuronOrGlialCellTypeEnum OLIGODENDROCYTE CL:0000128 Type of neuroglia whose main functions are to provide support and insulation to axons within the central nervous system (CNS) of jawed vertebrates. -NeuronOrGlialCellTypeEnum MICROGLIAL_CELL CL:0000129 Microglia are the resident immune cells of the brain and constantly patrol the cerebral microenvironment to respond to pathogens and damage. \ No newline at end of file +NeuronOrGlialCellTypeEnum MICROGLIAL_CELL CL:0000129 Microglia are the resident immune cells of the brain and constantly patrol the cerebral microenvironment to respond to pathogens and damage. diff --git a/tests/unit/test_term_set_input/schemasheets/prefixes.tsv b/tests/unit/test_term_set_input/schemasheets/prefixes.tsv index 122b4b3c2..b7b4f3376 100644 --- a/tests/unit/test_term_set_input/schemasheets/prefixes.tsv +++ b/tests/unit/test_term_set_input/schemasheets/prefixes.tsv @@ -1,4 +1,4 @@ prefix URI > prefix prefix_reference linkml https://w3id.org/linkml/ -CL http://purl.obolibrary.org/obo/cl.owl \ No newline at end of file +CL http://purl.obolibrary.org/obo/cl.owl diff --git a/tests/unit/test_term_set_input/schemasheets/schema.tsv b/tests/unit/test_term_set_input/schemasheets/schema.tsv index 52c6a8471..b6a032f45 100644 --- a/tests/unit/test_term_set_input/schemasheets/schema.tsv +++ b/tests/unit/test_term_set_input/schemasheets/schema.tsv @@ -1,3 +1,3 @@ schema uri title description > schema id title description -nwb_static_enums https://w3id.org/linkml/examples/nwb_static_enums static enums example this schema demonstrates the use of static enums \ No newline at end of file +nwb_static_enums https://w3id.org/linkml/examples/nwb_static_enums static enums example this schema demonstrates the use of static enums diff --git a/tests/unit/test_term_set_input/schemasheets/slots.tsv b/tests/unit/test_term_set_input/schemasheets/slots.tsv index b6665bd42..20d099e4f 100644 --- a/tests/unit/test_term_set_input/schemasheets/slots.tsv +++ b/tests/unit/test_term_set_input/schemasheets/slots.tsv @@ -1,3 +1,3 @@ term required > slot required -cell_type TRUE \ No newline at end of file +cell_type TRUE From d69430e113278537f33e2c0863bb1e3a77a5d86a Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 09:47:21 -0400 Subject: [PATCH 09/78] dynamic --- src/hdmf/term_set.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 33678ea16..fa583601a 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -121,7 +121,11 @@ def __schemasheets_convert(self): yaml.dump(schema_dict, f) return schemasheet_schema_path - + def __enum_expander(self): expander = ValueSetExpander() - \ No newline at end of file + # TODO: should linkml raise a warning if the schema does not have dynamic enums + enum = list(self.view.all_enums())[0] + schema_dir = os.path.dirname(self.term_schema_path) + output_path = os.path.join(schem_dir, "expanded_term_set.yaml") + expander.expand_in_place(self.term_schema_path, output_path) From fa4bc6132499c20d304b064b80eff9ce980431dc Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 09:53:22 -0400 Subject: [PATCH 10/78] dynamic --- src/hdmf/term_set.py | 8 +++++++- tests/unit/test_term_set.py | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index fa583601a..8d6ab1c34 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -22,7 +22,7 @@ class TermSet(): def __init__(self, term_schema_path: str=None, schemasheets_folder: str=None, - expand_terms: list=None + dynamic: bool=False ): """ :param term_schema_path: The path to LinkML YAML enumeration schema @@ -42,6 +42,10 @@ def __init__(self, self.view = SchemaView(self.term_schema_path) self.sources = self.view.schema.prefixes + if dynamic: + self.expanded_term_set_path = self.__enum_expander() + self.view = SchemaView(self.expanded_term_set_path) + def __repr__(self): re = "class: %s\n" % str(self.__class__) re += "term_schema_path: %s\n" % self.term_schema_path @@ -129,3 +133,5 @@ def __enum_expander(self): schema_dir = os.path.dirname(self.term_schema_path) output_path = os.path.join(schem_dir, "expanded_term_set.yaml") expander.expand_in_place(self.term_schema_path, output_path) + + return output_path diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 71c106e34..cea31f7c5 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -55,3 +55,10 @@ def test_view_set_sheets(self): termset = TermSet(schemasheets_folder=folder) expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] self.assertEqual(list(termset.view_set), expected) + + @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + def test_view_set_sheets(self): + folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") + termset = TermSet(schemasheets_folder=folder) + expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] + self.assertEqual(list(termset.view_set), expected) From 49db8d575fee1884045d983bf8314f7394edd9de Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Fri, 28 Jul 2023 06:55:50 -0700 Subject: [PATCH 11/78] example for dyanmic term set unit test --- tests/unit/example_dynamic_term_set.yaml | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tests/unit/example_dynamic_term_set.yaml diff --git a/tests/unit/example_dynamic_term_set.yaml b/tests/unit/example_dynamic_term_set.yaml new file mode 100644 index 000000000..33a90574e --- /dev/null +++ b/tests/unit/example_dynamic_term_set.yaml @@ -0,0 +1,56 @@ +id: https://w3id.org/linkml/examples/nwb_dynamic_enums +title: dynamic enums example +name: nwb_dynamic_enums +description: this schema demonstrates the use of dynamic enums + +prefixes: + linkml: https://w3id.org/linkml/ + CL: http://purl.obolibrary.org/obo/cl.owl + +imports: + - linkml:types + +default_range: string + +# ======================== # +# CLASSES # +# ======================== # +classes: + BrainSample: + slots: + - cell_type + +# ======================== # +# SLOTS # +# ======================== # +slots: + cell_type: + required: true + range: NeuronOrGlialCellTypeEnum + +# ======================== # +# ENUMS # +# ======================== # +enums: + NeuronTypeEnum: + reachable_from: + source_ontology: obo:cl + source_nodes: + - CL:0000540 ## neuron + include_self: false + relationship_types: + - rdfs:subClassOf + + GlialCellTypeEnum: + reachable_from: + source_ontology: obo:cl + source_nodes: + - CL:0000125 ## glial cell + include_self: false + relationship_types: + - rdfs:subClassOf + + NeuronOrGlialCellTypeEnum: + inherits: + - NeuronTypeEnum + - GlialCellTypeEnum \ No newline at end of file From 187dfef97f874cfe704ee98e17b717843225aca2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 13:56:20 +0000 Subject: [PATCH 12/78] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/unit/example_dynamic_term_set.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/example_dynamic_term_set.yaml b/tests/unit/example_dynamic_term_set.yaml index 33a90574e..cb56f44c6 100644 --- a/tests/unit/example_dynamic_term_set.yaml +++ b/tests/unit/example_dynamic_term_set.yaml @@ -33,16 +33,16 @@ slots: # ======================== # enums: NeuronTypeEnum: - reachable_from: + reachable_from: source_ontology: obo:cl source_nodes: - CL:0000540 ## neuron include_self: false relationship_types: - rdfs:subClassOf - + GlialCellTypeEnum: - reachable_from: + reachable_from: source_ontology: obo:cl source_nodes: - CL:0000125 ## glial cell @@ -53,4 +53,4 @@ enums: NeuronOrGlialCellTypeEnum: inherits: - NeuronTypeEnum - - GlialCellTypeEnum \ No newline at end of file + - GlialCellTypeEnum From b30f656e457eb4ca74c0c9b3a93478dc473152d0 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Fri, 28 Jul 2023 07:48:55 -0700 Subject: [PATCH 13/78] leverage oaklib to expand enums dyanmically --- src/hdmf/term_set.py | 7 +++---- tests/unit/example_dynamic_term_set.yaml | 17 ++--------------- tests/unit/test_term_set.py | 8 +++----- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 8d6ab1c34..010d7dbab 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -29,7 +29,6 @@ def __init__(self, """ self.term_schema_path = term_schema_path self.schemasheets_folder = schemasheets_folder - self.expand_terms = expand_terms if self.schemasheets_folder is not None: if self.term_schema_path is not None: @@ -129,9 +128,9 @@ def __schemasheets_convert(self): def __enum_expander(self): expander = ValueSetExpander() # TODO: should linkml raise a warning if the schema does not have dynamic enums - enum = list(self.view.all_enums())[0] + enum = list(self.view.all_enums()) schema_dir = os.path.dirname(self.term_schema_path) - output_path = os.path.join(schem_dir, "expanded_term_set.yaml") - expander.expand_in_place(self.term_schema_path, output_path) + output_path = os.path.join(schema_dir, "expanded_term_set.yaml") + expander.expand_in_place(self.term_schema_path, enum, output_path) return output_path diff --git a/tests/unit/example_dynamic_term_set.yaml b/tests/unit/example_dynamic_term_set.yaml index 33a90574e..0ae607107 100644 --- a/tests/unit/example_dynamic_term_set.yaml +++ b/tests/unit/example_dynamic_term_set.yaml @@ -26,7 +26,7 @@ classes: slots: cell_type: required: true - range: NeuronOrGlialCellTypeEnum + range: NeuronTypeEnum # ======================== # # ENUMS # @@ -40,17 +40,4 @@ enums: include_self: false relationship_types: - rdfs:subClassOf - - GlialCellTypeEnum: - reachable_from: - source_ontology: obo:cl - source_nodes: - - CL:0000125 ## glial cell - include_self: false - relationship_types: - - rdfs:subClassOf - - NeuronOrGlialCellTypeEnum: - inherits: - - NeuronTypeEnum - - GlialCellTypeEnum \ No newline at end of file + \ No newline at end of file diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index cea31f7c5..75c645c19 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -57,8 +57,6 @@ def test_view_set_sheets(self): self.assertEqual(list(termset.view_set), expected) @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") - def test_view_set_sheets(self): - folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") - termset = TermSet(schemasheets_folder=folder) - expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] - self.assertEqual(list(termset.view_set), expected) + def test_enum_expander(self): + termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) + self.assertEqual(len(termset.view_set), 502) \ No newline at end of file From 92c1e27516f4043936d05f0a27114ea135035963 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 14:53:21 +0000 Subject: [PATCH 14/78] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/unit/example_dynamic_term_set.yaml | 2 +- tests/unit/test_term_set.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/example_dynamic_term_set.yaml b/tests/unit/example_dynamic_term_set.yaml index 248ffb386..a438ba762 100644 --- a/tests/unit/example_dynamic_term_set.yaml +++ b/tests/unit/example_dynamic_term_set.yaml @@ -40,4 +40,4 @@ enums: include_self: false relationship_types: - rdfs:subClassOf - + diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 75c645c19..f994d0b83 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -59,4 +59,4 @@ def test_view_set_sheets(self): @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") def test_enum_expander(self): termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) - self.assertEqual(len(termset.view_set), 502) \ No newline at end of file + self.assertEqual(len(termset.view_set), 502) From 1a7dfcd5f51f3a4e2762f18614f95fc66b0d469a Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Fri, 28 Jul 2023 08:04:19 -0700 Subject: [PATCH 15/78] unit test for enum expansion method --- src/hdmf/term_set.py | 2 +- tests/unit/test_term_set.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 010d7dbab..623296b43 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -118,7 +118,7 @@ def __schemasheets_convert(self): tsv_file_paths = glob.glob(self.schemasheets_folder + "/*.tsv") schema = schema_maker.create_schema(tsv_file_paths) schema_dict = schema_as_dict(schema) - schemasheet_schema_path = os.path.join(self.schemasheets_folder, "file.yaml") + schemasheet_schema_path = os.path.join(self.schemasheets_folder, f"{schema_dict['name']}.yaml") with open(schemasheet_schema_path, "w") as f: yaml.dump(schema_dict, f) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 75c645c19..b0ce50ca8 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -53,7 +53,7 @@ def test_get_item_key_error(self): def test_view_set_sheets(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) - expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] + expected = ['ASTROCYTE', 'INTERNEURON', 'MICROGLIAL_CELL', 'MOTOR_NEURON', 'OLIGODENDROCYTE', 'PYRAMIDAL_NEURON'] self.assertEqual(list(termset.view_set), expected) @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") From 5e584c5aa06708295d011b4fc81ee45d4623efc1 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 11:04:47 -0400 Subject: [PATCH 16/78] dynamic --- src/hdmf/term_set.py | 3 ++- tests/unit/test_term_set.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 010d7dbab..d8e97a500 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -130,7 +130,8 @@ def __enum_expander(self): # TODO: should linkml raise a warning if the schema does not have dynamic enums enum = list(self.view.all_enums()) schema_dir = os.path.dirname(self.term_schema_path) - output_path = os.path.join(schema_dir, "expanded_term_set.yaml") + file_name = os.path.basename(self.term_schema_path) + output_path = os.path.join(schema_dir, "expanded_"file_name+".yaml") expander.expand_in_place(self.term_schema_path, enum, output_path) return output_path diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 75c645c19..4245c3fbb 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -2,7 +2,8 @@ import unittest from hdmf.term_set import TermSet -from hdmf.testing import TestCase +from hdmf.testing import TestCase, remove_test_file + CUR_DIR = os.path.dirname(os.path.realpath(__file__)) @@ -59,4 +60,5 @@ def test_view_set_sheets(self): @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") def test_enum_expander(self): termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) - self.assertEqual(len(termset.view_set), 502) \ No newline at end of file + self.assertEqual(len(termset.view_set), 502) + remove_test_file('./expanded_term_set.yaml') From 1858acfec288028c2134c6a5bad7b28ebeba9fcc Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 11:07:47 -0400 Subject: [PATCH 17/78] join error --- src/hdmf/term_set.py | 2 +- ...xpanded_example_dynamic_term_set.yaml.yaml | 2074 +++++++++++++++++ tests/unit/test_term_set.py | 2 +- .../schemasheets/nwb_static_enums.yaml | 52 + 4 files changed, 2128 insertions(+), 2 deletions(-) create mode 100644 tests/unit/expanded_example_dynamic_term_set.yaml.yaml create mode 100644 tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index a6d77e6cf..c100aae6e 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -131,7 +131,7 @@ def __enum_expander(self): enum = list(self.view.all_enums()) schema_dir = os.path.dirname(self.term_schema_path) file_name = os.path.basename(self.term_schema_path) - output_path = os.path.join(schema_dir, "expanded_"file_name+".yaml") + output_path = os.path.join(schema_dir, "expanded_"+file_name+".yaml") expander.expand_in_place(self.term_schema_path, enum, output_path) return output_path diff --git a/tests/unit/expanded_example_dynamic_term_set.yaml.yaml b/tests/unit/expanded_example_dynamic_term_set.yaml.yaml new file mode 100644 index 000000000..e89b1c110 --- /dev/null +++ b/tests/unit/expanded_example_dynamic_term_set.yaml.yaml @@ -0,0 +1,2074 @@ +id: https://w3id.org/linkml/examples/nwb_dynamic_enums +title: dynamic enums example +name: nwb_dynamic_enums +description: this schema demonstrates the use of dynamic enums + +prefixes: + linkml: https://w3id.org/linkml/ + CL: http://purl.obolibrary.org/obo/cl.owl + +imports: +- linkml:types + +default_range: string + +# ======================== # +# CLASSES # +# ======================== # +classes: + BrainSample: + slots: + - cell_type + +# ======================== # +# SLOTS # +# ======================== # +slots: + cell_type: + required: true + range: NeuronTypeEnum + +# ======================== # +# ENUMS # +# ======================== # +enums: + NeuronTypeEnum: + reachable_from: + source_ontology: obo:cl + source_nodes: + - CL:0000540 ## neuron + include_self: false + relationship_types: + - rdfs:subClassOf + + permissible_values: + CL:0000705: + text: CL:0000705 + description: R6 photoreceptor cell + meaning: CL:0000705 + CL:4023108: + text: CL:4023108 + description: oxytocin-secreting magnocellular cell + meaning: CL:4023108 + CL:0004240: + text: CL:0004240 + description: WF1 amacrine cell + meaning: CL:0004240 + CL:0004242: + text: CL:0004242 + description: WF3-1 amacrine cell + meaning: CL:0004242 + CL:1000380: + text: CL:1000380 + description: type 1 vestibular sensory cell of epithelium of macula of saccule + of membranous labyrinth + meaning: CL:1000380 + CL:4023128: + text: CL:4023128 + description: rostral periventricular region of the third ventricle KNDy neuron + meaning: CL:4023128 + CL:0003020: + text: CL:0003020 + description: retinal ganglion cell C outer + meaning: CL:0003020 + CL:4023094: + text: CL:4023094 + description: tufted pyramidal neuron + meaning: CL:4023094 + CL:4023057: + text: CL:4023057 + description: cerebellar inhibitory GABAergic interneuron + meaning: CL:4023057 + CL:2000049: + text: CL:2000049 + description: primary motor cortex pyramidal cell + meaning: CL:2000049 + CL:0000119: + text: CL:0000119 + description: cerebellar Golgi cell + meaning: CL:0000119 + CL:0004227: + text: CL:0004227 + description: flat bistratified amacrine cell + meaning: CL:0004227 + CL:1000606: + text: CL:1000606 + description: kidney nerve cell + meaning: CL:1000606 + CL:1001582: + text: CL:1001582 + description: lateral ventricle neuron + meaning: CL:1001582 + CL:0000165: + text: CL:0000165 + description: neuroendocrine cell + meaning: CL:0000165 + CL:0000555: + text: CL:0000555 + description: neuronal brush cell + meaning: CL:0000555 + CL:0004231: + text: CL:0004231 + description: recurving diffuse amacrine cell + meaning: CL:0004231 + CL:0000687: + text: CL:0000687 + description: R1 photoreceptor cell + meaning: CL:0000687 + CL:0001031: + text: CL:0001031 + description: cerebellar granule cell + meaning: CL:0001031 + CL:0003026: + text: CL:0003026 + description: retinal ganglion cell D1 + meaning: CL:0003026 + CL:4033035: + text: CL:4033035 + description: giant bipolar cell + meaning: CL:4033035 + CL:4023009: + text: CL:4023009 + description: extratelencephalic-projecting glutamatergic cortical neuron + meaning: CL:4023009 + CL:0010022: + text: CL:0010022 + description: cardiac neuron + meaning: CL:0010022 + CL:0000287: + text: CL:0000287 + description: eye photoreceptor cell + meaning: CL:0000287 + CL:0000488: + text: CL:0000488 + description: visible light photoreceptor cell + meaning: CL:0000488 + CL:0003046: + text: CL:0003046 + description: M13 retinal ganglion cell + meaning: CL:0003046 + CL:4023169: + text: CL:4023169 + description: trigeminal neuron + meaning: CL:4023169 + CL:0005007: + text: CL:0005007 + description: Kolmer-Agduhr neuron + meaning: CL:0005007 + CL:0005008: + text: CL:0005008 + description: macular hair cell + meaning: CL:0005008 + CL:4023027: + text: CL:4023027 + description: L5 T-Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023027 + CL:4033032: + text: CL:4033032 + description: diffuse bipolar 6 cell + meaning: CL:4033032 + CL:0008021: + text: CL:0008021 + description: anterior lateral line ganglion neuron + meaning: CL:0008021 + CL:4023028: + text: CL:4023028 + description: L5 non-Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023028 + CL:4023063: + text: CL:4023063 + description: medial ganglionic eminence derived interneuron + meaning: CL:4023063 + CL:4023032: + text: CL:4023032 + description: ON retinal ganglion cell + meaning: CL:4023032 + CL:0003039: + text: CL:0003039 + description: M8 retinal ganglion cell + meaning: CL:0003039 + CL:0000757: + text: CL:0000757 + description: type 5 cone bipolar cell (sensu Mus) + meaning: CL:0000757 + CL:0000609: + text: CL:0000609 + description: vestibular hair cell + meaning: CL:0000609 + CL:0004219: + text: CL:0004219 + description: A2 amacrine cell + meaning: CL:0004219 + CL:4030028: + text: CL:4030028 + description: glycinergic amacrine cell + meaning: CL:4030028 + CL:0002450: + text: CL:0002450 + description: tether cell + meaning: CL:0002450 + CL:0002374: + text: CL:0002374 + description: ear hair cell + meaning: CL:0002374 + CL:0004124: + text: CL:0004124 + description: retinal ganglion cell C1 + meaning: CL:0004124 + CL:0004115: + text: CL:0004115 + description: retinal ganglion cell B + meaning: CL:0004115 + CL:1000384: + text: CL:1000384 + description: type 2 vestibular sensory cell of epithelium of macula of saccule + of membranous labyrinth + meaning: CL:1000384 + CL:2000037: + text: CL:2000037 + description: posterior lateral line neuromast hair cell + meaning: CL:2000037 + CL:0000673: + text: CL:0000673 + description: Kenyon cell + meaning: CL:0000673 + CL:4023052: + text: CL:4023052 + description: Betz upper motor neuron + meaning: CL:4023052 + CL:0004243: + text: CL:0004243 + description: WF3-2 amacrine cell + meaning: CL:0004243 + CL:1000222: + text: CL:1000222 + description: stomach neuroendocrine cell + meaning: CL:1000222 + CL:0002310: + text: CL:0002310 + description: mammosomatotroph + meaning: CL:0002310 + CL:4023066: + text: CL:4023066 + description: horizontal pyramidal neuron + meaning: CL:4023066 + CL:0000379: + text: CL:0000379 + description: sensory processing neuron + meaning: CL:0000379 + CL:0011006: + text: CL:0011006 + description: Lugaro cell + meaning: CL:0011006 + CL:0004216: + text: CL:0004216 + description: type 5b cone bipolar cell + meaning: CL:0004216 + CL:0004126: + text: CL:0004126 + description: retinal ganglion cell C2 outer + meaning: CL:0004126 + CL:0000108: + text: CL:0000108 + description: cholinergic neuron + meaning: CL:0000108 + CL:0011103: + text: CL:0011103 + description: sympathetic neuron + meaning: CL:0011103 + CL:4023107: + text: CL:4023107 + description: reticulospinal neuron + meaning: CL:4023107 + CL:4023002: + text: CL:4023002 + description: dynamic beta motor neuron + meaning: CL:4023002 + CL:4030048: + text: CL:4030048 + description: striosomal D1 medium spiny neuron + meaning: CL:4030048 + CL:4023163: + text: CL:4023163 + description: spherical bushy cell + meaning: CL:4023163 + CL:4023061: + text: CL:4023061 + description: hippocampal CA4 neuron + meaning: CL:4023061 + CL:0000532: + text: CL:0000532 + description: CAP motoneuron + meaning: CL:0000532 + CL:0000526: + text: CL:0000526 + description: afferent neuron + meaning: CL:0000526 + CL:0003003: + text: CL:0003003 + description: G2 retinal ganglion cell + meaning: CL:0003003 + CL:0000530: + text: CL:0000530 + description: primary neuron (sensu Teleostei) + meaning: CL:0000530 + CL:4023045: + text: CL:4023045 + description: medulla-projecting glutamatergic neuron of the primary motor + cortex + meaning: CL:4023045 + CL:3000004: + text: CL:3000004 + description: peripheral sensory neuron + meaning: CL:3000004 + CL:0000544: + text: CL:0000544 + description: slowly adapting mechanoreceptor cell + meaning: CL:0000544 + CL:4030047: + text: CL:4030047 + description: matrix D2 medium spiny neuron + meaning: CL:4030047 + CL:0004220: + text: CL:0004220 + description: flag amacrine cell + meaning: CL:0004220 + CL:4023125: + text: CL:4023125 + description: KNDy neuron + meaning: CL:4023125 + CL:0004228: + text: CL:0004228 + description: broad diffuse amacrine cell + meaning: CL:0004228 + CL:4023122: + text: CL:4023122 + description: oxytocin receptor sst GABAergic cortical interneuron + meaning: CL:4023122 + CL:1000379: + text: CL:1000379 + description: type 1 vestibular sensory cell of epithelium of macula of utricle + of membranous labyrinth + meaning: CL:1000379 + CL:0011111: + text: CL:0011111 + description: gonadotropin-releasing hormone neuron + meaning: CL:0011111 + CL:0003042: + text: CL:0003042 + description: M9-OFF retinal ganglion cell + meaning: CL:0003042 + CL:0003030: + text: CL:0003030 + description: M3 retinal ganglion cell + meaning: CL:0003030 + CL:0003011: + text: CL:0003011 + description: G8 retinal ganglion cell + meaning: CL:0003011 + CL:0000202: + text: CL:0000202 + description: auditory hair cell + meaning: CL:0000202 + CL:0002271: + text: CL:0002271 + description: type EC1 enteroendocrine cell + meaning: CL:0002271 + CL:4023013: + text: CL:4023013 + description: corticothalamic-projecting glutamatergic cortical neuron + meaning: CL:4023013 + CL:4023114: + text: CL:4023114 + description: calyx vestibular afferent neuron + meaning: CL:4023114 + CL:0003045: + text: CL:0003045 + description: M12 retinal ganglion cell + meaning: CL:0003045 + CL:0002487: + text: CL:0002487 + description: cutaneous/subcutaneous mechanoreceptor cell + meaning: CL:0002487 + CL:4030053: + text: CL:4030053 + description: Island of Calleja granule cell + meaning: CL:4030053 + CL:0000490: + text: CL:0000490 + description: photopic photoreceptor cell + meaning: CL:0000490 + CL:2000023: + text: CL:2000023 + description: spinal cord ventral column interneuron + meaning: CL:2000023 + CL:1000381: + text: CL:1000381 + description: type 1 vestibular sensory cell of epithelium of crista of ampulla + of semicircular duct of membranous labyrinth + meaning: CL:1000381 + CL:0003013: + text: CL:0003013 + description: G10 retinal ganglion cell + meaning: CL:0003013 + CL:0000602: + text: CL:0000602 + description: pressoreceptor cell + meaning: CL:0000602 + CL:4023039: + text: CL:4023039 + description: amygdala excitatory neuron + meaning: CL:4023039 + CL:4030043: + text: CL:4030043 + description: matrix D1 medium spiny neuron + meaning: CL:4030043 + CL:0000105: + text: CL:0000105 + description: pseudounipolar neuron + meaning: CL:0000105 + CL:0004137: + text: CL:0004137 + description: retinal ganglion cell A2 inner + meaning: CL:0004137 + CL:1001436: + text: CL:1001436 + description: hair-tylotrich neuron + meaning: CL:1001436 + CL:1001503: + text: CL:1001503 + description: olfactory bulb tufted cell + meaning: CL:1001503 + CL:0000406: + text: CL:0000406 + description: CNS short range interneuron + meaning: CL:0000406 + CL:2000087: + text: CL:2000087 + description: dentate gyrus of hippocampal formation basket cell + meaning: CL:2000087 + CL:0000534: + text: CL:0000534 + description: primary interneuron (sensu Teleostei) + meaning: CL:0000534 + CL:0000246: + text: CL:0000246 + description: Mauthner neuron + meaning: CL:0000246 + CL:0003027: + text: CL:0003027 + description: retinal ganglion cell D2 + meaning: CL:0003027 + CL:0000752: + text: CL:0000752 + description: cone retinal bipolar cell + meaning: CL:0000752 + CL:0000410: + text: CL:0000410 + description: CNS long range interneuron + meaning: CL:0000410 + CL:0009000: + text: CL:0009000 + description: sensory neuron of spinal nerve + meaning: CL:0009000 + CL:0000754: + text: CL:0000754 + description: type 2 cone bipolar cell (sensu Mus) + meaning: CL:0000754 + CL:0002309: + text: CL:0002309 + description: corticotroph + meaning: CL:0002309 + CL:0010009: + text: CL:0010009 + description: camera-type eye photoreceptor cell + meaning: CL:0010009 + CL:4023069: + text: CL:4023069 + description: medial ganglionic eminence derived GABAergic cortical interneuron + meaning: CL:4023069 + CL:0000102: + text: CL:0000102 + description: polymodal neuron + meaning: CL:0000102 + CL:0000694: + text: CL:0000694 + description: R3 photoreceptor cell + meaning: CL:0000694 + CL:0004183: + text: CL:0004183 + description: retinal ganglion cell B3 + meaning: CL:0004183 + CL:0000693: + text: CL:0000693 + description: neurogliaform cell + meaning: CL:0000693 + CL:0000760: + text: CL:0000760 + description: type 8 cone bipolar cell (sensu Mus) + meaning: CL:0000760 + CL:4023001: + text: CL:4023001 + description: static beta motor neuron + meaning: CL:4023001 + CL:1000424: + text: CL:1000424 + description: chromaffin cell of paraaortic body + meaning: CL:1000424 + CL:0000120: + text: CL:0000120 + description: granule cell + meaning: CL:0000120 + CL:0002312: + text: CL:0002312 + description: somatotroph + meaning: CL:0002312 + CL:0000107: + text: CL:0000107 + description: autonomic neuron + meaning: CL:0000107 + CL:2000047: + text: CL:2000047 + description: brainstem motor neuron + meaning: CL:2000047 + CL:4023080: + text: CL:4023080 + description: stellate L6 intratelencephalic projecting glutamatergic neuron + of the primary motor cortex (Mmus) + meaning: CL:4023080 + CL:0000848: + text: CL:0000848 + description: microvillous olfactory receptor neuron + meaning: CL:0000848 + CL:0004213: + text: CL:0004213 + description: type 3a cone bipolar cell + meaning: CL:0004213 + CL:0000116: + text: CL:0000116 + description: pioneer neuron + meaning: CL:0000116 + CL:4023187: + text: CL:4023187 + description: koniocellular cell + meaning: CL:4023187 + CL:4023116: + text: CL:4023116 + description: type 2 spiral ganglion neuron + meaning: CL:4023116 + CL:0008015: + text: CL:0008015 + description: inhibitory motor neuron + meaning: CL:0008015 + CL:0003048: + text: CL:0003048 + description: L cone cell + meaning: CL:0003048 + CL:1000082: + text: CL:1000082 + description: stretch receptor cell + meaning: CL:1000082 + CL:0003031: + text: CL:0003031 + description: M3-ON retinal ganglion cell + meaning: CL:0003031 + CL:1001474: + text: CL:1001474 + description: medium spiny neuron + meaning: CL:1001474 + CL:0000745: + text: CL:0000745 + description: retina horizontal cell + meaning: CL:0000745 + CL:0002515: + text: CL:0002515 + description: interrenal norepinephrine type cell + meaning: CL:0002515 + CL:2000027: + text: CL:2000027 + description: cerebellum basket cell + meaning: CL:2000027 + CL:0004225: + text: CL:0004225 + description: spider amacrine cell + meaning: CL:0004225 + CL:4023031: + text: CL:4023031 + description: L4 sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023031 + CL:0008038: + text: CL:0008038 + description: alpha motor neuron + meaning: CL:0008038 + CL:4033030: + text: CL:4033030 + description: diffuse bipolar 3b cell + meaning: CL:4033030 + CL:0000336: + text: CL:0000336 + description: adrenal medulla chromaffin cell + meaning: CL:0000336 + CL:0000751: + text: CL:0000751 + description: rod bipolar cell + meaning: CL:0000751 + CL:0008037: + text: CL:0008037 + description: gamma motor neuron + meaning: CL:0008037 + CL:0003028: + text: CL:0003028 + description: M1 retinal ganglion cell + meaning: CL:0003028 + CL:0003016: + text: CL:0003016 + description: G11-OFF retinal ganglion cell + meaning: CL:0003016 + CL:0004239: + text: CL:0004239 + description: wavy bistratified amacrine cell + meaning: CL:0004239 + CL:4023168: + text: CL:4023168 + description: somatosensory neuron + meaning: CL:4023168 + CL:4023018: + text: CL:4023018 + description: pvalb GABAergic cortical interneuron + meaning: CL:4023018 + CL:0004138: + text: CL:0004138 + description: retinal ganglion cell A2 + meaning: CL:0004138 + CL:0000750: + text: CL:0000750 + description: OFF-bipolar cell + meaning: CL:0000750 + CL:0000709: + text: CL:0000709 + description: R8 photoreceptor cell + meaning: CL:0000709 + CL:0004214: + text: CL:0004214 + description: type 3b cone bipolar cell + meaning: CL:0004214 + CL:0003047: + text: CL:0003047 + description: M14 retinal ganglion cell + meaning: CL:0003047 + CL:0015000: + text: CL:0015000 + description: cranial motor neuron + meaning: CL:0015000 + CL:0003036: + text: CL:0003036 + description: M7 retinal ganglion cell + meaning: CL:0003036 + CL:0000397: + text: CL:0000397 + description: ganglion interneuron + meaning: CL:0000397 + CL:1001509: + text: CL:1001509 + description: glycinergic neuron + meaning: CL:1001509 + CL:4023038: + text: CL:4023038 + description: L6b glutamatergic cortical neuron + meaning: CL:4023038 + CL:0000112: + text: CL:0000112 + description: columnar neuron + meaning: CL:0000112 + CL:0002517: + text: CL:0002517 + description: interrenal epinephrin secreting cell + meaning: CL:0002517 + CL:1000383: + text: CL:1000383 + description: type 2 vestibular sensory cell of epithelium of macula of utricle + of membranous labyrinth + meaning: CL:1000383 + CL:0004116: + text: CL:0004116 + description: retinal ganglion cell C + meaning: CL:0004116 + CL:4023113: + text: CL:4023113 + description: bouton vestibular afferent neuron + meaning: CL:4023113 + CL:0003034: + text: CL:0003034 + description: M5 retinal ganglion cell + meaning: CL:0003034 + CL:0011005: + text: CL:0011005 + description: GABAergic interneuron + meaning: CL:0011005 + CL:0011105: + text: CL:0011105 + description: dopamanergic interplexiform cell + meaning: CL:0011105 + CL:0000749: + text: CL:0000749 + description: ON-bipolar cell + meaning: CL:0000749 + CL:0000498: + text: CL:0000498 + description: inhibitory interneuron + meaning: CL:0000498 + CL:4023071: + text: CL:4023071 + description: L5/6 cck cortical GABAergic interneuron (Mmus) + meaning: CL:4023071 + CL:1000245: + text: CL:1000245 + description: posterior lateral line ganglion neuron + meaning: CL:1000245 + CL:0004139: + text: CL:0004139 + description: retinal ganglion cell A2 outer + meaning: CL:0004139 + CL:0000531: + text: CL:0000531 + description: primary sensory neuron (sensu Teleostei) + meaning: CL:0000531 + CL:0004125: + text: CL:0004125 + description: retinal ganglion cell C2 inner + meaning: CL:0004125 + CL:4023064: + text: CL:4023064 + description: caudal ganglionic eminence derived interneuron + meaning: CL:4023064 + CL:4030049: + text: CL:4030049 + description: striosomal D2 medium spiny neuron + meaning: CL:4030049 + CL:0017002: + text: CL:0017002 + description: prostate neuroendocrine cell + meaning: CL:0017002 + CL:0000756: + text: CL:0000756 + description: type 4 cone bipolar cell (sensu Mus) + meaning: CL:0000756 + CL:0000707: + text: CL:0000707 + description: R7 photoreceptor cell + meaning: CL:0000707 + CL:0000700: + text: CL:0000700 + description: dopaminergic neuron + meaning: CL:0000700 + CL:0003002: + text: CL:0003002 + description: G1 retinal ganglion cell + meaning: CL:0003002 + CL:1000001: + text: CL:1000001 + description: retrotrapezoid nucleus neuron + meaning: CL:1000001 + CL:4023007: + text: CL:4023007 + description: L2/3 bipolar vip GABAergic cortical interneuron (Mmus) + meaning: CL:4023007 + CL:0000528: + text: CL:0000528 + description: nitrergic neuron + meaning: CL:0000528 + CL:0000639: + text: CL:0000639 + description: basophil cell of pars distalis of adenohypophysis + meaning: CL:0000639 + CL:0000849: + text: CL:0000849 + description: crypt olfactory receptor neuron + meaning: CL:0000849 + CL:0011110: + text: CL:0011110 + description: histaminergic neuron + meaning: CL:0011110 + CL:0005025: + text: CL:0005025 + description: visceromotor neuron + meaning: CL:0005025 + CL:0003001: + text: CL:0003001 + description: bistratified retinal ganglion cell + meaning: CL:0003001 + CL:0004241: + text: CL:0004241 + description: WF2 amacrine cell + meaning: CL:0004241 + CL:4023019: + text: CL:4023019 + description: L5/6 cck, vip cortical GABAergic interneuron (Mmus) + meaning: CL:4023019 + CL:4023040: + text: CL:4023040 + description: L2/3-6 intratelencephalic projecting glutamatergic cortical neuron + meaning: CL:4023040 + CL:1001435: + text: CL:1001435 + description: periglomerular cell + meaning: CL:1001435 + CL:4023127: + text: CL:4023127 + description: arcuate nucleus of hypothalamus KNDy neuron + meaning: CL:4023127 + CL:0003007: + text: CL:0003007 + description: G4-OFF retinal ganglion cell + meaning: CL:0003007 + CL:0000101: + text: CL:0000101 + description: sensory neuron + meaning: CL:0000101 + CL:2000097: + text: CL:2000097 + description: midbrain dopaminergic neuron + meaning: CL:2000097 + CL:4023095: + text: CL:4023095 + description: untufted pyramidal neuron + meaning: CL:4023095 + CL:0003004: + text: CL:0003004 + description: G3 retinal ganglion cell + meaning: CL:0003004 + CL:0000527: + text: CL:0000527 + description: efferent neuron + meaning: CL:0000527 + CL:1000382: + text: CL:1000382 + description: type 2 vestibular sensory cell of stato-acoustic epithelium + meaning: CL:1000382 + CL:4033019: + text: CL:4033019 + description: ON-blue cone bipolar cell + meaning: CL:4033019 + CL:0000589: + text: CL:0000589 + description: cochlear inner hair cell + meaning: CL:0000589 + CL:4023160: + text: CL:4023160 + description: cartwheel cell + meaning: CL:4023160 + CL:1001437: + text: CL:1001437 + description: hair-down neuron + meaning: CL:1001437 + CL:0011102: + text: CL:0011102 + description: parasympathetic neuron + meaning: CL:0011102 + CL:2000029: + text: CL:2000029 + description: central nervous system neuron + meaning: CL:2000029 + CL:4023115: + text: CL:4023115 + description: type 1 spiral ganglion neuron + meaning: CL:4023115 + CL:0002311: + text: CL:0002311 + description: mammotroph + meaning: CL:0002311 + CL:0003025: + text: CL:0003025 + description: retinal ganglion cell C3 + meaning: CL:0003025 + CL:4030050: + text: CL:4030050 + description: D1/D2-hybrid medium spiny neuron + meaning: CL:4030050 + CL:4023118: + text: CL:4023118 + description: L5/6 non-Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023118 + CL:4023110: + text: CL:4023110 + description: amygdala pyramidal neuron + meaning: CL:4023110 + CL:0002273: + text: CL:0002273 + description: type ECL enteroendocrine cell + meaning: CL:0002273 + CL:0003050: + text: CL:0003050 + description: S cone cell + meaning: CL:0003050 + CL:4023121: + text: CL:4023121 + description: sst chodl GABAergic cortical interneuron + meaning: CL:4023121 + CL:4023020: + text: CL:4023020 + description: dynamic gamma motor neuron + meaning: CL:4023020 + CL:0004246: + text: CL:0004246 + description: monostratified cell + meaning: CL:0004246 + CL:0000495: + text: CL:0000495 + description: blue sensitive photoreceptor cell + meaning: CL:0000495 + CL:0000029: + text: CL:0000029 + description: neural crest derived neuron + meaning: CL:0000029 + CL:0004001: + text: CL:0004001 + description: local interneuron + meaning: CL:0004001 + CL:0000551: + text: CL:0000551 + description: unimodal nocireceptor + meaning: CL:0000551 + CL:0003006: + text: CL:0003006 + description: G4-ON retinal ganglion cell + meaning: CL:0003006 + CL:4023011: + text: CL:4023011 + description: lamp5 GABAergic cortical interneuron + meaning: CL:4023011 + CL:4023109: + text: CL:4023109 + description: vasopressin-secreting magnocellular cell + meaning: CL:4023109 + CL:0000121: + text: CL:0000121 + description: Purkinje cell + meaning: CL:0000121 + CL:0000678: + text: CL:0000678 + description: commissural neuron + meaning: CL:0000678 + CL:0004252: + text: CL:0004252 + description: medium field retinal amacrine cell + meaning: CL:0004252 + CL:0000103: + text: CL:0000103 + description: bipolar neuron + meaning: CL:0000103 + CL:4033036: + text: CL:4033036 + description: OFFx cell + meaning: CL:4033036 + CL:4023014: + text: CL:4023014 + description: L5 vip cortical GABAergic interneuron (Mmus) + meaning: CL:4023014 + CL:0008031: + text: CL:0008031 + description: cortical interneuron + meaning: CL:0008031 + CL:0008010: + text: CL:0008010 + description: cranial somatomotor neuron + meaning: CL:0008010 + CL:0000637: + text: CL:0000637 + description: chromophil cell of anterior pituitary gland + meaning: CL:0000637 + CL:0003014: + text: CL:0003014 + description: G11 retinal ganglion cell + meaning: CL:0003014 + CL:4033029: + text: CL:4033029 + description: diffuse bipolar 3a cell + meaning: CL:4033029 + CL:0002611: + text: CL:0002611 + description: neuron of the dorsal spinal cord + meaning: CL:0002611 + CL:0010010: + text: CL:0010010 + description: cerebellar stellate cell + meaning: CL:0010010 + CL:1000465: + text: CL:1000465 + description: chromaffin cell of ovary + meaning: CL:1000465 + CL:0000761: + text: CL:0000761 + description: type 9 cone bipolar cell (sensu Mus) + meaning: CL:0000761 + CL:0004226: + text: CL:0004226 + description: monostratified amacrine cell + meaning: CL:0004226 + CL:0004253: + text: CL:0004253 + description: wide field retinal amacrine cell + meaning: CL:0004253 + CL:4023075: + text: CL:4023075 + description: L6 tyrosine hydroxylase sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023075 + CL:4023068: + text: CL:4023068 + description: thalamic excitatory neuron + meaning: CL:4023068 + CL:1000377: + text: CL:1000377 + description: dense-core granulated cell of epithelium of trachea + meaning: CL:1000377 + CL:4023089: + text: CL:4023089 + description: nest basket cell + meaning: CL:4023089 + CL:4023189: + text: CL:4023189 + description: parasol ganglion cell of retina + meaning: CL:4023189 + CL:0000856: + text: CL:0000856 + description: neuromast hair cell + meaning: CL:0000856 + CL:4023025: + text: CL:4023025 + description: long-range projecting sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023025 + CL:0003043: + text: CL:0003043 + description: M10 retinal ganglion cell + meaning: CL:0003043 + CL:4023000: + text: CL:4023000 + description: beta motor neuron + meaning: CL:4023000 + CL:4023048: + text: CL:4023048 + description: L4/5 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023048 + CL:0000855: + text: CL:0000855 + description: sensory hair cell + meaning: CL:0000855 + CL:4023070: + text: CL:4023070 + description: caudal ganglionic eminence derived GABAergic cortical interneuron + meaning: CL:4023070 + CL:0002070: + text: CL:0002070 + description: type I vestibular sensory cell + meaning: CL:0002070 + CL:2000028: + text: CL:2000028 + description: cerebellum glutamatergic neuron + meaning: CL:2000028 + CL:0000533: + text: CL:0000533 + description: primary motor neuron (sensu Teleostei) + meaning: CL:0000533 + CL:4023083: + text: CL:4023083 + description: chandelier cell + meaning: CL:4023083 + CL:2000034: + text: CL:2000034 + description: anterior lateral line neuromast hair cell + meaning: CL:2000034 + CL:0003015: + text: CL:0003015 + description: G11-ON retinal ganglion cell + meaning: CL:0003015 + CL:0000204: + text: CL:0000204 + description: acceleration receptive cell + meaning: CL:0000204 + CL:4033031: + text: CL:4033031 + description: diffuse bipolar 4 cell + meaning: CL:4033031 + CL:0003024: + text: CL:0003024 + description: retinal ganglion cell C inner + meaning: CL:0003024 + CL:4023074: + text: CL:4023074 + description: mammillary body neuron + meaning: CL:4023074 + CL:2000089: + text: CL:2000089 + description: dentate gyrus granule cell + meaning: CL:2000089 + CL:4033028: + text: CL:4033028 + description: diffuse bipolar 2 cell + meaning: CL:4033028 + CL:0000110: + text: CL:0000110 + description: peptidergic neuron + meaning: CL:0000110 + CL:4033002: + text: CL:4033002 + description: neuroendocrine cell of epithelium of crypt of Lieberkuhn + meaning: CL:4033002 + CL:4033027: + text: CL:4033027 + description: diffuse bipolar 1 cell + meaning: CL:4033027 + CL:3000003: + text: CL:3000003 + description: sympathetic cholinergic neuron + meaning: CL:3000003 + CL:4023158: + text: CL:4023158 + description: octopus cell of the mammalian cochlear nucleus + meaning: CL:4023158 + CL:0000118: + text: CL:0000118 + description: basket cell + meaning: CL:0000118 + CL:0004223: + text: CL:0004223 + description: AB diffuse-1 amacrine cell + meaning: CL:0004223 + CL:4030054: + text: CL:4030054 + description: RXFP1-positive interface island D1-medium spiny neuron + meaning: CL:4030054 + CL:0002610: + text: CL:0002610 + description: raphe nuclei neuron + meaning: CL:0002610 + CL:4023026: + text: CL:4023026 + description: direct pathway medium spiny neuron + meaning: CL:4023026 + CL:4023016: + text: CL:4023016 + description: vip GABAergic cortical interneuron + meaning: CL:4023016 + CL:0004237: + text: CL:0004237 + description: fountain amacrine cell + meaning: CL:0004237 + CL:0003035: + text: CL:0003035 + description: M6 retinal ganglion cell + meaning: CL:0003035 + CL:1001611: + text: CL:1001611 + description: cerebellar neuron + meaning: CL:1001611 + CL:0000591: + text: CL:0000591 + description: warmth sensing thermoreceptor cell + meaning: CL:0000591 + CL:0002613: + text: CL:0002613 + description: striatum neuron + meaning: CL:0002613 + CL:0000496: + text: CL:0000496 + description: green sensitive photoreceptor cell + meaning: CL:0000496 + CL:0007011: + text: CL:0007011 + description: enteric neuron + meaning: CL:0007011 + CL:2000056: + text: CL:2000056 + description: Meynert cell + meaning: CL:2000056 + CL:0003040: + text: CL:0003040 + description: M9 retinal ganglion cell + meaning: CL:0003040 + CL:0004250: + text: CL:0004250 + description: bistratified retinal amacrine cell + meaning: CL:0004250 + CL:0003029: + text: CL:0003029 + description: M2 retinal ganglion cell + meaning: CL:0003029 + CL:4023017: + text: CL:4023017 + description: sst GABAergic cortical interneuron + meaning: CL:4023017 + CL:0008028: + text: CL:0008028 + description: visual system neuron + meaning: CL:0008028 + CL:0008039: + text: CL:0008039 + description: lower motor neuron + meaning: CL:0008039 + CL:2000086: + text: CL:2000086 + description: neocortex basket cell + meaning: CL:2000086 + CL:4023023: + text: CL:4023023 + description: L5,6 neurogliaform lamp5 GABAergic cortical interneuron (Mmus) + meaning: CL:4023023 + CL:0000697: + text: CL:0000697 + description: R4 photoreceptor cell + meaning: CL:0000697 + CL:2000088: + text: CL:2000088 + description: Ammon's horn basket cell + meaning: CL:2000088 + CL:0004232: + text: CL:0004232 + description: starburst amacrine cell + meaning: CL:0004232 + CL:4023041: + text: CL:4023041 + description: L5 extratelencephalic projecting glutamatergic cortical neuron + meaning: CL:4023041 + CL:0004121: + text: CL:0004121 + description: retinal ganglion cell B2 + meaning: CL:0004121 + CL:0000748: + text: CL:0000748 + description: retinal bipolar neuron + meaning: CL:0000748 + CL:4023164: + text: CL:4023164 + description: globular bushy cell + meaning: CL:4023164 + CL:0000536: + text: CL:0000536 + description: secondary motor neuron (sensu Teleostei) + meaning: CL:0000536 + CL:1000466: + text: CL:1000466 + description: chromaffin cell of right ovary + meaning: CL:1000466 + CL:0011001: + text: CL:0011001 + description: spinal cord motor neuron + meaning: CL:0011001 + CL:0000755: + text: CL:0000755 + description: type 3 cone bipolar cell (sensu Mus) + meaning: CL:0000755 + CL:0004238: + text: CL:0004238 + description: asymmetric bistratified amacrine cell + meaning: CL:0004238 + CL:0004161: + text: CL:0004161 + description: 510 nm-cone + meaning: CL:0004161 + CL:0000198: + text: CL:0000198 + description: pain receptor cell + meaning: CL:0000198 + CL:0003038: + text: CL:0003038 + description: M7-OFF retinal ganglion cell + meaning: CL:0003038 + CL:0003033: + text: CL:0003033 + description: M4 retinal ganglion cell + meaning: CL:0003033 + CL:0012001: + text: CL:0012001 + description: neuron of the forebrain + meaning: CL:0012001 + CL:0011104: + text: CL:0011104 + description: interplexiform cell + meaning: CL:0011104 + CL:0003049: + text: CL:0003049 + description: M cone cell + meaning: CL:0003049 + CL:2000032: + text: CL:2000032 + description: peripheral nervous system neuron + meaning: CL:2000032 + CL:0011100: + text: CL:0011100 + description: galanergic neuron + meaning: CL:0011100 + CL:0008025: + text: CL:0008025 + description: noradrenergic neuron + meaning: CL:0008025 + CL:0000122: + text: CL:0000122 + description: stellate neuron + meaning: CL:0000122 + CL:0003005: + text: CL:0003005 + description: G4 retinal ganglion cell + meaning: CL:0003005 + CL:0000699: + text: CL:0000699 + description: paraganglial type 1 cell + meaning: CL:0000699 + CL:4033050: + text: CL:4033050 + description: catecholaminergic neuron + meaning: CL:4033050 + CL:1001502: + text: CL:1001502 + description: mitral cell + meaning: CL:1001502 + CL:0002069: + text: CL:0002069 + description: type II vestibular sensory cell + meaning: CL:0002069 + CL:4023065: + text: CL:4023065 + description: meis2 expressing cortical GABAergic cell + meaning: CL:4023065 + CL:4023077: + text: CL:4023077 + description: bitufted neuron + meaning: CL:4023077 + CL:0000847: + text: CL:0000847 + description: ciliated olfactory receptor neuron + meaning: CL:0000847 + CL:4023188: + text: CL:4023188 + description: midget ganglion cell of retina + meaning: CL:4023188 + CL:2000090: + text: CL:2000090 + description: dentate gyrus of hippocampal formation stellate cell + meaning: CL:2000090 + CL:0000568: + text: CL:0000568 + description: amine precursor uptake and decarboxylation cell + meaning: CL:0000568 + CL:1000426: + text: CL:1000426 + description: chromaffin cell of adrenal gland + meaning: CL:1000426 + CL:0000100: + text: CL:0000100 + description: motor neuron + meaning: CL:0000100 + CL:0011109: + text: CL:0011109 + description: hypocretin-secreting neuron + meaning: CL:0011109 + CL:4023171: + text: CL:4023171 + description: trigeminal motor neuron + meaning: CL:4023171 + CL:1001434: + text: CL:1001434 + description: olfactory bulb interneuron + meaning: CL:1001434 + CL:0000494: + text: CL:0000494 + description: UV sensitive photoreceptor cell + meaning: CL:0000494 + CL:0004117: + text: CL:0004117 + description: retinal ganglion cell A + meaning: CL:0004117 + CL:0000205: + text: CL:0000205 + description: thermoreceptor cell + meaning: CL:0000205 + CL:0004217: + text: CL:0004217 + description: H1 horizontal cell + meaning: CL:0004217 + CL:0000200: + text: CL:0000200 + description: touch receptor cell + meaning: CL:0000200 + CL:4023111: + text: CL:4023111 + description: cerebral cortex pyramidal neuron + meaning: CL:4023111 + CL:4032001: + text: CL:4032001 + description: reelin GABAergic cortical interneuron + meaning: CL:4032001 + CL:4023076: + text: CL:4023076 + description: Martinotti neuron + meaning: CL:4023076 + CL:0000753: + text: CL:0000753 + description: type 1 cone bipolar cell (sensu Mus) + meaning: CL:0000753 + CL:1001451: + text: CL:1001451 + description: sensory neuron of dorsal root ganglion + meaning: CL:1001451 + CL:4023021: + text: CL:4023021 + description: static gamma motor neuron + meaning: CL:4023021 + CL:0002066: + text: CL:0002066 + description: Feyrter cell + meaning: CL:0002066 + CL:0000598: + text: CL:0000598 + description: pyramidal neuron + meaning: CL:0000598 + CL:0000702: + text: CL:0000702 + description: R5 photoreceptor cell + meaning: CL:0000702 + CL:0008049: + text: CL:0008049 + description: Betz cell + meaning: CL:0008049 + CL:0001033: + text: CL:0001033 + description: hippocampal granule cell + meaning: CL:0001033 + CL:0000587: + text: CL:0000587 + description: cold sensing thermoreceptor cell + meaning: CL:0000587 + CL:4023161: + text: CL:4023161 + description: unipolar brush cell + meaning: CL:4023161 + CL:2000031: + text: CL:2000031 + description: lateral line ganglion neuron + meaning: CL:2000031 + CL:4023119: + text: CL:4023119 + description: displaced amacrine cell + meaning: CL:4023119 + CL:1001569: + text: CL:1001569 + description: hippocampal interneuron + meaning: CL:1001569 + CL:4023130: + text: CL:4023130 + description: kisspeptin neuron + meaning: CL:4023130 + CL:4023090: + text: CL:4023090 + description: small basket cell + meaning: CL:4023090 + CL:4023033: + text: CL:4023033 + description: OFF retinal ganglion cell + meaning: CL:4023033 + CL:4023112: + text: CL:4023112 + description: vestibular afferent neuron + meaning: CL:4023112 + CL:0004234: + text: CL:0004234 + description: diffuse multistratified amacrine cell + meaning: CL:0004234 + CL:0002082: + text: CL:0002082 + description: type II cell of adrenal medulla + meaning: CL:0002082 + CL:0010011: + text: CL:0010011 + description: cerebral cortex GABAergic interneuron + meaning: CL:0010011 + CL:4030052: + text: CL:4030052 + description: nucleus accumbens shell and olfactory tubercle D2 medium spiny + neuron + meaning: CL:4030052 + CL:0000604: + text: CL:0000604 + description: retinal rod cell + meaning: CL:0000604 + CL:4030027: + text: CL:4030027 + description: GABAergic amacrine cell + meaning: CL:4030027 + CL:1001561: + text: CL:1001561 + description: vomeronasal sensory neuron + meaning: CL:1001561 + CL:0000210: + text: CL:0000210 + description: photoreceptor cell + meaning: CL:0000210 + CL:4023012: + text: CL:4023012 + description: near-projecting glutamatergic cortical neuron + meaning: CL:4023012 + CL:4023087: + text: CL:4023087 + description: fan Martinotti neuron + meaning: CL:4023087 + CL:0000028: + text: CL:0000028 + description: CNS neuron (sensu Nematoda and Protostomia) + meaning: CL:0000028 + CL:0000006: + text: CL:0000006 + description: neuronal receptor cell + meaning: CL:0000006 + CL:0004247: + text: CL:0004247 + description: bistratified cell + meaning: CL:0004247 + CL:0010012: + text: CL:0010012 + description: cerebral cortex neuron + meaning: CL:0010012 + CL:0004245: + text: CL:0004245 + description: indoleamine-accumulating amacrine cell + meaning: CL:0004245 + CL:0004224: + text: CL:0004224 + description: AB diffuse-2 amacrine cell + meaning: CL:0004224 + CL:0003009: + text: CL:0003009 + description: G6 retinal ganglion cell + meaning: CL:0003009 + CL:0000679: + text: CL:0000679 + description: glutamatergic neuron + meaning: CL:0000679 + CL:0000166: + text: CL:0000166 + description: chromaffin cell + meaning: CL:0000166 + CL:4023088: + text: CL:4023088 + description: large basket cell + meaning: CL:4023088 + CL:4030057: + text: CL:4030057 + description: eccentric medium spiny neuron + meaning: CL:4030057 + CL:4023024: + text: CL:4023024 + description: neurogliaform lamp5 GABAergic cortical interneuron (Mmus) + meaning: CL:4023024 + CL:0005024: + text: CL:0005024 + description: somatomotor neuron + meaning: CL:0005024 + CL:4023049: + text: CL:4023049 + description: L5 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023049 + CL:0000573: + text: CL:0000573 + description: retinal cone cell + meaning: CL:0000573 + CL:4023123: + text: CL:4023123 + description: hypothalamus kisspeptin neuron + meaning: CL:4023123 + CL:0000376: + text: CL:0000376 + description: humidity receptor cell + meaning: CL:0000376 + CL:0004235: + text: CL:0004235 + description: AB broad diffuse-1 amacrine cell + meaning: CL:0004235 + CL:0000106: + text: CL:0000106 + description: unipolar neuron + meaning: CL:0000106 + CL:0001032: + text: CL:0001032 + description: cortical granule cell + meaning: CL:0001032 + CL:0000561: + text: CL:0000561 + description: amacrine cell + meaning: CL:0000561 + CL:4023093: + text: CL:4023093 + description: stellate pyramidal neuron + meaning: CL:4023093 + CL:0000247: + text: CL:0000247 + description: Rohon-Beard neuron + meaning: CL:0000247 + CL:0003008: + text: CL:0003008 + description: G5 retinal ganglion cell + meaning: CL:0003008 + CL:0000203: + text: CL:0000203 + description: gravity sensitive cell + meaning: CL:0000203 + CL:0003037: + text: CL:0003037 + description: M7-ON retinal ganglion cell + meaning: CL:0003037 + CL:0004221: + text: CL:0004221 + description: flag A amacrine cell + meaning: CL:0004221 + CL:0000638: + text: CL:0000638 + description: acidophil cell of pars distalis of adenohypophysis + meaning: CL:0000638 + CL:0004229: + text: CL:0004229 + description: A2-like amacrine cell + meaning: CL:0004229 + CL:4023120: + text: CL:4023120 + description: cochlea auditory hair cell + meaning: CL:4023120 + CL:0008032: + text: CL:0008032 + description: rosehip neuron + meaning: CL:0008032 + CL:0008027: + text: CL:0008027 + description: rod bipolar cell (sensu Mus) + meaning: CL:0008027 + CL:0000497: + text: CL:0000497 + description: red sensitive photoreceptor cell + meaning: CL:0000497 + CL:4023062: + text: CL:4023062 + description: dentate gyrus neuron + meaning: CL:4023062 + CL:0002516: + text: CL:0002516 + description: interrenal chromaffin cell + meaning: CL:0002516 + CL:0004119: + text: CL:0004119 + description: retinal ganglion cell B1 + meaning: CL:0004119 + CL:4030039: + text: CL:4030039 + description: von Economo neuron + meaning: CL:4030039 + CL:4023036: + text: CL:4023036 + description: chandelier pvalb GABAergic cortical interneuron + meaning: CL:4023036 + CL:0000117: + text: CL:0000117 + description: CNS neuron (sensu Vertebrata) + meaning: CL:0000117 + CL:4023015: + text: CL:4023015 + description: sncg GABAergic cortical interneuron + meaning: CL:4023015 + CL:4033033: + text: CL:4033033 + description: flat midget bipolar cell + meaning: CL:4033033 + CL:0000626: + text: CL:0000626 + description: olfactory granule cell + meaning: CL:0000626 + CL:0004218: + text: CL:0004218 + description: H2 horizontal cell + meaning: CL:0004218 + CL:0004233: + text: CL:0004233 + description: DAPI-3 amacrine cell + meaning: CL:0004233 + CL:0003021: + text: CL:0003021 + description: retinal ganglion cell C4 + meaning: CL:0003021 + CL:0000489: + text: CL:0000489 + description: scotopic photoreceptor cell + meaning: CL:0000489 + CL:4023159: + text: CL:4023159 + description: double bouquet cell + meaning: CL:4023159 + CL:0002612: + text: CL:0002612 + description: neuron of the ventral spinal cord + meaning: CL:0002612 + CL:0000476: + text: CL:0000476 + description: thyrotroph + meaning: CL:0000476 + CL:4033034: + text: CL:4033034 + description: invaginating midget bipolar cell + meaning: CL:4033034 + CL:4023029: + text: CL:4023029 + description: indirect pathway medium spiny neuron + meaning: CL:4023029 + CL:0004236: + text: CL:0004236 + description: AB broad diffuse-2 amacrine cell + meaning: CL:0004236 + CL:0003017: + text: CL:0003017 + description: retinal ganglion cell B3 outer + meaning: CL:0003017 + CL:0000759: + text: CL:0000759 + description: type 7 cone bipolar cell (sensu Mus) + meaning: CL:0000759 + CL:0000740: + text: CL:0000740 + description: retinal ganglion cell + meaning: CL:0000740 + CL:0004120: + text: CL:0004120 + description: retinal ganglion cell A1 + meaning: CL:0004120 + CL:3000002: + text: CL:3000002 + description: sympathetic noradrenergic neuron + meaning: CL:3000002 + CL:0003023: + text: CL:0003023 + description: retinal ganglion cell C6 + meaning: CL:0003023 + CL:0000690: + text: CL:0000690 + description: R2 photoreceptor cell + meaning: CL:0000690 + CL:4023047: + text: CL:4023047 + description: L2/3 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023047 + CL:4023022: + text: CL:4023022 + description: canopy lamp5 GABAergic cortical interneuron (Mmus) + meaning: CL:4023022 + CL:4023060: + text: CL:4023060 + description: hippocampal CA1-3 neuron + meaning: CL:4023060 + CL:0000758: + text: CL:0000758 + description: type 6 cone bipolar cell (sensu Mus) + meaning: CL:0000758 + CL:0000535: + text: CL:0000535 + description: secondary neuron (sensu Teleostei) + meaning: CL:0000535 + CL:4023055: + text: CL:4023055 + description: corticothalamic VAL/VM projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023055 + CL:1000467: + text: CL:1000467 + description: chromaffin cell of left ovary + meaning: CL:1000467 + CL:0011002: + text: CL:0011002 + description: lateral motor column neuron + meaning: CL:0011002 + CL:0004244: + text: CL:0004244 + description: WF4 amacrine cell + meaning: CL:0004244 + CL:1000223: + text: CL:1000223 + description: lung neuroendocrine cell + meaning: CL:1000223 + CL:1000385: + text: CL:1000385 + description: type 2 vestibular sensory cell of epithelium of crista of ampulla + of semicircular duct of membranous labyrinth + meaning: CL:1000385 + CL:0000691: + text: CL:0000691 + description: stellate interneuron + meaning: CL:0000691 + CL:4023008: + text: CL:4023008 + description: intratelencephalic-projecting glutamatergic cortical neuron + meaning: CL:4023008 + CL:4023044: + text: CL:4023044 + description: non-medulla, extratelencephalic-projecting glutamatergic neuron + of the primary motor cortex + meaning: CL:4023044 + CL:0000850: + text: CL:0000850 + description: serotonergic neuron + meaning: CL:0000850 + CL:0000695: + text: CL:0000695 + description: Cajal-Retzius cell + meaning: CL:0000695 + CL:0003051: + text: CL:0003051 + description: UV cone cell + meaning: CL:0003051 + CL:0000402: + text: CL:0000402 + description: CNS interneuron + meaning: CL:0000402 + CL:0005023: + text: CL:0005023 + description: branchiomotor neuron + meaning: CL:0005023 + CL:4023043: + text: CL:4023043 + description: L5/6 near-projecting glutamatergic neuron of the primary motor + cortex + meaning: CL:4023043 + CL:0004162: + text: CL:0004162 + description: 360 nm-cone + meaning: CL:0004162 + CL:0011003: + text: CL:0011003 + description: magnocellular neurosecretory cell + meaning: CL:0011003 + CL:0004230: + text: CL:0004230 + description: diffuse bistratified amacrine cell + meaning: CL:0004230 + CL:1001505: + text: CL:1001505 + description: parvocellular neurosecretory cell + meaning: CL:1001505 + CL:0011106: + text: CL:0011106 + description: GABAnergic interplexiform cell + meaning: CL:0011106 + CL:0000437: + text: CL:0000437 + description: gonadtroph + meaning: CL:0000437 + CL:4023010: + text: CL:4023010 + description: alpha7 GABAergic cortical interneuron (Mmus) + meaning: CL:4023010 + CL:4023046: + text: CL:4023046 + description: L6b subplate glutamatergic neuron of the primary motor cortex + meaning: CL:4023046 + CL:0000109: + text: CL:0000109 + description: adrenergic neuron + meaning: CL:0000109 + CL:0011000: + text: CL:0011000 + description: dorsal horn interneuron + meaning: CL:0011000 + CL:0000251: + text: CL:0000251 + description: extramedullary cell + meaning: CL:0000251 + CL:0003044: + text: CL:0003044 + description: M11 retinal ganglion cell + meaning: CL:0003044 + CL:4023053: + text: CL:4023053 + description: spinal interneuron synapsing Betz cell + meaning: CL:4023053 + CL:1000378: + text: CL:1000378 + description: type 1 vestibular sensory cell of stato-acoustic epithelium + meaning: CL:1000378 + CL:4023124: + text: CL:4023124 + description: dentate gyrus kisspeptin neuron + meaning: CL:4023124 + CL:1000427: + text: CL:1000427 + description: adrenal cortex chromaffin cell + meaning: CL:1000427 + CL:0000207: + text: CL:0000207 + description: olfactory receptor cell + meaning: CL:0000207 + CL:4023162: + text: CL:4023162 + description: bushy cell + meaning: CL:4023162 + CL:2000019: + text: CL:2000019 + description: compound eye photoreceptor cell + meaning: CL:2000019 + CL:4023086: + text: CL:4023086 + description: T Martinotti neuron + meaning: CL:4023086 + CL:0003012: + text: CL:0003012 + description: G9 retinal ganglion cell + meaning: CL:0003012 + CL:0002270: + text: CL:0002270 + description: type EC2 enteroendocrine cell + meaning: CL:0002270 + CL:2000024: + text: CL:2000024 + description: spinal cord medial motor column neuron + meaning: CL:2000024 + CL:0003022: + text: CL:0003022 + description: retinal ganglion cell C5 + meaning: CL:0003022 + CL:0000104: + text: CL:0000104 + description: multipolar neuron + meaning: CL:0000104 + CL:4023050: + text: CL:4023050 + description: L6 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023050 + CL:4023030: + text: CL:4023030 + description: L2/3/5 fan Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023030 + CL:0000741: + text: CL:0000741 + description: spinal accessory motor neuron + meaning: CL:0000741 + CL:4033010: + text: CL:4033010 + description: neuroendocrine cell of epithelium of lobar bronchus + meaning: CL:4033010 + CL:1000425: + text: CL:1000425 + description: chromaffin cell of paraganglion + meaning: CL:1000425 + CL:4030051: + text: CL:4030051 + description: nucleus accumbens shell and olfactory tubercle D1 medium spiny + neuron + meaning: CL:4030051 + CL:0000567: + text: CL:0000567 + description: polymodal nocireceptor + meaning: CL:0000567 + CL:0004215: + text: CL:0004215 + description: type 5a cone bipolar cell + meaning: CL:0004215 + CL:0003032: + text: CL:0003032 + description: M3-OFF retinal ganglion cell + meaning: CL:0003032 + CL:4023079: + text: CL:4023079 + description: midbrain-derived inhibitory neuron + meaning: CL:4023079 + CL:0000099: + text: CL:0000099 + description: interneuron + meaning: CL:0000099 + CL:0000253: + text: CL:0000253 + description: eurydendroid cell + meaning: CL:0000253 + CL:0008013: + text: CL:0008013 + description: cranial visceromotor neuron + meaning: CL:0008013 + CL:0005000: + text: CL:0005000 + description: spinal cord interneuron + meaning: CL:0005000 + CL:0004222: + text: CL:0004222 + description: flag B amacrine cell + meaning: CL:0004222 + CL:0000617: + text: CL:0000617 + description: GABAergic neuron + meaning: CL:0000617 + CL:0003010: + text: CL:0003010 + description: G7 retinal ganglion cell + meaning: CL:0003010 + CL:0000577: + text: CL:0000577 + description: type EC enteroendocrine cell + meaning: CL:0000577 + CL:0003018: + text: CL:0003018 + description: retinal ganglion cell B3 inner + meaning: CL:0003018 + CL:0002083: + text: CL:0002083 + description: type I cell of adrenal medulla + meaning: CL:0002083 + CL:4023081: + text: CL:4023081 + description: inverted L6 intratelencephalic projecting glutamatergic neuron + of the primary motor cortex (Mmus) + meaning: CL:4023081 + CL:0004251: + text: CL:0004251 + description: narrow field retinal amacrine cell + meaning: CL:0004251 + CL:4023092: + text: CL:4023092 + description: inverted pyramidal neuron + meaning: CL:4023092 + CL:0002608: + text: CL:0002608 + description: hippocampal neuron + meaning: CL:0002608 + CL:0008048: + text: CL:0008048 + description: upper motor neuron + meaning: CL:0008048 + CL:0011113: + text: CL:0011113 + description: spiral ganglion neuron + meaning: CL:0011113 + CL:0000601: + text: CL:0000601 + description: cochlear outer hair cell + meaning: CL:0000601 + CL:0003041: + text: CL:0003041 + description: M9-ON retinal ganglion cell + meaning: CL:0003041 + CL:4023042: + text: CL:4023042 + description: L6 corticothalamic-projecting glutamatergic cortical neuron + meaning: CL:4023042 + CL:0000199: + text: CL:0000199 + description: mechanoreceptor cell + meaning: CL:0000199 + CL:1001571: + text: CL:1001571 + description: hippocampal pyramidal neuron + meaning: CL:1001571 + CL:2000048: + text: CL:2000048 + description: anterior horn motor neuron + meaning: CL:2000048 + CL:4023170: + text: CL:4023170 + description: trigeminal sensory neuron + meaning: CL:4023170 + CL:0002614: + text: CL:0002614 + description: neuron of the substantia nigra + meaning: CL:0002614 diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 36ec5942a..33bd01aff 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -61,4 +61,4 @@ def test_view_set_sheets(self): def test_enum_expander(self): termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) self.assertEqual(len(termset.view_set), 502) - remove_test_file('./expanded_term_set.yaml') + remove_test_file('./expanded_dynamic_term_set.yaml') diff --git a/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml b/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml new file mode 100644 index 000000000..72bade0d0 --- /dev/null +++ b/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml @@ -0,0 +1,52 @@ +classes: + BrainSample: + slot_usage: + cell_type: {} + slots: + - cell_type +default_prefix: TEMP +default_range: string +description: this schema demonstrates the use of static enums +enums: + NeuronOrGlialCellTypeEnum: + description: Enumeration to capture various cell types found in the brain. + permissible_values: + ASTROCYTE: + description: Characteristic star-shaped glial cells in the brain and spinal + cord. + meaning: CL:0000127 + INTERNEURON: + description: Neurons whose axons (and dendrites) are limited to a single brain + area. + meaning: CL:0000099 + MICROGLIAL_CELL: + description: Microglia are the resident immune cells of the brain and constantly + patrol the cerebral microenvironment to respond to pathogens and damage. + meaning: CL:0000129 + MOTOR_NEURON: + description: Neurons whose cell body is located in the motor cortex, brainstem + or the spinal cord, and whose axon (fiber) projects to the spinal cord or + outside of the spinal cord to directly or indirectly control effector organs, + mainly muscles and glands. + meaning: CL:0000100 + OLIGODENDROCYTE: + description: Type of neuroglia whose main functions are to provide support + and insulation to axons within the central nervous system (CNS) of jawed + vertebrates. + meaning: CL:0000128 + PYRAMIDAL_NEURON: + description: Neurons with a pyramidal shaped cell body (soma) and two distinct + dendritic trees. + meaning: CL:0000598 +id: https://w3id.org/linkml/examples/nwb_static_enums +imports: +- linkml:types +name: nwb_static_enums +prefixes: + CL: http://purl.obolibrary.org/obo/cl.owl + TEMP: https://example.org/TEMP/ + linkml: https://w3id.org/linkml/ +slots: + cell_type: + required: true +title: static enums example From 907433a2d0ad073683f65e09c9ed92906e71737f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 15:10:45 +0000 Subject: [PATCH 18/78] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/unit/example_dynamic_term_set.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/example_dynamic_term_set.yaml b/tests/unit/example_dynamic_term_set.yaml index a438ba762..0ca8c91d2 100644 --- a/tests/unit/example_dynamic_term_set.yaml +++ b/tests/unit/example_dynamic_term_set.yaml @@ -40,4 +40,3 @@ enums: include_self: false relationship_types: - rdfs:subClassOf - From b33105becbaa22b64547623587c9950d6097ea67 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 11:16:17 -0400 Subject: [PATCH 19/78] test --- src/hdmf/term_set.py | 2 +- ...m_set.yaml.yaml => expanded_example_dynamic_term_set.yaml} | 0 tests/unit/test_term_set.py | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) rename tests/unit/{expanded_example_dynamic_term_set.yaml.yaml => expanded_example_dynamic_term_set.yaml} (100%) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index c100aae6e..614e13fa4 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -131,7 +131,7 @@ def __enum_expander(self): enum = list(self.view.all_enums()) schema_dir = os.path.dirname(self.term_schema_path) file_name = os.path.basename(self.term_schema_path) - output_path = os.path.join(schema_dir, "expanded_"+file_name+".yaml") + output_path = os.path.join(schema_dir, "expanded_"+file_name) expander.expand_in_place(self.term_schema_path, enum, output_path) return output_path diff --git a/tests/unit/expanded_example_dynamic_term_set.yaml.yaml b/tests/unit/expanded_example_dynamic_term_set.yaml similarity index 100% rename from tests/unit/expanded_example_dynamic_term_set.yaml.yaml rename to tests/unit/expanded_example_dynamic_term_set.yaml diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 33bd01aff..6e815dc40 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -50,6 +50,8 @@ def test_get_item_key_error(self): with self.assertRaises(ValueError): termset['Homo Ssapiens'] + @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") @@ -61,4 +63,4 @@ def test_view_set_sheets(self): def test_enum_expander(self): termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) self.assertEqual(len(termset.view_set), 502) - remove_test_file('./expanded_dynamic_term_set.yaml') + remove_test_file('./expanded_example_dynamic_term_set.yaml') From ede2e7a63c6dc941e0e5b80f49c05e9c6f97c8c0 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Fri, 28 Jul 2023 10:05:23 -0700 Subject: [PATCH 20/78] correct prefix for cell ontology --- tests/unit/example_dynamic_term_set.yaml | 2 +- tests/unit/test_term_set_input/schemasheets/prefixes.tsv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/example_dynamic_term_set.yaml b/tests/unit/example_dynamic_term_set.yaml index 0ca8c91d2..e09c87fa9 100644 --- a/tests/unit/example_dynamic_term_set.yaml +++ b/tests/unit/example_dynamic_term_set.yaml @@ -5,7 +5,7 @@ description: this schema demonstrates the use of dynamic enums prefixes: linkml: https://w3id.org/linkml/ - CL: http://purl.obolibrary.org/obo/cl.owl + CL: http://purl.obolibrary.org/obo/CL_ imports: - linkml:types diff --git a/tests/unit/test_term_set_input/schemasheets/prefixes.tsv b/tests/unit/test_term_set_input/schemasheets/prefixes.tsv index b7b4f3376..d06522ebd 100644 --- a/tests/unit/test_term_set_input/schemasheets/prefixes.tsv +++ b/tests/unit/test_term_set_input/schemasheets/prefixes.tsv @@ -1,4 +1,4 @@ prefix URI > prefix prefix_reference linkml https://w3id.org/linkml/ -CL http://purl.obolibrary.org/obo/cl.owl +CL http://purl.obolibrary.org/obo/CL_ From 74ac932504382922263c4b938cc976460879e130 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 13:20:47 -0400 Subject: [PATCH 21/78] test skips/pyproject --- pyproject.toml | 7 +++-- requirements-opt.txt | 5 +++- src/hdmf/term_set.py | 14 ++++++---- .../expanded_example_dynamic_term_set.yaml | 1 - tests/unit/test_term_set.py | 28 +++++++++---------- 5 files changed, 31 insertions(+), 24 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 534c10c7f..7a9741ba2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,9 +42,10 @@ dynamic = ["version"] [project.optional-dependencies] zarr = ["zarr>=2.12.0"] tqdm = ["tqdm>=4.41.0"] -linkml = ["linkml-runtime>=1.5.0"] -schemasheets = ["schemasheets>=0.1.23"] -oaklib = ["oaklib>=0.5.12"] +termset_reqs = ["linkml-runtime>=1.5.0", + "schemasheets>=0.1.23", + "oaklib>=0.5.12", + "yaml"] [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf" diff --git a/requirements-opt.txt b/requirements-opt.txt index 56e24a6a8..f071e399a 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -1,4 +1,7 @@ # pinned dependencies that are optional. used to reproduce an entire development environment to use HDMF tqdm==4.65.0 zarr==2.14.2 -linkml-runtime==1.5.0 +linkml-runtime>=1.5.0 +schemasheets>=0.1.23 +oaklib>=0.5.12 +yaml diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 614e13fa4..28bb2bb96 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -3,11 +3,6 @@ import os from collections import namedtuple from .utils import docval -from linkml_runtime.utils.schemaview import SchemaView -from linkml_runtime.utils.schema_as_dict import schema_as_dict -from schemasheets.schemamaker import SchemaMaker -from oaklib.utilities.subsets.value_set_expander import ValueSetExpander - class TermSet(): @@ -27,6 +22,15 @@ def __init__(self, """ :param term_schema_path: The path to LinkML YAML enumeration schema """ + try: + from linkml_runtime.utils.schemaview import SchemaView + from linkml_runtime.utils.schema_as_dict import schema_as_dict + from schemasheets.schemamaker import SchemaMaker + from oaklib.utilities.subsets.value_set_expander import ValueSetExpander + except ImportError: + msg = "Install TermSet requirements in pyproject.toml" + raise ValueError(msg) + self.term_schema_path = term_schema_path self.schemasheets_folder = schemasheets_folder diff --git a/tests/unit/expanded_example_dynamic_term_set.yaml b/tests/unit/expanded_example_dynamic_term_set.yaml index e89b1c110..dc1674df1 100644 --- a/tests/unit/expanded_example_dynamic_term_set.yaml +++ b/tests/unit/expanded_example_dynamic_term_set.yaml @@ -40,7 +40,6 @@ enums: include_self: false relationship_types: - rdfs:subClassOf - permissible_values: CL:0000705: text: CL:0000705 diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 6e815dc40..a6ed53f4b 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -7,60 +7,60 @@ CUR_DIR = os.path.dirname(os.path.realpath(__file__)) - try: import linkml_runtime # noqa: F401 - LINKML_INSTALLED = True + import schemasheets + import oaklib + + REQUIREMENTS_INSTALLED = TRUE except ImportError: - LINKML_INSTALLED = False + REQUIREMENTS_INSTALLED = False class TestTermSet(TestCase): - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_termset_setup(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') self.assertEqual(list(termset.sources), ['NCBI_TAXON']) - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_view_set(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] self.assertEqual(list(termset.view_set), expected) - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_termset_validate(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') self.assertEqual(termset.validate('Homo sapiens'), True) - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_termset_validate_false(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') self.assertEqual(termset.validate('missing_term'), False) - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_get_item(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') self.assertEqual(termset['Homo sapiens'].id, 'NCBI_TAXON:9606') self.assertEqual(termset['Homo sapiens'].description, 'the species is human') self.assertEqual(termset['Homo sapiens'].meaning, 'https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=9606') - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_get_item_key_error(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') with self.assertRaises(ValueError): termset['Homo Ssapiens'] - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) expected = ['ASTROCYTE', 'INTERNEURON', 'MICROGLIAL_CELL', 'MOTOR_NEURON', 'OLIGODENDROCYTE', 'PYRAMIDAL_NEURON'] self.assertEqual(list(termset.view_set), expected) - @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_enum_expander(self): termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) self.assertEqual(len(termset.view_set), 502) - remove_test_file('./expanded_example_dynamic_term_set.yaml') + remove_test_file('expanded_example_dynamic_term_set.yaml') From 6645f7806621945b3b787d9ced031920f64edb79 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 13:24:10 -0400 Subject: [PATCH 22/78] ruff --- tests/unit/test_term_set.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index a6ed53f4b..296f0e7e3 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -12,7 +12,7 @@ import schemasheets import oaklib - REQUIREMENTS_INSTALLED = TRUE + REQUIREMENTS_INSTALLED = True except ImportError: REQUIREMENTS_INSTALLED = False @@ -56,7 +56,8 @@ def test_get_item_key_error(self): def test_view_set_sheets(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) - expected = ['ASTROCYTE', 'INTERNEURON', 'MICROGLIAL_CELL', 'MOTOR_NEURON', 'OLIGODENDROCYTE', 'PYRAMIDAL_NEURON'] + expected = ['ASTROCYTE', 'INTERNEURON', 'MICROGLIAL_CELL', 'MOTOR_NEURON', + 'OLIGODENDROCYTE', 'PYRAMIDAL_NEURON'] self.assertEqual(list(termset.view_set), expected) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") From b7b139f9ef86d01ce1b0971547fbbdace7aa5a59 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 13:27:26 -0400 Subject: [PATCH 23/78] pyproject --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7a9741ba2..bc1cde8db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ tqdm = ["tqdm>=4.41.0"] termset_reqs = ["linkml-runtime>=1.5.0", "schemasheets>=0.1.23", "oaklib>=0.5.12", - "yaml"] + "pyyaml"] [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf" From 26462a2d160aa20cb8fd74d62991bf3c95cf25f2 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Fri, 28 Jul 2023 10:28:04 -0700 Subject: [PATCH 24/78] fix test for enum expander --- tests/unit/test_term_set.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 6e815dc40..11a82123c 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -61,6 +61,15 @@ def test_view_set_sheets(self): @unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed") def test_enum_expander(self): - termset = TermSet(term_schema_path='tests/unit/example_dynamic_term_set.yaml', dynamic=True) - self.assertEqual(len(termset.view_set), 502) - remove_test_file('./expanded_example_dynamic_term_set.yaml') + schema_path = 'tests/unit/example_dynamic_term_set.yaml' + termset = TermSet(term_schema_path=schema_path, dynamic=True) + # check that interneuron term is in materialized schema + self.assertIn("CL:0000099", termset.view_set) + # check that motor neuron term is in materialized schema + self.assertIn("CL:0000100", termset.view_set) + # check that pyramidal neuron is in materialized schema + self.assertIn("CL:0000598", termset.view_set) + + filename = os.path.splitext(os.path.basename(schema_path))[0] + remove_test_file(f"tests/unit/expanded_{filename}.yaml") + \ No newline at end of file From 16117689a256e355a329d7df20a4ff98c452fe23 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 17:29:38 +0000 Subject: [PATCH 25/78] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/unit/test_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 7071768a2..3e84fd42a 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -73,4 +73,4 @@ def test_enum_expander(self): filename = os.path.splitext(os.path.basename(schema_path))[0] remove_test_file(f"tests/unit/expanded_{filename}.yaml") - + From f4836564000babd88851f63ed6d92c17f62c35f8 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 13:32:39 -0400 Subject: [PATCH 26/78] pyproject --- tests/unit/test_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 7071768a2..cc4cae75a 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -11,6 +11,7 @@ import linkml_runtime # noqa: F401 import schemasheets import oaklib + import yaml REQUIREMENTS_INSTALLED = True except ImportError: @@ -73,4 +74,3 @@ def test_enum_expander(self): filename = os.path.splitext(os.path.basename(schema_path))[0] remove_test_file(f"tests/unit/expanded_{filename}.yaml") - From c036f5062a68543e471d379b6c81fc72fdd929a3 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 10:38:59 -0700 Subject: [PATCH 27/78] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bc1cde8db..7868f6c7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ tqdm = ["tqdm>=4.41.0"] termset_reqs = ["linkml-runtime>=1.5.0", "schemasheets>=0.1.23", "oaklib>=0.5.12", - "pyyaml"] + "pyyaml>=6.0.1"] [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf" From d81253d577ac5e1257874921b49fc15ea27bc0b5 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 10:39:38 -0700 Subject: [PATCH 28/78] Update requirements-opt.txt --- requirements-opt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-opt.txt b/requirements-opt.txt index f071e399a..b8f4d9059 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -4,4 +4,4 @@ zarr==2.14.2 linkml-runtime>=1.5.0 schemasheets>=0.1.23 oaklib>=0.5.12 -yaml +pyyaml>=6.0.1 From 0203273afbe930023a54dd7fd3771f53efcca946 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 13:40:49 -0400 Subject: [PATCH 29/78] ruff --- tests/unit/test_term_set.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index cc4cae75a..9eaa9020e 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -9,9 +9,9 @@ try: import linkml_runtime # noqa: F401 - import schemasheets - import oaklib - import yaml + import schemasheets # noqa: F401 + import oaklib # noqa: F401 + import yaml # noqa: F401 REQUIREMENTS_INSTALLED = True except ImportError: From dfe16ef7f16dc107aaa0b8f52ab90146caf73446 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 10:44:47 -0700 Subject: [PATCH 30/78] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7868f6c7b..295679f8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ dynamic = ["version"] [project.optional-dependencies] zarr = ["zarr>=2.12.0"] tqdm = ["tqdm>=4.41.0"] -termset_reqs = ["linkml-runtime>=1.5.0", +termset_reqs = ["linkml-runtime>=1.5.5", "schemasheets>=0.1.23", "oaklib>=0.5.12", "pyyaml>=6.0.1"] From 2dad345ccfb78b01defe91d44f0f84bea9ecddd9 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 10:45:06 -0700 Subject: [PATCH 31/78] Update requirements-opt.txt --- requirements-opt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-opt.txt b/requirements-opt.txt index b8f4d9059..aa5bf3e4d 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -1,7 +1,7 @@ # pinned dependencies that are optional. used to reproduce an entire development environment to use HDMF tqdm==4.65.0 zarr==2.14.2 -linkml-runtime>=1.5.0 +linkml-runtime>=1.5.5 schemasheets>=0.1.23 oaklib>=0.5.12 pyyaml>=6.0.1 From c54bcb6651e06076212ea50a11454bd85e438b37 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 10:47:56 -0700 Subject: [PATCH 32/78] Update requirements-min.txt --- requirements-min.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements-min.txt b/requirements-min.txt index 3047431bc..a6d55d82d 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -6,6 +6,8 @@ numpy==1.18 pandas==1.0.5 # when this is changed to >=1.5.0, see TODO items referenced in #762 ruamel.yaml==0.16 scipy==1.4 -linkml-runtime==1.5.0 -tqdm==4.41.0 +linkml-runtime>=1.5.5 +schemasheets>=0.1.23 +oaklib>=0.5.12 +pyyaml>=6.0.1tqdm==4.41.0 zarr==2.12.0 From 0f09f6c02816e73395bad200c743701f1cd44ee6 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 10:48:12 -0700 Subject: [PATCH 33/78] Update requirements-doc.txt --- requirements-doc.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/requirements-doc.txt b/requirements-doc.txt index c285ae79e..9185091c7 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -4,4 +4,7 @@ sphinx>=4 # improved support for docutils>=0.17 sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17 sphinx-gallery sphinx-copybutton -linkml-runtime==1.5.0 +linkml-runtime>=1.5.5 +schemasheets>=0.1.23 +oaklib>=0.5.12 +pyyaml>=6.0.1 From 434a079f4d24c3f7dd33adfc68b8fd3e1267c6b5 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:06:14 -0400 Subject: [PATCH 34/78] gallery --- src/hdmf/term_set.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 28bb2bb96..c8761c1e2 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -24,9 +24,7 @@ def __init__(self, """ try: from linkml_runtime.utils.schemaview import SchemaView - from linkml_runtime.utils.schema_as_dict import schema_as_dict - from schemasheets.schemamaker import SchemaMaker - from oaklib.utilities.subsets.value_set_expander import ValueSetExpander + except ImportError: msg = "Install TermSet requirements in pyproject.toml" raise ValueError(msg) @@ -118,6 +116,11 @@ def __getitem__(self, term): raise ValueError(msg) def __schemasheets_convert(self): + try: + from linkml_runtime.utils.schema_as_dict import schema_as_dict + from schemasheets.schemamaker import SchemaMaker + except ImportError: + msg="..." schema_maker = SchemaMaker() tsv_file_paths = glob.glob(self.schemasheets_folder + "/*.tsv") schema = schema_maker.create_schema(tsv_file_paths) @@ -130,6 +133,10 @@ def __schemasheets_convert(self): return schemasheet_schema_path def __enum_expander(self): + try: + from oaklib.utilities.subsets.value_set_expander import ValueSetExpander + except: + msg = '...' expander = ValueSetExpander() # TODO: should linkml raise a warning if the schema does not have dynamic enums enum = list(self.view.all_enums()) From 4059cdabd65baf7ff4c15bc42692228263e75e40 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:18:29 -0400 Subject: [PATCH 35/78] yaml --- src/hdmf/term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index c8761c1e2..77bb8656d 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -1,4 +1,3 @@ -import yaml import glob import os from collections import namedtuple @@ -117,6 +116,7 @@ def __getitem__(self, term): def __schemasheets_convert(self): try: + import yaml from linkml_runtime.utils.schema_as_dict import schema_as_dict from schemasheets.schemamaker import SchemaMaker except ImportError: From 70efed5d83526d41f87907a0e033634a2526be73 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 11:24:31 -0700 Subject: [PATCH 36/78] Update pyproject.toml --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 295679f8b..c85b4f037 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,10 +42,10 @@ dynamic = ["version"] [project.optional-dependencies] zarr = ["zarr>=2.12.0"] tqdm = ["tqdm>=4.41.0"] -termset_reqs = ["linkml-runtime>=1.5.5", - "schemasheets>=0.1.23", - "oaklib>=0.5.12", - "pyyaml>=6.0.1"] +termset_reqs = ["linkml-runtime>=1.5.5"; python_version >= '3.9'", + "schemasheets>=0.1.23; python_version >= '3.9'", + "oaklib>=0.5.12; python_version >= '3.9'", + "pyyaml>=6.0.1; python_version >= '3.9'"] [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf" From 027b7dccd6fc7c805459b98c064eb5d4cc593457 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:27:50 -0400 Subject: [PATCH 37/78] value error --- src/hdmf/term_set.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 77bb8656d..f55ce8efd 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -23,9 +23,8 @@ def __init__(self, """ try: from linkml_runtime.utils.schemaview import SchemaView - except ImportError: - msg = "Install TermSet requirements in pyproject.toml" + msg = "Install linkml_runtime" raise ValueError(msg) self.term_schema_path = term_schema_path @@ -120,7 +119,8 @@ def __schemasheets_convert(self): from linkml_runtime.utils.schema_as_dict import schema_as_dict from schemasheets.schemamaker import SchemaMaker except ImportError: - msg="..." + msg="Install schemasheets." + raise ValueError(msg) schema_maker = SchemaMaker() tsv_file_paths = glob.glob(self.schemasheets_folder + "/*.tsv") schema = schema_maker.create_schema(tsv_file_paths) @@ -136,7 +136,8 @@ def __enum_expander(self): try: from oaklib.utilities.subsets.value_set_expander import ValueSetExpander except: - msg = '...' + msg = 'Install oaklib.' + raise ValueError(msg) expander = ValueSetExpander() # TODO: should linkml raise a warning if the schema does not have dynamic enums enum = list(self.view.all_enums()) From cc5d007ad0883aab16a492ee95ed913dc0cdba2b Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:28:41 -0400 Subject: [PATCH 38/78] quote --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c85b4f037..6315b0542 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ dynamic = ["version"] [project.optional-dependencies] zarr = ["zarr>=2.12.0"] tqdm = ["tqdm>=4.41.0"] -termset_reqs = ["linkml-runtime>=1.5.5"; python_version >= '3.9'", +termset_reqs = ["linkml-runtime>=1.5.5; python_version >= '3.9'", "schemasheets>=0.1.23; python_version >= '3.9'", "oaklib>=0.5.12; python_version >= '3.9'", "pyyaml>=6.0.1; python_version >= '3.9'"] From 4de36d5ef47af60a1b5917f8e0955c64376feb75 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 11:37:00 -0700 Subject: [PATCH 39/78] Update requirements-min.txt --- requirements-min.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/requirements-min.txt b/requirements-min.txt index a6d55d82d..9792c22bc 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -6,8 +6,9 @@ numpy==1.18 pandas==1.0.5 # when this is changed to >=1.5.0, see TODO items referenced in #762 ruamel.yaml==0.16 scipy==1.4 -linkml-runtime>=1.5.5 -schemasheets>=0.1.23 -oaklib>=0.5.12 -pyyaml>=6.0.1tqdm==4.41.0 +linkml-runtime>=1.5.5; python_version >= "3.9" +schemasheets>=0.1.23; python_version >= "3.9" +oaklib>=0.5.12; python_version >= "3.9" +pyyaml>=6.0.1; python_version >= "3.9" +tqdm==4.41.0 zarr==2.12.0 From eb92274e04f1339eee3f282843bc720b4456fde3 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 11:37:19 -0700 Subject: [PATCH 40/78] Update requirements-opt.txt --- requirements-opt.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-opt.txt b/requirements-opt.txt index aa5bf3e4d..a776f7313 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -1,7 +1,7 @@ # pinned dependencies that are optional. used to reproduce an entire development environment to use HDMF tqdm==4.65.0 zarr==2.14.2 -linkml-runtime>=1.5.5 -schemasheets>=0.1.23 -oaklib>=0.5.12 -pyyaml>=6.0.1 +linkml-runtime>=1.5.5; python_version >= "3.9" +schemasheets>=0.1.23; python_version >= "3.9" +oaklib>=0.5.12; python_version >= "3.9" +pyyaml>=6.0.1; python_version >= "3.9" From f2205960ce69bade5ef4a32eed9bb359df967e77 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Fri, 28 Jul 2023 11:37:41 -0700 Subject: [PATCH 41/78] Update requirements-doc.txt --- requirements-doc.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-doc.txt b/requirements-doc.txt index 9185091c7..d1c264bd3 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -4,7 +4,7 @@ sphinx>=4 # improved support for docutils>=0.17 sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17 sphinx-gallery sphinx-copybutton -linkml-runtime>=1.5.5 -schemasheets>=0.1.23 -oaklib>=0.5.12 -pyyaml>=6.0.1 +linkml-runtime>=1.5.5; python_version >= "3.9" +schemasheets>=0.1.23; python_version >= "3.9" +oaklib>=0.5.12; python_version >= "3.9" +pyyaml>=6.0.1; python_version >= "3.9" From e83e7fc1347506d12536210e093b8ec435c35636 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:39:58 -0400 Subject: [PATCH 42/78] except --- src/hdmf/term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index f55ce8efd..c981003cc 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -135,7 +135,7 @@ def __schemasheets_convert(self): def __enum_expander(self): try: from oaklib.utilities.subsets.value_set_expander import ValueSetExpander - except: + except ImportError: msg = 'Install oaklib.' raise ValueError(msg) expander = ValueSetExpander() From e5c6e0f7cf10f65c9d0ef7fdb9434943b1e7ff46 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:53:30 -0400 Subject: [PATCH 43/78] gallery --- docs/gallery/plot_term_set.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 44554f749..683159997 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -53,6 +53,7 @@ # ---------------------------------------------------- from hdmf.common import DynamicTable, VectorData import os +import sys try: dir_path = os.path.dirname(os.path.abspath(__file__)) @@ -68,7 +69,10 @@ # method will return a dictionary of all the terms and the corresponding information for each term. # Users can index specific terms from the :py:class:`~hdmf.term_set.TermSet`. LinkML runtime will need to be installed. # You can do so by first running ``pip install linkml-runtime``. -from hdmf.term_set import TermSet +try: + from hdmf.term_set import TermSet +except ValueError: + sys.exit(0) terms = TermSet(term_schema_path=yaml_file) print(terms.view_set) From ba313b58eebb3a9d96e0101d9c3a6f2d43d1e03c Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:57:12 -0400 Subject: [PATCH 44/78] gallery --- docs/gallery/plot_term_set.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 683159997..e900b5aad 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -70,9 +70,13 @@ # Users can index specific terms from the :py:class:`~hdmf.term_set.TermSet`. LinkML runtime will need to be installed. # You can do so by first running ``pip install linkml-runtime``. try: - from hdmf.term_set import TermSet + import linkml_runtime # noqa: F401 + import schemasheets # noqa: F401 + import oaklib # noqa: F401 + import yaml # noqa: F401 except ValueError: sys.exit(0) +from hdmf.term_set import TermSet terms = TermSet(term_schema_path=yaml_file) print(terms.view_set) From 2e9cd284a92b066e79fe0a9717b68c79b9fd1738 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 14:59:34 -0400 Subject: [PATCH 45/78] gallery --- docs/gallery/plot_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index e900b5aad..da918c99c 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -74,7 +74,7 @@ import schemasheets # noqa: F401 import oaklib # noqa: F401 import yaml # noqa: F401 -except ValueError: +except ImportError: sys.exit(0) from hdmf.term_set import TermSet terms = TermSet(term_schema_path=yaml_file) From 9c3c45f31c5bbbd6c4230d0e889c5eec048a888d Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 15:46:11 -0400 Subject: [PATCH 46/78] ruff --- docs/gallery/plot_term_set.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index da918c99c..dddbfea84 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -71,9 +71,6 @@ # You can do so by first running ``pip install linkml-runtime``. try: import linkml_runtime # noqa: F401 - import schemasheets # noqa: F401 - import oaklib # noqa: F401 - import yaml # noqa: F401 except ImportError: sys.exit(0) from hdmf.term_set import TermSet From c873f6bac6811e6f4c8df177d88ba559750e5377 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 17:04:21 -0400 Subject: [PATCH 47/78] tests --- src/hdmf/term_set.py | 8 +++--- .../expanded_example_dynamic_term_set.yaml | 2 +- tests/unit/test_term_set.py | 27 ++++++++++++++++++- .../schemasheets/nwb_static_enums.yaml | 2 +- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index c981003cc..47fb57305 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -35,14 +35,14 @@ def __init__(self, msg = "..." raise ValueError(msg) else: - self.term_schema_path = self.__schemasheets_convert() + self.term_schema_path = self._schemasheets_convert() self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) self.sources = self.view.schema.prefixes if dynamic: - self.expanded_term_set_path = self.__enum_expander() + self.expanded_term_set_path = self._enum_expander() self.view = SchemaView(self.expanded_term_set_path) def __repr__(self): @@ -113,7 +113,7 @@ def __getitem__(self, term): msg = 'Term not in schema' raise ValueError(msg) - def __schemasheets_convert(self): + def _schemasheets_convert(self): try: import yaml from linkml_runtime.utils.schema_as_dict import schema_as_dict @@ -132,7 +132,7 @@ def __schemasheets_convert(self): return schemasheet_schema_path - def __enum_expander(self): + def _enum_expander(self): try: from oaklib.utilities.subsets.value_set_expander import ValueSetExpander except ImportError: diff --git a/tests/unit/expanded_example_dynamic_term_set.yaml b/tests/unit/expanded_example_dynamic_term_set.yaml index dc1674df1..a2631696a 100644 --- a/tests/unit/expanded_example_dynamic_term_set.yaml +++ b/tests/unit/expanded_example_dynamic_term_set.yaml @@ -5,7 +5,7 @@ description: this schema demonstrates the use of dynamic enums prefixes: linkml: https://w3id.org/linkml/ - CL: http://purl.obolibrary.org/obo/cl.owl + CL: http://purl.obolibrary.org/obo/CL_ imports: - linkml:types diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 9eaa9020e..0c7e281fb 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -8,7 +8,7 @@ CUR_DIR = os.path.dirname(os.path.realpath(__file__)) try: - import linkml_runtime # noqa: F401 + from linkml_runtime.utils.schemaview import SchemaView # noqa: F401 import schemasheets # noqa: F401 import oaklib # noqa: F401 import yaml # noqa: F401 @@ -29,6 +29,7 @@ def test_view_set(self): termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml') expected = ['Homo sapiens', 'Mus musculus', 'Ursus arctos horribilis', 'Myrmecophaga tridactyla'] self.assertEqual(list(termset.view_set), expected) + self.assertIsInstance(termset.view, SchemaView) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_termset_validate(self): @@ -53,6 +54,12 @@ def test_get_item_key_error(self): with self.assertRaises(ValueError): termset['Homo Ssapiens'] + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") + def test_schema_sheets_and_path_provided_error(self): + folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") + with self.assertRaises(ValueError): + termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") @@ -60,6 +67,7 @@ def test_view_set_sheets(self): expected = ['ASTROCYTE', 'INTERNEURON', 'MICROGLIAL_CELL', 'MOTOR_NEURON', 'OLIGODENDROCYTE', 'PYRAMIDAL_NEURON'] self.assertEqual(list(termset.view_set), expected) + self.assertIsInstance(termset.view, SchemaView) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_enum_expander(self): @@ -72,5 +80,22 @@ def test_enum_expander(self): # check that pyramidal neuron is in materialized schema self.assertIn("CL:0000598", termset.view_set) + self.assertIsInstance(termset.view, SchemaView) + self.assertEqual(termset.expanded_term_set_path, 'tests/unit/expanded_example_dynamic_term_set.yaml') + filename = os.path.splitext(os.path.basename(schema_path))[0] remove_test_file(f"tests/unit/expanded_{filename}.yaml") + + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") + def test_enum_expander_output(self): + schema_path = 'tests/unit/example_dynamic_term_set.yaml' + convert_path = TermSet(term_schema_path=schema_path, dynamic=True)._enum_expander() + self.assertEqual(convert_path, "tests/unit/expanded_example_dynamic_term_set.yaml") + + @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") + def test_folder_output(self): + folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") + schema_path = 'tests/unit/example_dynamic_term_set.yaml' + termset = TermSet(schemasheets_folder=folder) + path = termset._schemasheets_convert() + self.assertEqual(path, os.path.dirname(folder)+"/schemasheets/nwb_static_enums.yaml") diff --git a/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml b/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml index 72bade0d0..222205959 100644 --- a/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml +++ b/tests/unit/test_term_set_input/schemasheets/nwb_static_enums.yaml @@ -43,7 +43,7 @@ imports: - linkml:types name: nwb_static_enums prefixes: - CL: http://purl.obolibrary.org/obo/cl.owl + CL: http://purl.obolibrary.org/obo/CL_ TEMP: https://example.org/TEMP/ linkml: https://w3id.org/linkml/ slots: From 929823e491f7302ca03123a6e171df9ec6cf5ba3 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Fri, 28 Jul 2023 17:06:01 -0400 Subject: [PATCH 48/78] tests --- tests/unit/test_term_set.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 0c7e281fb..4399adcd9 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -58,7 +58,7 @@ def test_get_item_key_error(self): def test_schema_sheets_and_path_provided_error(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") with self.assertRaises(ValueError): - termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) + TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): @@ -95,7 +95,6 @@ def test_enum_expander_output(self): @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_folder_output(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") - schema_path = 'tests/unit/example_dynamic_term_set.yaml' termset = TermSet(schemasheets_folder=folder) path = termset._schemasheets_convert() self.assertEqual(path, os.path.dirname(folder)+"/schemasheets/nwb_static_enums.yaml") From 2ce37b6978a02ca862b973dc868bd4d616285103 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Sat, 29 Jul 2023 06:49:26 -0700 Subject: [PATCH 49/78] windows path resolution in termset --- src/hdmf/term_set.py | 2 +- tests/unit/test_term_set.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 47fb57305..e3ab2fcf9 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -143,7 +143,7 @@ def _enum_expander(self): enum = list(self.view.all_enums()) schema_dir = os.path.dirname(self.term_schema_path) file_name = os.path.basename(self.term_schema_path) - output_path = os.path.join(schema_dir, "expanded_"+file_name) + output_path = os.path.join(schema_dir, f"expanded_{file_name}") expander.expand_in_place(self.term_schema_path, enum, output_path) return output_path diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 4399adcd9..a788318db 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -58,7 +58,7 @@ def test_get_item_key_error(self): def test_schema_sheets_and_path_provided_error(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") with self.assertRaises(ValueError): - TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) + termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): @@ -97,4 +97,4 @@ def test_folder_output(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) path = termset._schemasheets_convert() - self.assertEqual(path, os.path.dirname(folder)+"/schemasheets/nwb_static_enums.yaml") + self.assertEqual(path, os.path.join(os.path.dirname(folder), "schemasheets/nwb_static_enums.yaml")) From d1494501433c7ab3fed64b617387d986513ec727 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Sat, 29 Jul 2023 06:58:07 -0700 Subject: [PATCH 50/78] fix linting errors in test_term_set --- tests/unit/test_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index a788318db..04175d55e 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -58,7 +58,7 @@ def test_get_item_key_error(self): def test_schema_sheets_and_path_provided_error(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") with self.assertRaises(ValueError): - termset = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) + TermSet(term_schema_path='tests/unit/example_test_term_set.yaml', schemasheets_folder=folder) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_view_set_sheets(self): From d459794baca7d084c45978ba0ae5ef9db18aa0f6 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Sat, 29 Jul 2023 07:08:57 -0700 Subject: [PATCH 51/78] normalize paths for cross OS tests fix --- tests/unit/test_term_set.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 04175d55e..44fe0f2b5 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -90,11 +90,17 @@ def test_enum_expander(self): def test_enum_expander_output(self): schema_path = 'tests/unit/example_dynamic_term_set.yaml' convert_path = TermSet(term_schema_path=schema_path, dynamic=True)._enum_expander() - self.assertEqual(convert_path, "tests/unit/expanded_example_dynamic_term_set.yaml") + convert_path = os.path.normpath(convert_path) + + expected_path = os.path.join("tests", "unit", "expanded_example_dynamic_term_set.yaml") + expected_path = os.path.normpath(expected_path) + + self.assertEqual(convert_path, expected_path) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_folder_output(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) - path = termset._schemasheets_convert() - self.assertEqual(path, os.path.join(os.path.dirname(folder), "schemasheets/nwb_static_enums.yaml")) + actual_path = termset._schemasheets_convert() + expected_path = os.path.normpath(os.path.join(os.path.dirname(folder), "schemasheets/nwb_static_enums.yaml")) + self.assertEqual(actual_path, expected_path) From 018d40e0b2c679f3146a2d440fb023b934110fe5 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Sat, 29 Jul 2023 07:18:48 -0700 Subject: [PATCH 52/78] normalize paths in missed test_enum_expander() --- tests/unit/test_term_set.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 44fe0f2b5..f08bf11eb 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -81,7 +81,11 @@ def test_enum_expander(self): self.assertIn("CL:0000598", termset.view_set) self.assertIsInstance(termset.view, SchemaView) - self.assertEqual(termset.expanded_term_set_path, 'tests/unit/expanded_example_dynamic_term_set.yaml') + expected_path = os.path.join("tests", "unit", "expanded_example_dynamic_term_set.yaml") + expected_path = os.path.normpath(expected_path) + actual_path = os.path.normpath(termset.expanded_term_set_path) + + self.assertEqual(actual_path, expected_path) filename = os.path.splitext(os.path.basename(schema_path))[0] remove_test_file(f"tests/unit/expanded_{filename}.yaml") From 2e1c9c05a2b01025ed00d789907c62edfa659335 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 3 Aug 2023 09:26:58 -0700 Subject: [PATCH 53/78] notebook --- docs/gallery/example_dynamic_term_set.yaml | 42 ++++++++++++++++ .../expanded_example_dynamic_term_set.yaml | 0 docs/gallery/plot_external_resources.py | 6 +-- docs/gallery/plot_term_set.py | 48 +++++++++++++++---- docs/gallery/schemasheets/classes.tsv | 3 ++ docs/gallery/schemasheets/enums.tsv | 9 ++++ .../schemasheets/nwb_static_enums.yaml | 2 +- docs/gallery/schemasheets/prefixes.tsv | 4 ++ docs/gallery/schemasheets/schema.tsv | 3 ++ docs/gallery/schemasheets/slots.tsv | 3 ++ src/hdmf/term_set.py | 14 +++--- tests/unit/test_term_set.py | 6 +-- 12 files changed, 117 insertions(+), 23 deletions(-) create mode 100644 docs/gallery/example_dynamic_term_set.yaml rename {tests/unit => docs/gallery}/expanded_example_dynamic_term_set.yaml (100%) create mode 100644 docs/gallery/schemasheets/classes.tsv create mode 100644 docs/gallery/schemasheets/enums.tsv rename tests/unit/test_term_set_input/schemasheets/file.yaml => docs/gallery/schemasheets/nwb_static_enums.yaml (97%) create mode 100644 docs/gallery/schemasheets/prefixes.tsv create mode 100644 docs/gallery/schemasheets/schema.tsv create mode 100644 docs/gallery/schemasheets/slots.tsv diff --git a/docs/gallery/example_dynamic_term_set.yaml b/docs/gallery/example_dynamic_term_set.yaml new file mode 100644 index 000000000..e09c87fa9 --- /dev/null +++ b/docs/gallery/example_dynamic_term_set.yaml @@ -0,0 +1,42 @@ +id: https://w3id.org/linkml/examples/nwb_dynamic_enums +title: dynamic enums example +name: nwb_dynamic_enums +description: this schema demonstrates the use of dynamic enums + +prefixes: + linkml: https://w3id.org/linkml/ + CL: http://purl.obolibrary.org/obo/CL_ + +imports: + - linkml:types + +default_range: string + +# ======================== # +# CLASSES # +# ======================== # +classes: + BrainSample: + slots: + - cell_type + +# ======================== # +# SLOTS # +# ======================== # +slots: + cell_type: + required: true + range: NeuronTypeEnum + +# ======================== # +# ENUMS # +# ======================== # +enums: + NeuronTypeEnum: + reachable_from: + source_ontology: obo:cl + source_nodes: + - CL:0000540 ## neuron + include_self: false + relationship_types: + - rdfs:subClassOf diff --git a/tests/unit/expanded_example_dynamic_term_set.yaml b/docs/gallery/expanded_example_dynamic_term_set.yaml similarity index 100% rename from tests/unit/expanded_example_dynamic_term_set.yaml rename to docs/gallery/expanded_example_dynamic_term_set.yaml diff --git a/docs/gallery/plot_external_resources.py b/docs/gallery/plot_external_resources.py index edde33def..bd9257407 100644 --- a/docs/gallery/plot_external_resources.py +++ b/docs/gallery/plot_external_resources.py @@ -65,9 +65,9 @@ objects. 4. Multiple :py:class:`~hdmf.common.resources.Object` objects can use the same :py:class:`~hdmf.common.resources.Key`. 5. Do not use the private methods to add into the :py:class:`~hdmf.common.resources.KeyTable`, - :py:class:`~hdmf.common.resources.ResourceTable`, :py:class:`~hdmf.common.resources.EntityTable`, - :py:class:`~hdmf.common.resources.ObjectTable`, :py:class:`~hdmf.common.resources.ObjectKeyTable` - individually. + :py:class:`~hdmf.common.resources.FileTable`, :py:class:`~hdmf.common.resources.EntityTable`, + :py:class:`~hdmf.common.resources.ObjectTable`, :py:class:`~hdmf.common.resources.ObjectKeyTable`, + :py:class:`~hdmf.common.resources.EntityKeyTable` individually. 6. URIs are optional, but highly recommended. If not known, an empty string may be used. 7. An entity ID should be the unique string identifying the entity in the given resource. This may or may not include a string representing the resource and a colon. diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index dddbfea84..8daa42596 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -41,26 +41,59 @@ For example, the NCBI Taxonomy is abbreviated as NCBI_TAXON, and Ensemble is simply Ensemble. As mentioned prior, the URI needs to be to the terms; this is to allow the URI to later be coupled with the source id for the term to create a valid link to the term source page. -3. The schema uses LinkML enumerations to list all the possible terms. Currently, users will need to - manually outline the terms within the enumeration's permissible values. +3. The schema uses LinkML enumerations to list all the possible terms. To define the all the permissible + values, the user can take define them manually in the schema, transfer them from a Google spreadsheet, + or pull them into the schema dynamically from a LinkML supported source. For a clear example, please view the `example_term_set.yaml `_ for this tutorial, which provides a concise example of how a term set schema looks. + +For more information on how to properly format the Google spreadsheet to be compatible with LinkMl, please +refer to https://linkml.io/schemasheets/#examples. + +For more information how to properly format the schema to support LinkML Dynamic Enumerations, please +refer to https://linkml.io/linkml/schemas/enums.html#dynamic-enums. """ -###################################################### -# Creating an instance of the TermSet class -# ---------------------------------------------------- from hdmf.common import DynamicTable, VectorData import os import sys +try: + import linkml_runtime # noqa: F401 +except ImportError: + sys.exit(0) +from hdmf.term_set import TermSet + try: dir_path = os.path.dirname(os.path.abspath(__file__)) yaml_file = os.path.join(dir_path, 'example_term_set.yaml') + schemasheets_folder = os.path.join(dir_path, 'schemasheets') + dynamic_schema_path = os.path.join(dir_path, 'example_dynamic_term_set.yaml') except NameError: dir_path = os.path.dirname(os.path.abspath('.')) yaml_file = os.path.join(dir_path, 'gallery/example_term_set.yaml') + schemasheets_folder = os.path.join(dir_path, 'gallery/schemasheets') + dynamic_schema_path = os.path.join(dir_path, 'gallery/example_dynamic_term_set.yaml') + +# Use Schemasheets to create TermSet schema +# ----------------------------------------- +# The :py:class:`~hdmf.term_set.TermSet` class builds off of LinkML Schemasheets, allowing users to convert between +# a Google spreadsheet to a complete LinkML schema. Once the user has defined the necessary LinkML metadata within the +# spreadsheet, the spreadsheet needs to be saved as individal tsv files, i.e., one tsv file per spreadsheet tab. Please +# refer to the Schemasheets tutorial link above for more details on the required syntax structure within the sheets. +# Once the tsv files are in a folder, the user simply provides the path to the folder with ``schemasheets_folder``. +termset = TermSet(schemasheets_folder=schemasheets_folder) + +# Use Dynamic Enumerations to populate TermSet +# -------------------------------------------- +# The :py:class:`~hdmf.term_set.TermSet` class allows user to skip manually defining permissible values, by pulling from +# a LinkML support source. These sources contain multiple ontologies. A user can select a node from an ontology, +# in which the all elements on the branch, starting at the chosen node, will be used as permissible values. +# Please refer to the LinkMl Dynamic Enumeration tutorial for more information on these sources and how to setup Dynamic +# Enumerations within the schema. Once the schema is ready, the user provides a path to the schema and set +# ``dynamic=True``. A new schema, with the populated permissible values, will be created in the same directory. +termset = TermSet(term_schema_path=dynamic_schema_path, dynamic=True) ###################################################### # Viewing TermSet values @@ -69,11 +102,6 @@ # method will return a dictionary of all the terms and the corresponding information for each term. # Users can index specific terms from the :py:class:`~hdmf.term_set.TermSet`. LinkML runtime will need to be installed. # You can do so by first running ``pip install linkml-runtime``. -try: - import linkml_runtime # noqa: F401 -except ImportError: - sys.exit(0) -from hdmf.term_set import TermSet terms = TermSet(term_schema_path=yaml_file) print(terms.view_set) diff --git a/docs/gallery/schemasheets/classes.tsv b/docs/gallery/schemasheets/classes.tsv new file mode 100644 index 000000000..d3d83d558 --- /dev/null +++ b/docs/gallery/schemasheets/classes.tsv @@ -0,0 +1,3 @@ +class slot +> class slot +BrainSample cell_type diff --git a/docs/gallery/schemasheets/enums.tsv b/docs/gallery/schemasheets/enums.tsv new file mode 100644 index 000000000..b76e4e92c --- /dev/null +++ b/docs/gallery/schemasheets/enums.tsv @@ -0,0 +1,9 @@ +valueset value mapping description +> enum permissible_value meaning description +NeuronOrGlialCellTypeEnum Enumeration to capture various cell types found in the brain. +NeuronOrGlialCellTypeEnum PYRAMIDAL_NEURON CL:0000598 Neurons with a pyramidal shaped cell body (soma) and two distinct dendritic trees. +NeuronOrGlialCellTypeEnum INTERNEURON CL:0000099 Neurons whose axons (and dendrites) are limited to a single brain area. +NeuronOrGlialCellTypeEnum MOTOR_NEURON CL:0000100 Neurons whose cell body is located in the motor cortex, brainstem or the spinal cord, and whose axon (fiber) projects to the spinal cord or outside of the spinal cord to directly or indirectly control effector organs, mainly muscles and glands. +NeuronOrGlialCellTypeEnum ASTROCYTE CL:0000127 Characteristic star-shaped glial cells in the brain and spinal cord. +NeuronOrGlialCellTypeEnum OLIGODENDROCYTE CL:0000128 Type of neuroglia whose main functions are to provide support and insulation to axons within the central nervous system (CNS) of jawed vertebrates. +NeuronOrGlialCellTypeEnum MICROGLIAL_CELL CL:0000129 Microglia are the resident immune cells of the brain and constantly patrol the cerebral microenvironment to respond to pathogens and damage. diff --git a/tests/unit/test_term_set_input/schemasheets/file.yaml b/docs/gallery/schemasheets/nwb_static_enums.yaml similarity index 97% rename from tests/unit/test_term_set_input/schemasheets/file.yaml rename to docs/gallery/schemasheets/nwb_static_enums.yaml index 72bade0d0..222205959 100644 --- a/tests/unit/test_term_set_input/schemasheets/file.yaml +++ b/docs/gallery/schemasheets/nwb_static_enums.yaml @@ -43,7 +43,7 @@ imports: - linkml:types name: nwb_static_enums prefixes: - CL: http://purl.obolibrary.org/obo/cl.owl + CL: http://purl.obolibrary.org/obo/CL_ TEMP: https://example.org/TEMP/ linkml: https://w3id.org/linkml/ slots: diff --git a/docs/gallery/schemasheets/prefixes.tsv b/docs/gallery/schemasheets/prefixes.tsv new file mode 100644 index 000000000..d06522ebd --- /dev/null +++ b/docs/gallery/schemasheets/prefixes.tsv @@ -0,0 +1,4 @@ +prefix URI +> prefix prefix_reference +linkml https://w3id.org/linkml/ +CL http://purl.obolibrary.org/obo/CL_ diff --git a/docs/gallery/schemasheets/schema.tsv b/docs/gallery/schemasheets/schema.tsv new file mode 100644 index 000000000..b6a032f45 --- /dev/null +++ b/docs/gallery/schemasheets/schema.tsv @@ -0,0 +1,3 @@ +schema uri title description +> schema id title description +nwb_static_enums https://w3id.org/linkml/examples/nwb_static_enums static enums example this schema demonstrates the use of static enums diff --git a/docs/gallery/schemasheets/slots.tsv b/docs/gallery/schemasheets/slots.tsv new file mode 100644 index 000000000..20d099e4f --- /dev/null +++ b/docs/gallery/schemasheets/slots.tsv @@ -0,0 +1,3 @@ +term required +> slot required +cell_type TRUE diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index e3ab2fcf9..6b65d85a9 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -2,6 +2,7 @@ import os from collections import namedtuple from .utils import docval +import warnings class TermSet(): @@ -32,17 +33,17 @@ def __init__(self, if self.schemasheets_folder is not None: if self.term_schema_path is not None: - msg = "..." + msg = "Cannot have both a path to a Schemasheets folder and a TermSet schema." raise ValueError(msg) else: - self.term_schema_path = self._schemasheets_convert() + self.term_schema_path = self.__schemasheets_convert() self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) self.sources = self.view.schema.prefixes if dynamic: - self.expanded_term_set_path = self._enum_expander() + self.expanded_term_set_path = self.__enum_expander() self.view = SchemaView(self.expanded_term_set_path) def __repr__(self): @@ -113,7 +114,7 @@ def __getitem__(self, term): msg = 'Term not in schema' raise ValueError(msg) - def _schemasheets_convert(self): + def __schemasheets_convert(self): try: import yaml from linkml_runtime.utils.schema_as_dict import schema_as_dict @@ -132,14 +133,15 @@ def _schemasheets_convert(self): return schemasheet_schema_path - def _enum_expander(self): + def __enum_expander(self): try: + warnings.filterwarnings("ignore", category=DeprecationWarning) from oaklib.utilities.subsets.value_set_expander import ValueSetExpander except ImportError: msg = 'Install oaklib.' raise ValueError(msg) expander = ValueSetExpander() - # TODO: should linkml raise a warning if the schema does not have dynamic enums + # TODO: linkml should raise a warning if the schema does not have dynamic enums enum = list(self.view.all_enums()) schema_dir = os.path.dirname(self.term_schema_path) file_name = os.path.basename(self.term_schema_path) diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index f08bf11eb..9acdc0e6e 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -70,7 +70,7 @@ def test_view_set_sheets(self): self.assertIsInstance(termset.view, SchemaView) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") - def test_enum_expander(self): + def test__enum_expander(self): schema_path = 'tests/unit/example_dynamic_term_set.yaml' termset = TermSet(term_schema_path=schema_path, dynamic=True) # check that interneuron term is in materialized schema @@ -93,7 +93,7 @@ def test_enum_expander(self): @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_enum_expander_output(self): schema_path = 'tests/unit/example_dynamic_term_set.yaml' - convert_path = TermSet(term_schema_path=schema_path, dynamic=True)._enum_expander() + convert_path = TermSet(term_schema_path=schema_path, dynamic=True).__enum_expander() convert_path = os.path.normpath(convert_path) expected_path = os.path.join("tests", "unit", "expanded_example_dynamic_term_set.yaml") @@ -105,6 +105,6 @@ def test_enum_expander_output(self): def test_folder_output(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) - actual_path = termset._schemasheets_convert() + actual_path = termset.__schemasheets_convert() expected_path = os.path.normpath(os.path.join(os.path.dirname(folder), "schemasheets/nwb_static_enums.yaml")) self.assertEqual(actual_path, expected_path) From d42cdbbac94fb0bbbbbed20da9888b9137e77284 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 3 Aug 2023 09:28:04 -0700 Subject: [PATCH 54/78] notebook --- docs/gallery/plot_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 8daa42596..bfd129e0c 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -80,7 +80,7 @@ # ----------------------------------------- # The :py:class:`~hdmf.term_set.TermSet` class builds off of LinkML Schemasheets, allowing users to convert between # a Google spreadsheet to a complete LinkML schema. Once the user has defined the necessary LinkML metadata within the -# spreadsheet, the spreadsheet needs to be saved as individal tsv files, i.e., one tsv file per spreadsheet tab. Please +# spreadsheet, the spreadsheet needs to be saved as individual tsv files, i.e., one tsv file per spreadsheet tab. Please # refer to the Schemasheets tutorial link above for more details on the required syntax structure within the sheets. # Once the tsv files are in a folder, the user simply provides the path to the folder with ``schemasheets_folder``. termset = TermSet(schemasheets_folder=schemasheets_folder) From 42ce9e610f6f93b246abd5fac17dfd8cdc15a28d Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 3 Aug 2023 09:34:15 -0700 Subject: [PATCH 55/78] name convention --- src/hdmf/term_set.py | 4 ++-- tests/unit/test_term_set.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 6b65d85a9..1fcbbdd38 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -114,7 +114,7 @@ def __getitem__(self, term): msg = 'Term not in schema' raise ValueError(msg) - def __schemasheets_convert(self): + def schemasheets_convert(self): try: import yaml from linkml_runtime.utils.schema_as_dict import schema_as_dict @@ -133,7 +133,7 @@ def __schemasheets_convert(self): return schemasheet_schema_path - def __enum_expander(self): + def enum_expander(self): try: warnings.filterwarnings("ignore", category=DeprecationWarning) from oaklib.utilities.subsets.value_set_expander import ValueSetExpander diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 9acdc0e6e..1274218ce 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -70,7 +70,7 @@ def test_view_set_sheets(self): self.assertIsInstance(termset.view, SchemaView) @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") - def test__enum_expander(self): + def test_enum_expander(self): schema_path = 'tests/unit/example_dynamic_term_set.yaml' termset = TermSet(term_schema_path=schema_path, dynamic=True) # check that interneuron term is in materialized schema @@ -93,7 +93,7 @@ def test__enum_expander(self): @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_enum_expander_output(self): schema_path = 'tests/unit/example_dynamic_term_set.yaml' - convert_path = TermSet(term_schema_path=schema_path, dynamic=True).__enum_expander() + convert_path = TermSet(term_schema_path=schema_path, dynamic=True).enum_expander() convert_path = os.path.normpath(convert_path) expected_path = os.path.join("tests", "unit", "expanded_example_dynamic_term_set.yaml") @@ -105,6 +105,6 @@ def test_enum_expander_output(self): def test_folder_output(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) - actual_path = termset.__schemasheets_convert() + actual_path = termset.schemasheets_convert() expected_path = os.path.normpath(os.path.join(os.path.dirname(folder), "schemasheets/nwb_static_enums.yaml")) self.assertEqual(actual_path, expected_path) From d9c4c131c5ebe9bfba0611e64dc8a29305a1bbb7 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 3 Aug 2023 09:37:47 -0700 Subject: [PATCH 56/78] name convention --- src/hdmf/term_set.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 1fcbbdd38..9603d36f3 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -36,14 +36,14 @@ def __init__(self, msg = "Cannot have both a path to a Schemasheets folder and a TermSet schema." raise ValueError(msg) else: - self.term_schema_path = self.__schemasheets_convert() + self.term_schema_path = self.schemasheets_convert() self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) self.sources = self.view.schema.prefixes if dynamic: - self.expanded_term_set_path = self.__enum_expander() + self.expanded_term_set_path = self.enum_expander() self.view = SchemaView(self.expanded_term_set_path) def __repr__(self): From 94fcccdf4cb0c781a98e89372466e4d927b3df70 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Thu, 3 Aug 2023 09:47:17 -0700 Subject: [PATCH 57/78] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index faa2a2a31..6f325fd4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # HDMF Changelog +## HDMF 3.8.2 (Upcoming) + +### New features and minor improvements +- Added Dynamic Enumerations and Schemasheets support to `TermSet`. @mavaylon1 [#923](https://github.com/hdmf-dev/hdmf/pull/923) + ## HDMF 3.8.1 (July 25, 2023) ### Bug fixes From 2757c993ebead6197d95000769975d3a2df9ecfe Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Thu, 3 Aug 2023 13:58:16 -0700 Subject: [PATCH 58/78] Update plot_term_set.py --- docs/gallery/plot_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index bfd129e0c..4ea3afbc8 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -42,7 +42,7 @@ As mentioned prior, the URI needs to be to the terms; this is to allow the URI to later be coupled with the source id for the term to create a valid link to the term source page. 3. The schema uses LinkML enumerations to list all the possible terms. To define the all the permissible - values, the user can take define them manually in the schema, transfer them from a Google spreadsheet, + values, the user can define them manually in the schema, transfer them from a Google spreadsheet, or pull them into the schema dynamically from a LinkML supported source. For a clear example, please view the From 4f6e13399b3ca0cfbfde63c86a0f3ff7dfa2706c Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Thu, 3 Aug 2023 14:00:23 -0700 Subject: [PATCH 59/78] Update plot_term_set.py --- docs/gallery/plot_term_set.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 4ea3afbc8..ecd7ea4be 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -88,8 +88,8 @@ # Use Dynamic Enumerations to populate TermSet # -------------------------------------------- # The :py:class:`~hdmf.term_set.TermSet` class allows user to skip manually defining permissible values, by pulling from -# a LinkML support source. These sources contain multiple ontologies. A user can select a node from an ontology, -# in which the all elements on the branch, starting at the chosen node, will be used as permissible values. +# a LinkML supported source. These sources contain multiple ontologies. A user can select a node from an ontology, +# in which all the elements on the branch, starting from the chosen node, will be used as permissible values. # Please refer to the LinkMl Dynamic Enumeration tutorial for more information on these sources and how to setup Dynamic # Enumerations within the schema. Once the schema is ready, the user provides a path to the schema and set # ``dynamic=True``. A new schema, with the populated permissible values, will be created in the same directory. From ca592a5eb90065aabc3a5caa9a739dedd5ff158c Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Sat, 12 Aug 2023 15:21:52 -0700 Subject: [PATCH 60/78] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e18edd586..62d5e02b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ - Added the magic `__reduce__` method as well as two private semi-abstract helper methods to enable pickling of the `GenericDataChunkIterator`. @codycbakerphd [#924](https://github.com/hdmf-dev/hdmf/pull/924) - Added Dynamic Enumerations and Schemasheets support to `TermSet`. @mavaylon1 [#923](https://github.com/hdmf-dev/hdmf/pull/923) - ## HDMF 3.8.1 (July 25, 2023) ### Bug fixes From 52dc430059f20b9dd4a337f7a59617aeaa962e3b Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 16:21:32 -0700 Subject: [PATCH 61/78] test reqs --- requirements-doc.txt | 2 +- requirements-min.txt | 2 +- requirements-opt.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-doc.txt b/requirements-doc.txt index d1c264bd3..c2a9aed80 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -4,7 +4,7 @@ sphinx>=4 # improved support for docutils>=0.17 sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17 sphinx-gallery sphinx-copybutton -linkml-runtime>=1.5.5; python_version >= "3.9" +linkml-runtime==1.5.5; python_version >= "3.9" schemasheets>=0.1.23; python_version >= "3.9" oaklib>=0.5.12; python_version >= "3.9" pyyaml>=6.0.1; python_version >= "3.9" diff --git a/requirements-min.txt b/requirements-min.txt index 9792c22bc..d762d4ecc 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -6,7 +6,7 @@ numpy==1.18 pandas==1.0.5 # when this is changed to >=1.5.0, see TODO items referenced in #762 ruamel.yaml==0.16 scipy==1.4 -linkml-runtime>=1.5.5; python_version >= "3.9" +linkml-runtime==1.5.5; python_version >= "3.9" schemasheets>=0.1.23; python_version >= "3.9" oaklib>=0.5.12; python_version >= "3.9" pyyaml>=6.0.1; python_version >= "3.9" diff --git a/requirements-opt.txt b/requirements-opt.txt index a776f7313..7353fdf60 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -1,7 +1,7 @@ # pinned dependencies that are optional. used to reproduce an entire development environment to use HDMF tqdm==4.65.0 zarr==2.14.2 -linkml-runtime>=1.5.5; python_version >= "3.9" +linkml-runtime==1.5.5; python_version >= "3.9" schemasheets>=0.1.23; python_version >= "3.9" oaklib>=0.5.12; python_version >= "3.9" pyyaml>=6.0.1; python_version >= "3.9" From 224d5f9256558d5447b568059f4d8f17a48ca26b Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 16:31:56 -0700 Subject: [PATCH 62/78] test reqs --- requirements-doc.txt | 6 +++--- requirements-min.txt | 6 +++--- requirements-opt.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/requirements-doc.txt b/requirements-doc.txt index c2a9aed80..11ca9fb97 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -5,6 +5,6 @@ sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17 sphinx-gallery sphinx-copybutton linkml-runtime==1.5.5; python_version >= "3.9" -schemasheets>=0.1.23; python_version >= "3.9" -oaklib>=0.5.12; python_version >= "3.9" -pyyaml>=6.0.1; python_version >= "3.9" +schemasheets==0.1.23; python_version >= "3.9" +oaklib==0.5.12; python_version >= "3.9" +pyyaml==6.0.1; python_version >= "3.9" diff --git a/requirements-min.txt b/requirements-min.txt index d762d4ecc..e27b12c14 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -7,8 +7,8 @@ pandas==1.0.5 # when this is changed to >=1.5.0, see TODO items referenced in # ruamel.yaml==0.16 scipy==1.4 linkml-runtime==1.5.5; python_version >= "3.9" -schemasheets>=0.1.23; python_version >= "3.9" -oaklib>=0.5.12; python_version >= "3.9" -pyyaml>=6.0.1; python_version >= "3.9" +schemasheets==0.1.23; python_version >= "3.9" +oaklib==0.5.12; python_version >= "3.9" +pyyaml==6.0.1; python_version >= "3.9" tqdm==4.41.0 zarr==2.12.0 diff --git a/requirements-opt.txt b/requirements-opt.txt index 7353fdf60..b52348e3a 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -2,6 +2,6 @@ tqdm==4.65.0 zarr==2.14.2 linkml-runtime==1.5.5; python_version >= "3.9" -schemasheets>=0.1.23; python_version >= "3.9" -oaklib>=0.5.12; python_version >= "3.9" -pyyaml>=6.0.1; python_version >= "3.9" +schemasheets==0.1.23; python_version >= "3.9" +oaklib==0.5.12; python_version >= "3.9" +pyyaml==6.0.1; python_version >= "3.9" From d091c0a62e410d073205305bd43a73d755320b5a Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 16:33:25 -0700 Subject: [PATCH 63/78] pyproject --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6315b0542..d834ea8f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ dynamic = ["version"] [project.optional-dependencies] zarr = ["zarr>=2.12.0"] tqdm = ["tqdm>=4.41.0"] -termset_reqs = ["linkml-runtime>=1.5.5; python_version >= '3.9'", +termset_reqs = ["linkml-runtime<=1.5.5; python_version >= '3.9'", "schemasheets>=0.1.23; python_version >= '3.9'", "oaklib>=0.5.12; python_version >= '3.9'", "pyyaml>=6.0.1; python_version >= '3.9'"] From 5090100e26d0cf4f8987514fd6a196816931b9ea Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 18:52:31 -0700 Subject: [PATCH 64/78] gallery --- docs/gallery/plot_term_set.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index ecd7ea4be..0071e21de 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -65,16 +65,16 @@ sys.exit(0) from hdmf.term_set import TermSet -try: - dir_path = os.path.dirname(os.path.abspath(__file__)) - yaml_file = os.path.join(dir_path, 'example_term_set.yaml') - schemasheets_folder = os.path.join(dir_path, 'schemasheets') - dynamic_schema_path = os.path.join(dir_path, 'example_dynamic_term_set.yaml') -except NameError: - dir_path = os.path.dirname(os.path.abspath('.')) - yaml_file = os.path.join(dir_path, 'gallery/example_term_set.yaml') - schemasheets_folder = os.path.join(dir_path, 'gallery/schemasheets') - dynamic_schema_path = os.path.join(dir_path, 'gallery/example_dynamic_term_set.yaml') +# try: +# dir_path = os.path.dirname(os.path.abspath(__file__)) +# yaml_file = os.path.join(dir_path, 'example_term_set.yaml') +# schemasheets_folder = os.path.join(dir_path, 'schemasheets') +# dynamic_schema_path = os.path.join(dir_path, 'example_dynamic_term_set.yaml') +# except NameError: +# dir_path = os.path.dirname(os.path.abspath('.')) +# yaml_file = os.path.join(dir_path, 'gallery/example_term_set.yaml') +# schemasheets_folder = os.path.join(dir_path, 'gallery/schemasheets') +# dynamic_schema_path = os.path.join(dir_path, 'gallery/example_dynamic_term_set.yaml') # Use Schemasheets to create TermSet schema # ----------------------------------------- @@ -83,7 +83,7 @@ # spreadsheet, the spreadsheet needs to be saved as individual tsv files, i.e., one tsv file per spreadsheet tab. Please # refer to the Schemasheets tutorial link above for more details on the required syntax structure within the sheets. # Once the tsv files are in a folder, the user simply provides the path to the folder with ``schemasheets_folder``. -termset = TermSet(schemasheets_folder=schemasheets_folder) +termset = TermSet(schemasheets_folder='docs/gallery/schemasheets') # Use Dynamic Enumerations to populate TermSet # -------------------------------------------- @@ -93,7 +93,7 @@ # Please refer to the LinkMl Dynamic Enumeration tutorial for more information on these sources and how to setup Dynamic # Enumerations within the schema. Once the schema is ready, the user provides a path to the schema and set # ``dynamic=True``. A new schema, with the populated permissible values, will be created in the same directory. -termset = TermSet(term_schema_path=dynamic_schema_path, dynamic=True) +termset = TermSet(term_schema_path='docs/gallery/example_dynamic_term_set.yaml', dynamic=True) ###################################################### # Viewing TermSet values @@ -102,7 +102,7 @@ # method will return a dictionary of all the terms and the corresponding information for each term. # Users can index specific terms from the :py:class:`~hdmf.term_set.TermSet`. LinkML runtime will need to be installed. # You can do so by first running ``pip install linkml-runtime``. -terms = TermSet(term_schema_path=yaml_file) +terms = TermSet(term_schema_path='docs/gallery/example_term_set.yaml') print(terms.view_set) # Retrieve a specific term From 661db39b7d8c6ff951ecc8f4f82766ee2c482171 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 18:59:19 -0700 Subject: [PATCH 65/78] gallery --- docs/gallery/plot_term_set.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 0071e21de..1e6d6242c 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -65,16 +65,6 @@ sys.exit(0) from hdmf.term_set import TermSet -# try: -# dir_path = os.path.dirname(os.path.abspath(__file__)) -# yaml_file = os.path.join(dir_path, 'example_term_set.yaml') -# schemasheets_folder = os.path.join(dir_path, 'schemasheets') -# dynamic_schema_path = os.path.join(dir_path, 'example_dynamic_term_set.yaml') -# except NameError: -# dir_path = os.path.dirname(os.path.abspath('.')) -# yaml_file = os.path.join(dir_path, 'gallery/example_term_set.yaml') -# schemasheets_folder = os.path.join(dir_path, 'gallery/schemasheets') -# dynamic_schema_path = os.path.join(dir_path, 'gallery/example_dynamic_term_set.yaml') # Use Schemasheets to create TermSet schema # ----------------------------------------- From ea18b4621415f374f47fb4f8ad79712c52586f80 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 19:00:31 -0700 Subject: [PATCH 66/78] gallery --- docs/gallery/plot_term_set.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 1e6d6242c..e5ae3d983 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -56,7 +56,6 @@ refer to https://linkml.io/linkml/schemas/enums.html#dynamic-enums. """ from hdmf.common import DynamicTable, VectorData -import os import sys try: From a2aaf5193513ff3e24c444bcfe9ef12639959537 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 19:24:02 -0700 Subject: [PATCH 67/78] gallery --- docs/gallery/schemasheets/{nwb_static_enums.yaml => TEMP.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/gallery/schemasheets/{nwb_static_enums.yaml => TEMP.yaml} (100%) diff --git a/docs/gallery/schemasheets/nwb_static_enums.yaml b/docs/gallery/schemasheets/TEMP.yaml similarity index 100% rename from docs/gallery/schemasheets/nwb_static_enums.yaml rename to docs/gallery/schemasheets/TEMP.yaml From eb434ff59d1d0506290b88913bf7fbbca5732838 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 19:33:10 -0700 Subject: [PATCH 68/78] gallery --- docs/gallery/plot_term_set.py | 10 +++- .../schemasheets/nwb_static_enums.yaml | 52 +++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 docs/gallery/schemasheets/nwb_static_enums.yaml diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index e5ae3d983..816711f1c 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -56,6 +56,7 @@ refer to https://linkml.io/linkml/schemas/enums.html#dynamic-enums. """ from hdmf.common import DynamicTable, VectorData +import os import sys try: @@ -64,7 +65,12 @@ sys.exit(0) from hdmf.term_set import TermSet - +try: + dir_path = os.path.dirname(os.path.abspath(__file__)) + sheets_yaml_file = os.path.join(dir_path, 'schemasheets') +except NameError: + dir_path = os.path.dirname(os.path.abspath('.')) + sheets_yaml_file = os.path.join(dir_path, 'schemasheets') # Use Schemasheets to create TermSet schema # ----------------------------------------- # The :py:class:`~hdmf.term_set.TermSet` class builds off of LinkML Schemasheets, allowing users to convert between @@ -72,7 +78,7 @@ # spreadsheet, the spreadsheet needs to be saved as individual tsv files, i.e., one tsv file per spreadsheet tab. Please # refer to the Schemasheets tutorial link above for more details on the required syntax structure within the sheets. # Once the tsv files are in a folder, the user simply provides the path to the folder with ``schemasheets_folder``. -termset = TermSet(schemasheets_folder='docs/gallery/schemasheets') +termset = TermSet(schemasheets_folder=sheets_yaml_file) # Use Dynamic Enumerations to populate TermSet # -------------------------------------------- diff --git a/docs/gallery/schemasheets/nwb_static_enums.yaml b/docs/gallery/schemasheets/nwb_static_enums.yaml new file mode 100644 index 000000000..222205959 --- /dev/null +++ b/docs/gallery/schemasheets/nwb_static_enums.yaml @@ -0,0 +1,52 @@ +classes: + BrainSample: + slot_usage: + cell_type: {} + slots: + - cell_type +default_prefix: TEMP +default_range: string +description: this schema demonstrates the use of static enums +enums: + NeuronOrGlialCellTypeEnum: + description: Enumeration to capture various cell types found in the brain. + permissible_values: + ASTROCYTE: + description: Characteristic star-shaped glial cells in the brain and spinal + cord. + meaning: CL:0000127 + INTERNEURON: + description: Neurons whose axons (and dendrites) are limited to a single brain + area. + meaning: CL:0000099 + MICROGLIAL_CELL: + description: Microglia are the resident immune cells of the brain and constantly + patrol the cerebral microenvironment to respond to pathogens and damage. + meaning: CL:0000129 + MOTOR_NEURON: + description: Neurons whose cell body is located in the motor cortex, brainstem + or the spinal cord, and whose axon (fiber) projects to the spinal cord or + outside of the spinal cord to directly or indirectly control effector organs, + mainly muscles and glands. + meaning: CL:0000100 + OLIGODENDROCYTE: + description: Type of neuroglia whose main functions are to provide support + and insulation to axons within the central nervous system (CNS) of jawed + vertebrates. + meaning: CL:0000128 + PYRAMIDAL_NEURON: + description: Neurons with a pyramidal shaped cell body (soma) and two distinct + dendritic trees. + meaning: CL:0000598 +id: https://w3id.org/linkml/examples/nwb_static_enums +imports: +- linkml:types +name: nwb_static_enums +prefixes: + CL: http://purl.obolibrary.org/obo/CL_ + TEMP: https://example.org/TEMP/ + linkml: https://w3id.org/linkml/ +slots: + cell_type: + required: true +title: static enums example From 69fa2c849bc4786df608d99fa24d9804e3cfcd57 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 19:37:37 -0700 Subject: [PATCH 69/78] gallery --- docs/gallery/plot_term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index 816711f1c..bbf5e3354 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -70,7 +70,7 @@ sheets_yaml_file = os.path.join(dir_path, 'schemasheets') except NameError: dir_path = os.path.dirname(os.path.abspath('.')) - sheets_yaml_file = os.path.join(dir_path, 'schemasheets') + sheets_yaml_file = os.path.join(dir_path, 'gallery/schemasheets') # Use Schemasheets to create TermSet schema # ----------------------------------------- # The :py:class:`~hdmf.term_set.TermSet` class builds off of LinkML Schemasheets, allowing users to convert between From f37100ebe620cff487a32e8f5f55e2ed120e7ae4 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 19:44:29 -0700 Subject: [PATCH 70/78] gallery --- docs/gallery/schemasheets/TEMP.yaml | 52 ----------------------------- 1 file changed, 52 deletions(-) delete mode 100644 docs/gallery/schemasheets/TEMP.yaml diff --git a/docs/gallery/schemasheets/TEMP.yaml b/docs/gallery/schemasheets/TEMP.yaml deleted file mode 100644 index 222205959..000000000 --- a/docs/gallery/schemasheets/TEMP.yaml +++ /dev/null @@ -1,52 +0,0 @@ -classes: - BrainSample: - slot_usage: - cell_type: {} - slots: - - cell_type -default_prefix: TEMP -default_range: string -description: this schema demonstrates the use of static enums -enums: - NeuronOrGlialCellTypeEnum: - description: Enumeration to capture various cell types found in the brain. - permissible_values: - ASTROCYTE: - description: Characteristic star-shaped glial cells in the brain and spinal - cord. - meaning: CL:0000127 - INTERNEURON: - description: Neurons whose axons (and dendrites) are limited to a single brain - area. - meaning: CL:0000099 - MICROGLIAL_CELL: - description: Microglia are the resident immune cells of the brain and constantly - patrol the cerebral microenvironment to respond to pathogens and damage. - meaning: CL:0000129 - MOTOR_NEURON: - description: Neurons whose cell body is located in the motor cortex, brainstem - or the spinal cord, and whose axon (fiber) projects to the spinal cord or - outside of the spinal cord to directly or indirectly control effector organs, - mainly muscles and glands. - meaning: CL:0000100 - OLIGODENDROCYTE: - description: Type of neuroglia whose main functions are to provide support - and insulation to axons within the central nervous system (CNS) of jawed - vertebrates. - meaning: CL:0000128 - PYRAMIDAL_NEURON: - description: Neurons with a pyramidal shaped cell body (soma) and two distinct - dendritic trees. - meaning: CL:0000598 -id: https://w3id.org/linkml/examples/nwb_static_enums -imports: -- linkml:types -name: nwb_static_enums -prefixes: - CL: http://purl.obolibrary.org/obo/CL_ - TEMP: https://example.org/TEMP/ - linkml: https://w3id.org/linkml/ -slots: - cell_type: - required: true -title: static enums example From 75db024fd625a1eb65f61789532b96a9a720cfff Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 19:52:03 -0700 Subject: [PATCH 71/78] revert --- docs/gallery/plot_term_set.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index bbf5e3354..ecd7ea4be 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -67,10 +67,15 @@ try: dir_path = os.path.dirname(os.path.abspath(__file__)) - sheets_yaml_file = os.path.join(dir_path, 'schemasheets') + yaml_file = os.path.join(dir_path, 'example_term_set.yaml') + schemasheets_folder = os.path.join(dir_path, 'schemasheets') + dynamic_schema_path = os.path.join(dir_path, 'example_dynamic_term_set.yaml') except NameError: dir_path = os.path.dirname(os.path.abspath('.')) - sheets_yaml_file = os.path.join(dir_path, 'gallery/schemasheets') + yaml_file = os.path.join(dir_path, 'gallery/example_term_set.yaml') + schemasheets_folder = os.path.join(dir_path, 'gallery/schemasheets') + dynamic_schema_path = os.path.join(dir_path, 'gallery/example_dynamic_term_set.yaml') + # Use Schemasheets to create TermSet schema # ----------------------------------------- # The :py:class:`~hdmf.term_set.TermSet` class builds off of LinkML Schemasheets, allowing users to convert between @@ -78,7 +83,7 @@ # spreadsheet, the spreadsheet needs to be saved as individual tsv files, i.e., one tsv file per spreadsheet tab. Please # refer to the Schemasheets tutorial link above for more details on the required syntax structure within the sheets. # Once the tsv files are in a folder, the user simply provides the path to the folder with ``schemasheets_folder``. -termset = TermSet(schemasheets_folder=sheets_yaml_file) +termset = TermSet(schemasheets_folder=schemasheets_folder) # Use Dynamic Enumerations to populate TermSet # -------------------------------------------- @@ -88,7 +93,7 @@ # Please refer to the LinkMl Dynamic Enumeration tutorial for more information on these sources and how to setup Dynamic # Enumerations within the schema. Once the schema is ready, the user provides a path to the schema and set # ``dynamic=True``. A new schema, with the populated permissible values, will be created in the same directory. -termset = TermSet(term_schema_path='docs/gallery/example_dynamic_term_set.yaml', dynamic=True) +termset = TermSet(term_schema_path=dynamic_schema_path, dynamic=True) ###################################################### # Viewing TermSet values @@ -97,7 +102,7 @@ # method will return a dictionary of all the terms and the corresponding information for each term. # Users can index specific terms from the :py:class:`~hdmf.term_set.TermSet`. LinkML runtime will need to be installed. # You can do so by first running ``pip install linkml-runtime``. -terms = TermSet(term_schema_path='docs/gallery/example_term_set.yaml') +terms = TermSet(term_schema_path=yaml_file) print(terms.view_set) # Retrieve a specific term From 8357c822a49108773985f12a32b69c92948ee33a Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sat, 12 Aug 2023 20:02:33 -0700 Subject: [PATCH 72/78] dynamic document clarify --- src/hdmf/term_set.py | 4 +- .../expanded_example_dynamic_term_set.yaml | 2073 +++++++++++++++++ 2 files changed, 2076 insertions(+), 1 deletion(-) create mode 100644 tests/unit/expanded_example_dynamic_term_set.yaml diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 9603d36f3..0cfe43b65 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -40,12 +40,14 @@ def __init__(self, self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) - self.sources = self.view.schema.prefixes if dynamic: + # reset view to now include the dynamically populated term_set self.expanded_term_set_path = self.enum_expander() self.view = SchemaView(self.expanded_term_set_path) + self.sources = self.view.schema.prefixes + def __repr__(self): re = "class: %s\n" % str(self.__class__) re += "term_schema_path: %s\n" % self.term_schema_path diff --git a/tests/unit/expanded_example_dynamic_term_set.yaml b/tests/unit/expanded_example_dynamic_term_set.yaml new file mode 100644 index 000000000..a2631696a --- /dev/null +++ b/tests/unit/expanded_example_dynamic_term_set.yaml @@ -0,0 +1,2073 @@ +id: https://w3id.org/linkml/examples/nwb_dynamic_enums +title: dynamic enums example +name: nwb_dynamic_enums +description: this schema demonstrates the use of dynamic enums + +prefixes: + linkml: https://w3id.org/linkml/ + CL: http://purl.obolibrary.org/obo/CL_ + +imports: +- linkml:types + +default_range: string + +# ======================== # +# CLASSES # +# ======================== # +classes: + BrainSample: + slots: + - cell_type + +# ======================== # +# SLOTS # +# ======================== # +slots: + cell_type: + required: true + range: NeuronTypeEnum + +# ======================== # +# ENUMS # +# ======================== # +enums: + NeuronTypeEnum: + reachable_from: + source_ontology: obo:cl + source_nodes: + - CL:0000540 ## neuron + include_self: false + relationship_types: + - rdfs:subClassOf + permissible_values: + CL:0000705: + text: CL:0000705 + description: R6 photoreceptor cell + meaning: CL:0000705 + CL:4023108: + text: CL:4023108 + description: oxytocin-secreting magnocellular cell + meaning: CL:4023108 + CL:0004240: + text: CL:0004240 + description: WF1 amacrine cell + meaning: CL:0004240 + CL:0004242: + text: CL:0004242 + description: WF3-1 amacrine cell + meaning: CL:0004242 + CL:1000380: + text: CL:1000380 + description: type 1 vestibular sensory cell of epithelium of macula of saccule + of membranous labyrinth + meaning: CL:1000380 + CL:4023128: + text: CL:4023128 + description: rostral periventricular region of the third ventricle KNDy neuron + meaning: CL:4023128 + CL:0003020: + text: CL:0003020 + description: retinal ganglion cell C outer + meaning: CL:0003020 + CL:4023094: + text: CL:4023094 + description: tufted pyramidal neuron + meaning: CL:4023094 + CL:4023057: + text: CL:4023057 + description: cerebellar inhibitory GABAergic interneuron + meaning: CL:4023057 + CL:2000049: + text: CL:2000049 + description: primary motor cortex pyramidal cell + meaning: CL:2000049 + CL:0000119: + text: CL:0000119 + description: cerebellar Golgi cell + meaning: CL:0000119 + CL:0004227: + text: CL:0004227 + description: flat bistratified amacrine cell + meaning: CL:0004227 + CL:1000606: + text: CL:1000606 + description: kidney nerve cell + meaning: CL:1000606 + CL:1001582: + text: CL:1001582 + description: lateral ventricle neuron + meaning: CL:1001582 + CL:0000165: + text: CL:0000165 + description: neuroendocrine cell + meaning: CL:0000165 + CL:0000555: + text: CL:0000555 + description: neuronal brush cell + meaning: CL:0000555 + CL:0004231: + text: CL:0004231 + description: recurving diffuse amacrine cell + meaning: CL:0004231 + CL:0000687: + text: CL:0000687 + description: R1 photoreceptor cell + meaning: CL:0000687 + CL:0001031: + text: CL:0001031 + description: cerebellar granule cell + meaning: CL:0001031 + CL:0003026: + text: CL:0003026 + description: retinal ganglion cell D1 + meaning: CL:0003026 + CL:4033035: + text: CL:4033035 + description: giant bipolar cell + meaning: CL:4033035 + CL:4023009: + text: CL:4023009 + description: extratelencephalic-projecting glutamatergic cortical neuron + meaning: CL:4023009 + CL:0010022: + text: CL:0010022 + description: cardiac neuron + meaning: CL:0010022 + CL:0000287: + text: CL:0000287 + description: eye photoreceptor cell + meaning: CL:0000287 + CL:0000488: + text: CL:0000488 + description: visible light photoreceptor cell + meaning: CL:0000488 + CL:0003046: + text: CL:0003046 + description: M13 retinal ganglion cell + meaning: CL:0003046 + CL:4023169: + text: CL:4023169 + description: trigeminal neuron + meaning: CL:4023169 + CL:0005007: + text: CL:0005007 + description: Kolmer-Agduhr neuron + meaning: CL:0005007 + CL:0005008: + text: CL:0005008 + description: macular hair cell + meaning: CL:0005008 + CL:4023027: + text: CL:4023027 + description: L5 T-Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023027 + CL:4033032: + text: CL:4033032 + description: diffuse bipolar 6 cell + meaning: CL:4033032 + CL:0008021: + text: CL:0008021 + description: anterior lateral line ganglion neuron + meaning: CL:0008021 + CL:4023028: + text: CL:4023028 + description: L5 non-Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023028 + CL:4023063: + text: CL:4023063 + description: medial ganglionic eminence derived interneuron + meaning: CL:4023063 + CL:4023032: + text: CL:4023032 + description: ON retinal ganglion cell + meaning: CL:4023032 + CL:0003039: + text: CL:0003039 + description: M8 retinal ganglion cell + meaning: CL:0003039 + CL:0000757: + text: CL:0000757 + description: type 5 cone bipolar cell (sensu Mus) + meaning: CL:0000757 + CL:0000609: + text: CL:0000609 + description: vestibular hair cell + meaning: CL:0000609 + CL:0004219: + text: CL:0004219 + description: A2 amacrine cell + meaning: CL:0004219 + CL:4030028: + text: CL:4030028 + description: glycinergic amacrine cell + meaning: CL:4030028 + CL:0002450: + text: CL:0002450 + description: tether cell + meaning: CL:0002450 + CL:0002374: + text: CL:0002374 + description: ear hair cell + meaning: CL:0002374 + CL:0004124: + text: CL:0004124 + description: retinal ganglion cell C1 + meaning: CL:0004124 + CL:0004115: + text: CL:0004115 + description: retinal ganglion cell B + meaning: CL:0004115 + CL:1000384: + text: CL:1000384 + description: type 2 vestibular sensory cell of epithelium of macula of saccule + of membranous labyrinth + meaning: CL:1000384 + CL:2000037: + text: CL:2000037 + description: posterior lateral line neuromast hair cell + meaning: CL:2000037 + CL:0000673: + text: CL:0000673 + description: Kenyon cell + meaning: CL:0000673 + CL:4023052: + text: CL:4023052 + description: Betz upper motor neuron + meaning: CL:4023052 + CL:0004243: + text: CL:0004243 + description: WF3-2 amacrine cell + meaning: CL:0004243 + CL:1000222: + text: CL:1000222 + description: stomach neuroendocrine cell + meaning: CL:1000222 + CL:0002310: + text: CL:0002310 + description: mammosomatotroph + meaning: CL:0002310 + CL:4023066: + text: CL:4023066 + description: horizontal pyramidal neuron + meaning: CL:4023066 + CL:0000379: + text: CL:0000379 + description: sensory processing neuron + meaning: CL:0000379 + CL:0011006: + text: CL:0011006 + description: Lugaro cell + meaning: CL:0011006 + CL:0004216: + text: CL:0004216 + description: type 5b cone bipolar cell + meaning: CL:0004216 + CL:0004126: + text: CL:0004126 + description: retinal ganglion cell C2 outer + meaning: CL:0004126 + CL:0000108: + text: CL:0000108 + description: cholinergic neuron + meaning: CL:0000108 + CL:0011103: + text: CL:0011103 + description: sympathetic neuron + meaning: CL:0011103 + CL:4023107: + text: CL:4023107 + description: reticulospinal neuron + meaning: CL:4023107 + CL:4023002: + text: CL:4023002 + description: dynamic beta motor neuron + meaning: CL:4023002 + CL:4030048: + text: CL:4030048 + description: striosomal D1 medium spiny neuron + meaning: CL:4030048 + CL:4023163: + text: CL:4023163 + description: spherical bushy cell + meaning: CL:4023163 + CL:4023061: + text: CL:4023061 + description: hippocampal CA4 neuron + meaning: CL:4023061 + CL:0000532: + text: CL:0000532 + description: CAP motoneuron + meaning: CL:0000532 + CL:0000526: + text: CL:0000526 + description: afferent neuron + meaning: CL:0000526 + CL:0003003: + text: CL:0003003 + description: G2 retinal ganglion cell + meaning: CL:0003003 + CL:0000530: + text: CL:0000530 + description: primary neuron (sensu Teleostei) + meaning: CL:0000530 + CL:4023045: + text: CL:4023045 + description: medulla-projecting glutamatergic neuron of the primary motor + cortex + meaning: CL:4023045 + CL:3000004: + text: CL:3000004 + description: peripheral sensory neuron + meaning: CL:3000004 + CL:0000544: + text: CL:0000544 + description: slowly adapting mechanoreceptor cell + meaning: CL:0000544 + CL:4030047: + text: CL:4030047 + description: matrix D2 medium spiny neuron + meaning: CL:4030047 + CL:0004220: + text: CL:0004220 + description: flag amacrine cell + meaning: CL:0004220 + CL:4023125: + text: CL:4023125 + description: KNDy neuron + meaning: CL:4023125 + CL:0004228: + text: CL:0004228 + description: broad diffuse amacrine cell + meaning: CL:0004228 + CL:4023122: + text: CL:4023122 + description: oxytocin receptor sst GABAergic cortical interneuron + meaning: CL:4023122 + CL:1000379: + text: CL:1000379 + description: type 1 vestibular sensory cell of epithelium of macula of utricle + of membranous labyrinth + meaning: CL:1000379 + CL:0011111: + text: CL:0011111 + description: gonadotropin-releasing hormone neuron + meaning: CL:0011111 + CL:0003042: + text: CL:0003042 + description: M9-OFF retinal ganglion cell + meaning: CL:0003042 + CL:0003030: + text: CL:0003030 + description: M3 retinal ganglion cell + meaning: CL:0003030 + CL:0003011: + text: CL:0003011 + description: G8 retinal ganglion cell + meaning: CL:0003011 + CL:0000202: + text: CL:0000202 + description: auditory hair cell + meaning: CL:0000202 + CL:0002271: + text: CL:0002271 + description: type EC1 enteroendocrine cell + meaning: CL:0002271 + CL:4023013: + text: CL:4023013 + description: corticothalamic-projecting glutamatergic cortical neuron + meaning: CL:4023013 + CL:4023114: + text: CL:4023114 + description: calyx vestibular afferent neuron + meaning: CL:4023114 + CL:0003045: + text: CL:0003045 + description: M12 retinal ganglion cell + meaning: CL:0003045 + CL:0002487: + text: CL:0002487 + description: cutaneous/subcutaneous mechanoreceptor cell + meaning: CL:0002487 + CL:4030053: + text: CL:4030053 + description: Island of Calleja granule cell + meaning: CL:4030053 + CL:0000490: + text: CL:0000490 + description: photopic photoreceptor cell + meaning: CL:0000490 + CL:2000023: + text: CL:2000023 + description: spinal cord ventral column interneuron + meaning: CL:2000023 + CL:1000381: + text: CL:1000381 + description: type 1 vestibular sensory cell of epithelium of crista of ampulla + of semicircular duct of membranous labyrinth + meaning: CL:1000381 + CL:0003013: + text: CL:0003013 + description: G10 retinal ganglion cell + meaning: CL:0003013 + CL:0000602: + text: CL:0000602 + description: pressoreceptor cell + meaning: CL:0000602 + CL:4023039: + text: CL:4023039 + description: amygdala excitatory neuron + meaning: CL:4023039 + CL:4030043: + text: CL:4030043 + description: matrix D1 medium spiny neuron + meaning: CL:4030043 + CL:0000105: + text: CL:0000105 + description: pseudounipolar neuron + meaning: CL:0000105 + CL:0004137: + text: CL:0004137 + description: retinal ganglion cell A2 inner + meaning: CL:0004137 + CL:1001436: + text: CL:1001436 + description: hair-tylotrich neuron + meaning: CL:1001436 + CL:1001503: + text: CL:1001503 + description: olfactory bulb tufted cell + meaning: CL:1001503 + CL:0000406: + text: CL:0000406 + description: CNS short range interneuron + meaning: CL:0000406 + CL:2000087: + text: CL:2000087 + description: dentate gyrus of hippocampal formation basket cell + meaning: CL:2000087 + CL:0000534: + text: CL:0000534 + description: primary interneuron (sensu Teleostei) + meaning: CL:0000534 + CL:0000246: + text: CL:0000246 + description: Mauthner neuron + meaning: CL:0000246 + CL:0003027: + text: CL:0003027 + description: retinal ganglion cell D2 + meaning: CL:0003027 + CL:0000752: + text: CL:0000752 + description: cone retinal bipolar cell + meaning: CL:0000752 + CL:0000410: + text: CL:0000410 + description: CNS long range interneuron + meaning: CL:0000410 + CL:0009000: + text: CL:0009000 + description: sensory neuron of spinal nerve + meaning: CL:0009000 + CL:0000754: + text: CL:0000754 + description: type 2 cone bipolar cell (sensu Mus) + meaning: CL:0000754 + CL:0002309: + text: CL:0002309 + description: corticotroph + meaning: CL:0002309 + CL:0010009: + text: CL:0010009 + description: camera-type eye photoreceptor cell + meaning: CL:0010009 + CL:4023069: + text: CL:4023069 + description: medial ganglionic eminence derived GABAergic cortical interneuron + meaning: CL:4023069 + CL:0000102: + text: CL:0000102 + description: polymodal neuron + meaning: CL:0000102 + CL:0000694: + text: CL:0000694 + description: R3 photoreceptor cell + meaning: CL:0000694 + CL:0004183: + text: CL:0004183 + description: retinal ganglion cell B3 + meaning: CL:0004183 + CL:0000693: + text: CL:0000693 + description: neurogliaform cell + meaning: CL:0000693 + CL:0000760: + text: CL:0000760 + description: type 8 cone bipolar cell (sensu Mus) + meaning: CL:0000760 + CL:4023001: + text: CL:4023001 + description: static beta motor neuron + meaning: CL:4023001 + CL:1000424: + text: CL:1000424 + description: chromaffin cell of paraaortic body + meaning: CL:1000424 + CL:0000120: + text: CL:0000120 + description: granule cell + meaning: CL:0000120 + CL:0002312: + text: CL:0002312 + description: somatotroph + meaning: CL:0002312 + CL:0000107: + text: CL:0000107 + description: autonomic neuron + meaning: CL:0000107 + CL:2000047: + text: CL:2000047 + description: brainstem motor neuron + meaning: CL:2000047 + CL:4023080: + text: CL:4023080 + description: stellate L6 intratelencephalic projecting glutamatergic neuron + of the primary motor cortex (Mmus) + meaning: CL:4023080 + CL:0000848: + text: CL:0000848 + description: microvillous olfactory receptor neuron + meaning: CL:0000848 + CL:0004213: + text: CL:0004213 + description: type 3a cone bipolar cell + meaning: CL:0004213 + CL:0000116: + text: CL:0000116 + description: pioneer neuron + meaning: CL:0000116 + CL:4023187: + text: CL:4023187 + description: koniocellular cell + meaning: CL:4023187 + CL:4023116: + text: CL:4023116 + description: type 2 spiral ganglion neuron + meaning: CL:4023116 + CL:0008015: + text: CL:0008015 + description: inhibitory motor neuron + meaning: CL:0008015 + CL:0003048: + text: CL:0003048 + description: L cone cell + meaning: CL:0003048 + CL:1000082: + text: CL:1000082 + description: stretch receptor cell + meaning: CL:1000082 + CL:0003031: + text: CL:0003031 + description: M3-ON retinal ganglion cell + meaning: CL:0003031 + CL:1001474: + text: CL:1001474 + description: medium spiny neuron + meaning: CL:1001474 + CL:0000745: + text: CL:0000745 + description: retina horizontal cell + meaning: CL:0000745 + CL:0002515: + text: CL:0002515 + description: interrenal norepinephrine type cell + meaning: CL:0002515 + CL:2000027: + text: CL:2000027 + description: cerebellum basket cell + meaning: CL:2000027 + CL:0004225: + text: CL:0004225 + description: spider amacrine cell + meaning: CL:0004225 + CL:4023031: + text: CL:4023031 + description: L4 sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023031 + CL:0008038: + text: CL:0008038 + description: alpha motor neuron + meaning: CL:0008038 + CL:4033030: + text: CL:4033030 + description: diffuse bipolar 3b cell + meaning: CL:4033030 + CL:0000336: + text: CL:0000336 + description: adrenal medulla chromaffin cell + meaning: CL:0000336 + CL:0000751: + text: CL:0000751 + description: rod bipolar cell + meaning: CL:0000751 + CL:0008037: + text: CL:0008037 + description: gamma motor neuron + meaning: CL:0008037 + CL:0003028: + text: CL:0003028 + description: M1 retinal ganglion cell + meaning: CL:0003028 + CL:0003016: + text: CL:0003016 + description: G11-OFF retinal ganglion cell + meaning: CL:0003016 + CL:0004239: + text: CL:0004239 + description: wavy bistratified amacrine cell + meaning: CL:0004239 + CL:4023168: + text: CL:4023168 + description: somatosensory neuron + meaning: CL:4023168 + CL:4023018: + text: CL:4023018 + description: pvalb GABAergic cortical interneuron + meaning: CL:4023018 + CL:0004138: + text: CL:0004138 + description: retinal ganglion cell A2 + meaning: CL:0004138 + CL:0000750: + text: CL:0000750 + description: OFF-bipolar cell + meaning: CL:0000750 + CL:0000709: + text: CL:0000709 + description: R8 photoreceptor cell + meaning: CL:0000709 + CL:0004214: + text: CL:0004214 + description: type 3b cone bipolar cell + meaning: CL:0004214 + CL:0003047: + text: CL:0003047 + description: M14 retinal ganglion cell + meaning: CL:0003047 + CL:0015000: + text: CL:0015000 + description: cranial motor neuron + meaning: CL:0015000 + CL:0003036: + text: CL:0003036 + description: M7 retinal ganglion cell + meaning: CL:0003036 + CL:0000397: + text: CL:0000397 + description: ganglion interneuron + meaning: CL:0000397 + CL:1001509: + text: CL:1001509 + description: glycinergic neuron + meaning: CL:1001509 + CL:4023038: + text: CL:4023038 + description: L6b glutamatergic cortical neuron + meaning: CL:4023038 + CL:0000112: + text: CL:0000112 + description: columnar neuron + meaning: CL:0000112 + CL:0002517: + text: CL:0002517 + description: interrenal epinephrin secreting cell + meaning: CL:0002517 + CL:1000383: + text: CL:1000383 + description: type 2 vestibular sensory cell of epithelium of macula of utricle + of membranous labyrinth + meaning: CL:1000383 + CL:0004116: + text: CL:0004116 + description: retinal ganglion cell C + meaning: CL:0004116 + CL:4023113: + text: CL:4023113 + description: bouton vestibular afferent neuron + meaning: CL:4023113 + CL:0003034: + text: CL:0003034 + description: M5 retinal ganglion cell + meaning: CL:0003034 + CL:0011005: + text: CL:0011005 + description: GABAergic interneuron + meaning: CL:0011005 + CL:0011105: + text: CL:0011105 + description: dopamanergic interplexiform cell + meaning: CL:0011105 + CL:0000749: + text: CL:0000749 + description: ON-bipolar cell + meaning: CL:0000749 + CL:0000498: + text: CL:0000498 + description: inhibitory interneuron + meaning: CL:0000498 + CL:4023071: + text: CL:4023071 + description: L5/6 cck cortical GABAergic interneuron (Mmus) + meaning: CL:4023071 + CL:1000245: + text: CL:1000245 + description: posterior lateral line ganglion neuron + meaning: CL:1000245 + CL:0004139: + text: CL:0004139 + description: retinal ganglion cell A2 outer + meaning: CL:0004139 + CL:0000531: + text: CL:0000531 + description: primary sensory neuron (sensu Teleostei) + meaning: CL:0000531 + CL:0004125: + text: CL:0004125 + description: retinal ganglion cell C2 inner + meaning: CL:0004125 + CL:4023064: + text: CL:4023064 + description: caudal ganglionic eminence derived interneuron + meaning: CL:4023064 + CL:4030049: + text: CL:4030049 + description: striosomal D2 medium spiny neuron + meaning: CL:4030049 + CL:0017002: + text: CL:0017002 + description: prostate neuroendocrine cell + meaning: CL:0017002 + CL:0000756: + text: CL:0000756 + description: type 4 cone bipolar cell (sensu Mus) + meaning: CL:0000756 + CL:0000707: + text: CL:0000707 + description: R7 photoreceptor cell + meaning: CL:0000707 + CL:0000700: + text: CL:0000700 + description: dopaminergic neuron + meaning: CL:0000700 + CL:0003002: + text: CL:0003002 + description: G1 retinal ganglion cell + meaning: CL:0003002 + CL:1000001: + text: CL:1000001 + description: retrotrapezoid nucleus neuron + meaning: CL:1000001 + CL:4023007: + text: CL:4023007 + description: L2/3 bipolar vip GABAergic cortical interneuron (Mmus) + meaning: CL:4023007 + CL:0000528: + text: CL:0000528 + description: nitrergic neuron + meaning: CL:0000528 + CL:0000639: + text: CL:0000639 + description: basophil cell of pars distalis of adenohypophysis + meaning: CL:0000639 + CL:0000849: + text: CL:0000849 + description: crypt olfactory receptor neuron + meaning: CL:0000849 + CL:0011110: + text: CL:0011110 + description: histaminergic neuron + meaning: CL:0011110 + CL:0005025: + text: CL:0005025 + description: visceromotor neuron + meaning: CL:0005025 + CL:0003001: + text: CL:0003001 + description: bistratified retinal ganglion cell + meaning: CL:0003001 + CL:0004241: + text: CL:0004241 + description: WF2 amacrine cell + meaning: CL:0004241 + CL:4023019: + text: CL:4023019 + description: L5/6 cck, vip cortical GABAergic interneuron (Mmus) + meaning: CL:4023019 + CL:4023040: + text: CL:4023040 + description: L2/3-6 intratelencephalic projecting glutamatergic cortical neuron + meaning: CL:4023040 + CL:1001435: + text: CL:1001435 + description: periglomerular cell + meaning: CL:1001435 + CL:4023127: + text: CL:4023127 + description: arcuate nucleus of hypothalamus KNDy neuron + meaning: CL:4023127 + CL:0003007: + text: CL:0003007 + description: G4-OFF retinal ganglion cell + meaning: CL:0003007 + CL:0000101: + text: CL:0000101 + description: sensory neuron + meaning: CL:0000101 + CL:2000097: + text: CL:2000097 + description: midbrain dopaminergic neuron + meaning: CL:2000097 + CL:4023095: + text: CL:4023095 + description: untufted pyramidal neuron + meaning: CL:4023095 + CL:0003004: + text: CL:0003004 + description: G3 retinal ganglion cell + meaning: CL:0003004 + CL:0000527: + text: CL:0000527 + description: efferent neuron + meaning: CL:0000527 + CL:1000382: + text: CL:1000382 + description: type 2 vestibular sensory cell of stato-acoustic epithelium + meaning: CL:1000382 + CL:4033019: + text: CL:4033019 + description: ON-blue cone bipolar cell + meaning: CL:4033019 + CL:0000589: + text: CL:0000589 + description: cochlear inner hair cell + meaning: CL:0000589 + CL:4023160: + text: CL:4023160 + description: cartwheel cell + meaning: CL:4023160 + CL:1001437: + text: CL:1001437 + description: hair-down neuron + meaning: CL:1001437 + CL:0011102: + text: CL:0011102 + description: parasympathetic neuron + meaning: CL:0011102 + CL:2000029: + text: CL:2000029 + description: central nervous system neuron + meaning: CL:2000029 + CL:4023115: + text: CL:4023115 + description: type 1 spiral ganglion neuron + meaning: CL:4023115 + CL:0002311: + text: CL:0002311 + description: mammotroph + meaning: CL:0002311 + CL:0003025: + text: CL:0003025 + description: retinal ganglion cell C3 + meaning: CL:0003025 + CL:4030050: + text: CL:4030050 + description: D1/D2-hybrid medium spiny neuron + meaning: CL:4030050 + CL:4023118: + text: CL:4023118 + description: L5/6 non-Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023118 + CL:4023110: + text: CL:4023110 + description: amygdala pyramidal neuron + meaning: CL:4023110 + CL:0002273: + text: CL:0002273 + description: type ECL enteroendocrine cell + meaning: CL:0002273 + CL:0003050: + text: CL:0003050 + description: S cone cell + meaning: CL:0003050 + CL:4023121: + text: CL:4023121 + description: sst chodl GABAergic cortical interneuron + meaning: CL:4023121 + CL:4023020: + text: CL:4023020 + description: dynamic gamma motor neuron + meaning: CL:4023020 + CL:0004246: + text: CL:0004246 + description: monostratified cell + meaning: CL:0004246 + CL:0000495: + text: CL:0000495 + description: blue sensitive photoreceptor cell + meaning: CL:0000495 + CL:0000029: + text: CL:0000029 + description: neural crest derived neuron + meaning: CL:0000029 + CL:0004001: + text: CL:0004001 + description: local interneuron + meaning: CL:0004001 + CL:0000551: + text: CL:0000551 + description: unimodal nocireceptor + meaning: CL:0000551 + CL:0003006: + text: CL:0003006 + description: G4-ON retinal ganglion cell + meaning: CL:0003006 + CL:4023011: + text: CL:4023011 + description: lamp5 GABAergic cortical interneuron + meaning: CL:4023011 + CL:4023109: + text: CL:4023109 + description: vasopressin-secreting magnocellular cell + meaning: CL:4023109 + CL:0000121: + text: CL:0000121 + description: Purkinje cell + meaning: CL:0000121 + CL:0000678: + text: CL:0000678 + description: commissural neuron + meaning: CL:0000678 + CL:0004252: + text: CL:0004252 + description: medium field retinal amacrine cell + meaning: CL:0004252 + CL:0000103: + text: CL:0000103 + description: bipolar neuron + meaning: CL:0000103 + CL:4033036: + text: CL:4033036 + description: OFFx cell + meaning: CL:4033036 + CL:4023014: + text: CL:4023014 + description: L5 vip cortical GABAergic interneuron (Mmus) + meaning: CL:4023014 + CL:0008031: + text: CL:0008031 + description: cortical interneuron + meaning: CL:0008031 + CL:0008010: + text: CL:0008010 + description: cranial somatomotor neuron + meaning: CL:0008010 + CL:0000637: + text: CL:0000637 + description: chromophil cell of anterior pituitary gland + meaning: CL:0000637 + CL:0003014: + text: CL:0003014 + description: G11 retinal ganglion cell + meaning: CL:0003014 + CL:4033029: + text: CL:4033029 + description: diffuse bipolar 3a cell + meaning: CL:4033029 + CL:0002611: + text: CL:0002611 + description: neuron of the dorsal spinal cord + meaning: CL:0002611 + CL:0010010: + text: CL:0010010 + description: cerebellar stellate cell + meaning: CL:0010010 + CL:1000465: + text: CL:1000465 + description: chromaffin cell of ovary + meaning: CL:1000465 + CL:0000761: + text: CL:0000761 + description: type 9 cone bipolar cell (sensu Mus) + meaning: CL:0000761 + CL:0004226: + text: CL:0004226 + description: monostratified amacrine cell + meaning: CL:0004226 + CL:0004253: + text: CL:0004253 + description: wide field retinal amacrine cell + meaning: CL:0004253 + CL:4023075: + text: CL:4023075 + description: L6 tyrosine hydroxylase sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023075 + CL:4023068: + text: CL:4023068 + description: thalamic excitatory neuron + meaning: CL:4023068 + CL:1000377: + text: CL:1000377 + description: dense-core granulated cell of epithelium of trachea + meaning: CL:1000377 + CL:4023089: + text: CL:4023089 + description: nest basket cell + meaning: CL:4023089 + CL:4023189: + text: CL:4023189 + description: parasol ganglion cell of retina + meaning: CL:4023189 + CL:0000856: + text: CL:0000856 + description: neuromast hair cell + meaning: CL:0000856 + CL:4023025: + text: CL:4023025 + description: long-range projecting sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023025 + CL:0003043: + text: CL:0003043 + description: M10 retinal ganglion cell + meaning: CL:0003043 + CL:4023000: + text: CL:4023000 + description: beta motor neuron + meaning: CL:4023000 + CL:4023048: + text: CL:4023048 + description: L4/5 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023048 + CL:0000855: + text: CL:0000855 + description: sensory hair cell + meaning: CL:0000855 + CL:4023070: + text: CL:4023070 + description: caudal ganglionic eminence derived GABAergic cortical interneuron + meaning: CL:4023070 + CL:0002070: + text: CL:0002070 + description: type I vestibular sensory cell + meaning: CL:0002070 + CL:2000028: + text: CL:2000028 + description: cerebellum glutamatergic neuron + meaning: CL:2000028 + CL:0000533: + text: CL:0000533 + description: primary motor neuron (sensu Teleostei) + meaning: CL:0000533 + CL:4023083: + text: CL:4023083 + description: chandelier cell + meaning: CL:4023083 + CL:2000034: + text: CL:2000034 + description: anterior lateral line neuromast hair cell + meaning: CL:2000034 + CL:0003015: + text: CL:0003015 + description: G11-ON retinal ganglion cell + meaning: CL:0003015 + CL:0000204: + text: CL:0000204 + description: acceleration receptive cell + meaning: CL:0000204 + CL:4033031: + text: CL:4033031 + description: diffuse bipolar 4 cell + meaning: CL:4033031 + CL:0003024: + text: CL:0003024 + description: retinal ganglion cell C inner + meaning: CL:0003024 + CL:4023074: + text: CL:4023074 + description: mammillary body neuron + meaning: CL:4023074 + CL:2000089: + text: CL:2000089 + description: dentate gyrus granule cell + meaning: CL:2000089 + CL:4033028: + text: CL:4033028 + description: diffuse bipolar 2 cell + meaning: CL:4033028 + CL:0000110: + text: CL:0000110 + description: peptidergic neuron + meaning: CL:0000110 + CL:4033002: + text: CL:4033002 + description: neuroendocrine cell of epithelium of crypt of Lieberkuhn + meaning: CL:4033002 + CL:4033027: + text: CL:4033027 + description: diffuse bipolar 1 cell + meaning: CL:4033027 + CL:3000003: + text: CL:3000003 + description: sympathetic cholinergic neuron + meaning: CL:3000003 + CL:4023158: + text: CL:4023158 + description: octopus cell of the mammalian cochlear nucleus + meaning: CL:4023158 + CL:0000118: + text: CL:0000118 + description: basket cell + meaning: CL:0000118 + CL:0004223: + text: CL:0004223 + description: AB diffuse-1 amacrine cell + meaning: CL:0004223 + CL:4030054: + text: CL:4030054 + description: RXFP1-positive interface island D1-medium spiny neuron + meaning: CL:4030054 + CL:0002610: + text: CL:0002610 + description: raphe nuclei neuron + meaning: CL:0002610 + CL:4023026: + text: CL:4023026 + description: direct pathway medium spiny neuron + meaning: CL:4023026 + CL:4023016: + text: CL:4023016 + description: vip GABAergic cortical interneuron + meaning: CL:4023016 + CL:0004237: + text: CL:0004237 + description: fountain amacrine cell + meaning: CL:0004237 + CL:0003035: + text: CL:0003035 + description: M6 retinal ganglion cell + meaning: CL:0003035 + CL:1001611: + text: CL:1001611 + description: cerebellar neuron + meaning: CL:1001611 + CL:0000591: + text: CL:0000591 + description: warmth sensing thermoreceptor cell + meaning: CL:0000591 + CL:0002613: + text: CL:0002613 + description: striatum neuron + meaning: CL:0002613 + CL:0000496: + text: CL:0000496 + description: green sensitive photoreceptor cell + meaning: CL:0000496 + CL:0007011: + text: CL:0007011 + description: enteric neuron + meaning: CL:0007011 + CL:2000056: + text: CL:2000056 + description: Meynert cell + meaning: CL:2000056 + CL:0003040: + text: CL:0003040 + description: M9 retinal ganglion cell + meaning: CL:0003040 + CL:0004250: + text: CL:0004250 + description: bistratified retinal amacrine cell + meaning: CL:0004250 + CL:0003029: + text: CL:0003029 + description: M2 retinal ganglion cell + meaning: CL:0003029 + CL:4023017: + text: CL:4023017 + description: sst GABAergic cortical interneuron + meaning: CL:4023017 + CL:0008028: + text: CL:0008028 + description: visual system neuron + meaning: CL:0008028 + CL:0008039: + text: CL:0008039 + description: lower motor neuron + meaning: CL:0008039 + CL:2000086: + text: CL:2000086 + description: neocortex basket cell + meaning: CL:2000086 + CL:4023023: + text: CL:4023023 + description: L5,6 neurogliaform lamp5 GABAergic cortical interneuron (Mmus) + meaning: CL:4023023 + CL:0000697: + text: CL:0000697 + description: R4 photoreceptor cell + meaning: CL:0000697 + CL:2000088: + text: CL:2000088 + description: Ammon's horn basket cell + meaning: CL:2000088 + CL:0004232: + text: CL:0004232 + description: starburst amacrine cell + meaning: CL:0004232 + CL:4023041: + text: CL:4023041 + description: L5 extratelencephalic projecting glutamatergic cortical neuron + meaning: CL:4023041 + CL:0004121: + text: CL:0004121 + description: retinal ganglion cell B2 + meaning: CL:0004121 + CL:0000748: + text: CL:0000748 + description: retinal bipolar neuron + meaning: CL:0000748 + CL:4023164: + text: CL:4023164 + description: globular bushy cell + meaning: CL:4023164 + CL:0000536: + text: CL:0000536 + description: secondary motor neuron (sensu Teleostei) + meaning: CL:0000536 + CL:1000466: + text: CL:1000466 + description: chromaffin cell of right ovary + meaning: CL:1000466 + CL:0011001: + text: CL:0011001 + description: spinal cord motor neuron + meaning: CL:0011001 + CL:0000755: + text: CL:0000755 + description: type 3 cone bipolar cell (sensu Mus) + meaning: CL:0000755 + CL:0004238: + text: CL:0004238 + description: asymmetric bistratified amacrine cell + meaning: CL:0004238 + CL:0004161: + text: CL:0004161 + description: 510 nm-cone + meaning: CL:0004161 + CL:0000198: + text: CL:0000198 + description: pain receptor cell + meaning: CL:0000198 + CL:0003038: + text: CL:0003038 + description: M7-OFF retinal ganglion cell + meaning: CL:0003038 + CL:0003033: + text: CL:0003033 + description: M4 retinal ganglion cell + meaning: CL:0003033 + CL:0012001: + text: CL:0012001 + description: neuron of the forebrain + meaning: CL:0012001 + CL:0011104: + text: CL:0011104 + description: interplexiform cell + meaning: CL:0011104 + CL:0003049: + text: CL:0003049 + description: M cone cell + meaning: CL:0003049 + CL:2000032: + text: CL:2000032 + description: peripheral nervous system neuron + meaning: CL:2000032 + CL:0011100: + text: CL:0011100 + description: galanergic neuron + meaning: CL:0011100 + CL:0008025: + text: CL:0008025 + description: noradrenergic neuron + meaning: CL:0008025 + CL:0000122: + text: CL:0000122 + description: stellate neuron + meaning: CL:0000122 + CL:0003005: + text: CL:0003005 + description: G4 retinal ganglion cell + meaning: CL:0003005 + CL:0000699: + text: CL:0000699 + description: paraganglial type 1 cell + meaning: CL:0000699 + CL:4033050: + text: CL:4033050 + description: catecholaminergic neuron + meaning: CL:4033050 + CL:1001502: + text: CL:1001502 + description: mitral cell + meaning: CL:1001502 + CL:0002069: + text: CL:0002069 + description: type II vestibular sensory cell + meaning: CL:0002069 + CL:4023065: + text: CL:4023065 + description: meis2 expressing cortical GABAergic cell + meaning: CL:4023065 + CL:4023077: + text: CL:4023077 + description: bitufted neuron + meaning: CL:4023077 + CL:0000847: + text: CL:0000847 + description: ciliated olfactory receptor neuron + meaning: CL:0000847 + CL:4023188: + text: CL:4023188 + description: midget ganglion cell of retina + meaning: CL:4023188 + CL:2000090: + text: CL:2000090 + description: dentate gyrus of hippocampal formation stellate cell + meaning: CL:2000090 + CL:0000568: + text: CL:0000568 + description: amine precursor uptake and decarboxylation cell + meaning: CL:0000568 + CL:1000426: + text: CL:1000426 + description: chromaffin cell of adrenal gland + meaning: CL:1000426 + CL:0000100: + text: CL:0000100 + description: motor neuron + meaning: CL:0000100 + CL:0011109: + text: CL:0011109 + description: hypocretin-secreting neuron + meaning: CL:0011109 + CL:4023171: + text: CL:4023171 + description: trigeminal motor neuron + meaning: CL:4023171 + CL:1001434: + text: CL:1001434 + description: olfactory bulb interneuron + meaning: CL:1001434 + CL:0000494: + text: CL:0000494 + description: UV sensitive photoreceptor cell + meaning: CL:0000494 + CL:0004117: + text: CL:0004117 + description: retinal ganglion cell A + meaning: CL:0004117 + CL:0000205: + text: CL:0000205 + description: thermoreceptor cell + meaning: CL:0000205 + CL:0004217: + text: CL:0004217 + description: H1 horizontal cell + meaning: CL:0004217 + CL:0000200: + text: CL:0000200 + description: touch receptor cell + meaning: CL:0000200 + CL:4023111: + text: CL:4023111 + description: cerebral cortex pyramidal neuron + meaning: CL:4023111 + CL:4032001: + text: CL:4032001 + description: reelin GABAergic cortical interneuron + meaning: CL:4032001 + CL:4023076: + text: CL:4023076 + description: Martinotti neuron + meaning: CL:4023076 + CL:0000753: + text: CL:0000753 + description: type 1 cone bipolar cell (sensu Mus) + meaning: CL:0000753 + CL:1001451: + text: CL:1001451 + description: sensory neuron of dorsal root ganglion + meaning: CL:1001451 + CL:4023021: + text: CL:4023021 + description: static gamma motor neuron + meaning: CL:4023021 + CL:0002066: + text: CL:0002066 + description: Feyrter cell + meaning: CL:0002066 + CL:0000598: + text: CL:0000598 + description: pyramidal neuron + meaning: CL:0000598 + CL:0000702: + text: CL:0000702 + description: R5 photoreceptor cell + meaning: CL:0000702 + CL:0008049: + text: CL:0008049 + description: Betz cell + meaning: CL:0008049 + CL:0001033: + text: CL:0001033 + description: hippocampal granule cell + meaning: CL:0001033 + CL:0000587: + text: CL:0000587 + description: cold sensing thermoreceptor cell + meaning: CL:0000587 + CL:4023161: + text: CL:4023161 + description: unipolar brush cell + meaning: CL:4023161 + CL:2000031: + text: CL:2000031 + description: lateral line ganglion neuron + meaning: CL:2000031 + CL:4023119: + text: CL:4023119 + description: displaced amacrine cell + meaning: CL:4023119 + CL:1001569: + text: CL:1001569 + description: hippocampal interneuron + meaning: CL:1001569 + CL:4023130: + text: CL:4023130 + description: kisspeptin neuron + meaning: CL:4023130 + CL:4023090: + text: CL:4023090 + description: small basket cell + meaning: CL:4023090 + CL:4023033: + text: CL:4023033 + description: OFF retinal ganglion cell + meaning: CL:4023033 + CL:4023112: + text: CL:4023112 + description: vestibular afferent neuron + meaning: CL:4023112 + CL:0004234: + text: CL:0004234 + description: diffuse multistratified amacrine cell + meaning: CL:0004234 + CL:0002082: + text: CL:0002082 + description: type II cell of adrenal medulla + meaning: CL:0002082 + CL:0010011: + text: CL:0010011 + description: cerebral cortex GABAergic interneuron + meaning: CL:0010011 + CL:4030052: + text: CL:4030052 + description: nucleus accumbens shell and olfactory tubercle D2 medium spiny + neuron + meaning: CL:4030052 + CL:0000604: + text: CL:0000604 + description: retinal rod cell + meaning: CL:0000604 + CL:4030027: + text: CL:4030027 + description: GABAergic amacrine cell + meaning: CL:4030027 + CL:1001561: + text: CL:1001561 + description: vomeronasal sensory neuron + meaning: CL:1001561 + CL:0000210: + text: CL:0000210 + description: photoreceptor cell + meaning: CL:0000210 + CL:4023012: + text: CL:4023012 + description: near-projecting glutamatergic cortical neuron + meaning: CL:4023012 + CL:4023087: + text: CL:4023087 + description: fan Martinotti neuron + meaning: CL:4023087 + CL:0000028: + text: CL:0000028 + description: CNS neuron (sensu Nematoda and Protostomia) + meaning: CL:0000028 + CL:0000006: + text: CL:0000006 + description: neuronal receptor cell + meaning: CL:0000006 + CL:0004247: + text: CL:0004247 + description: bistratified cell + meaning: CL:0004247 + CL:0010012: + text: CL:0010012 + description: cerebral cortex neuron + meaning: CL:0010012 + CL:0004245: + text: CL:0004245 + description: indoleamine-accumulating amacrine cell + meaning: CL:0004245 + CL:0004224: + text: CL:0004224 + description: AB diffuse-2 amacrine cell + meaning: CL:0004224 + CL:0003009: + text: CL:0003009 + description: G6 retinal ganglion cell + meaning: CL:0003009 + CL:0000679: + text: CL:0000679 + description: glutamatergic neuron + meaning: CL:0000679 + CL:0000166: + text: CL:0000166 + description: chromaffin cell + meaning: CL:0000166 + CL:4023088: + text: CL:4023088 + description: large basket cell + meaning: CL:4023088 + CL:4030057: + text: CL:4030057 + description: eccentric medium spiny neuron + meaning: CL:4030057 + CL:4023024: + text: CL:4023024 + description: neurogliaform lamp5 GABAergic cortical interneuron (Mmus) + meaning: CL:4023024 + CL:0005024: + text: CL:0005024 + description: somatomotor neuron + meaning: CL:0005024 + CL:4023049: + text: CL:4023049 + description: L5 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023049 + CL:0000573: + text: CL:0000573 + description: retinal cone cell + meaning: CL:0000573 + CL:4023123: + text: CL:4023123 + description: hypothalamus kisspeptin neuron + meaning: CL:4023123 + CL:0000376: + text: CL:0000376 + description: humidity receptor cell + meaning: CL:0000376 + CL:0004235: + text: CL:0004235 + description: AB broad diffuse-1 amacrine cell + meaning: CL:0004235 + CL:0000106: + text: CL:0000106 + description: unipolar neuron + meaning: CL:0000106 + CL:0001032: + text: CL:0001032 + description: cortical granule cell + meaning: CL:0001032 + CL:0000561: + text: CL:0000561 + description: amacrine cell + meaning: CL:0000561 + CL:4023093: + text: CL:4023093 + description: stellate pyramidal neuron + meaning: CL:4023093 + CL:0000247: + text: CL:0000247 + description: Rohon-Beard neuron + meaning: CL:0000247 + CL:0003008: + text: CL:0003008 + description: G5 retinal ganglion cell + meaning: CL:0003008 + CL:0000203: + text: CL:0000203 + description: gravity sensitive cell + meaning: CL:0000203 + CL:0003037: + text: CL:0003037 + description: M7-ON retinal ganglion cell + meaning: CL:0003037 + CL:0004221: + text: CL:0004221 + description: flag A amacrine cell + meaning: CL:0004221 + CL:0000638: + text: CL:0000638 + description: acidophil cell of pars distalis of adenohypophysis + meaning: CL:0000638 + CL:0004229: + text: CL:0004229 + description: A2-like amacrine cell + meaning: CL:0004229 + CL:4023120: + text: CL:4023120 + description: cochlea auditory hair cell + meaning: CL:4023120 + CL:0008032: + text: CL:0008032 + description: rosehip neuron + meaning: CL:0008032 + CL:0008027: + text: CL:0008027 + description: rod bipolar cell (sensu Mus) + meaning: CL:0008027 + CL:0000497: + text: CL:0000497 + description: red sensitive photoreceptor cell + meaning: CL:0000497 + CL:4023062: + text: CL:4023062 + description: dentate gyrus neuron + meaning: CL:4023062 + CL:0002516: + text: CL:0002516 + description: interrenal chromaffin cell + meaning: CL:0002516 + CL:0004119: + text: CL:0004119 + description: retinal ganglion cell B1 + meaning: CL:0004119 + CL:4030039: + text: CL:4030039 + description: von Economo neuron + meaning: CL:4030039 + CL:4023036: + text: CL:4023036 + description: chandelier pvalb GABAergic cortical interneuron + meaning: CL:4023036 + CL:0000117: + text: CL:0000117 + description: CNS neuron (sensu Vertebrata) + meaning: CL:0000117 + CL:4023015: + text: CL:4023015 + description: sncg GABAergic cortical interneuron + meaning: CL:4023015 + CL:4033033: + text: CL:4033033 + description: flat midget bipolar cell + meaning: CL:4033033 + CL:0000626: + text: CL:0000626 + description: olfactory granule cell + meaning: CL:0000626 + CL:0004218: + text: CL:0004218 + description: H2 horizontal cell + meaning: CL:0004218 + CL:0004233: + text: CL:0004233 + description: DAPI-3 amacrine cell + meaning: CL:0004233 + CL:0003021: + text: CL:0003021 + description: retinal ganglion cell C4 + meaning: CL:0003021 + CL:0000489: + text: CL:0000489 + description: scotopic photoreceptor cell + meaning: CL:0000489 + CL:4023159: + text: CL:4023159 + description: double bouquet cell + meaning: CL:4023159 + CL:0002612: + text: CL:0002612 + description: neuron of the ventral spinal cord + meaning: CL:0002612 + CL:0000476: + text: CL:0000476 + description: thyrotroph + meaning: CL:0000476 + CL:4033034: + text: CL:4033034 + description: invaginating midget bipolar cell + meaning: CL:4033034 + CL:4023029: + text: CL:4023029 + description: indirect pathway medium spiny neuron + meaning: CL:4023029 + CL:0004236: + text: CL:0004236 + description: AB broad diffuse-2 amacrine cell + meaning: CL:0004236 + CL:0003017: + text: CL:0003017 + description: retinal ganglion cell B3 outer + meaning: CL:0003017 + CL:0000759: + text: CL:0000759 + description: type 7 cone bipolar cell (sensu Mus) + meaning: CL:0000759 + CL:0000740: + text: CL:0000740 + description: retinal ganglion cell + meaning: CL:0000740 + CL:0004120: + text: CL:0004120 + description: retinal ganglion cell A1 + meaning: CL:0004120 + CL:3000002: + text: CL:3000002 + description: sympathetic noradrenergic neuron + meaning: CL:3000002 + CL:0003023: + text: CL:0003023 + description: retinal ganglion cell C6 + meaning: CL:0003023 + CL:0000690: + text: CL:0000690 + description: R2 photoreceptor cell + meaning: CL:0000690 + CL:4023047: + text: CL:4023047 + description: L2/3 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023047 + CL:4023022: + text: CL:4023022 + description: canopy lamp5 GABAergic cortical interneuron (Mmus) + meaning: CL:4023022 + CL:4023060: + text: CL:4023060 + description: hippocampal CA1-3 neuron + meaning: CL:4023060 + CL:0000758: + text: CL:0000758 + description: type 6 cone bipolar cell (sensu Mus) + meaning: CL:0000758 + CL:0000535: + text: CL:0000535 + description: secondary neuron (sensu Teleostei) + meaning: CL:0000535 + CL:4023055: + text: CL:4023055 + description: corticothalamic VAL/VM projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023055 + CL:1000467: + text: CL:1000467 + description: chromaffin cell of left ovary + meaning: CL:1000467 + CL:0011002: + text: CL:0011002 + description: lateral motor column neuron + meaning: CL:0011002 + CL:0004244: + text: CL:0004244 + description: WF4 amacrine cell + meaning: CL:0004244 + CL:1000223: + text: CL:1000223 + description: lung neuroendocrine cell + meaning: CL:1000223 + CL:1000385: + text: CL:1000385 + description: type 2 vestibular sensory cell of epithelium of crista of ampulla + of semicircular duct of membranous labyrinth + meaning: CL:1000385 + CL:0000691: + text: CL:0000691 + description: stellate interneuron + meaning: CL:0000691 + CL:4023008: + text: CL:4023008 + description: intratelencephalic-projecting glutamatergic cortical neuron + meaning: CL:4023008 + CL:4023044: + text: CL:4023044 + description: non-medulla, extratelencephalic-projecting glutamatergic neuron + of the primary motor cortex + meaning: CL:4023044 + CL:0000850: + text: CL:0000850 + description: serotonergic neuron + meaning: CL:0000850 + CL:0000695: + text: CL:0000695 + description: Cajal-Retzius cell + meaning: CL:0000695 + CL:0003051: + text: CL:0003051 + description: UV cone cell + meaning: CL:0003051 + CL:0000402: + text: CL:0000402 + description: CNS interneuron + meaning: CL:0000402 + CL:0005023: + text: CL:0005023 + description: branchiomotor neuron + meaning: CL:0005023 + CL:4023043: + text: CL:4023043 + description: L5/6 near-projecting glutamatergic neuron of the primary motor + cortex + meaning: CL:4023043 + CL:0004162: + text: CL:0004162 + description: 360 nm-cone + meaning: CL:0004162 + CL:0011003: + text: CL:0011003 + description: magnocellular neurosecretory cell + meaning: CL:0011003 + CL:0004230: + text: CL:0004230 + description: diffuse bistratified amacrine cell + meaning: CL:0004230 + CL:1001505: + text: CL:1001505 + description: parvocellular neurosecretory cell + meaning: CL:1001505 + CL:0011106: + text: CL:0011106 + description: GABAnergic interplexiform cell + meaning: CL:0011106 + CL:0000437: + text: CL:0000437 + description: gonadtroph + meaning: CL:0000437 + CL:4023010: + text: CL:4023010 + description: alpha7 GABAergic cortical interneuron (Mmus) + meaning: CL:4023010 + CL:4023046: + text: CL:4023046 + description: L6b subplate glutamatergic neuron of the primary motor cortex + meaning: CL:4023046 + CL:0000109: + text: CL:0000109 + description: adrenergic neuron + meaning: CL:0000109 + CL:0011000: + text: CL:0011000 + description: dorsal horn interneuron + meaning: CL:0011000 + CL:0000251: + text: CL:0000251 + description: extramedullary cell + meaning: CL:0000251 + CL:0003044: + text: CL:0003044 + description: M11 retinal ganglion cell + meaning: CL:0003044 + CL:4023053: + text: CL:4023053 + description: spinal interneuron synapsing Betz cell + meaning: CL:4023053 + CL:1000378: + text: CL:1000378 + description: type 1 vestibular sensory cell of stato-acoustic epithelium + meaning: CL:1000378 + CL:4023124: + text: CL:4023124 + description: dentate gyrus kisspeptin neuron + meaning: CL:4023124 + CL:1000427: + text: CL:1000427 + description: adrenal cortex chromaffin cell + meaning: CL:1000427 + CL:0000207: + text: CL:0000207 + description: olfactory receptor cell + meaning: CL:0000207 + CL:4023162: + text: CL:4023162 + description: bushy cell + meaning: CL:4023162 + CL:2000019: + text: CL:2000019 + description: compound eye photoreceptor cell + meaning: CL:2000019 + CL:4023086: + text: CL:4023086 + description: T Martinotti neuron + meaning: CL:4023086 + CL:0003012: + text: CL:0003012 + description: G9 retinal ganglion cell + meaning: CL:0003012 + CL:0002270: + text: CL:0002270 + description: type EC2 enteroendocrine cell + meaning: CL:0002270 + CL:2000024: + text: CL:2000024 + description: spinal cord medial motor column neuron + meaning: CL:2000024 + CL:0003022: + text: CL:0003022 + description: retinal ganglion cell C5 + meaning: CL:0003022 + CL:0000104: + text: CL:0000104 + description: multipolar neuron + meaning: CL:0000104 + CL:4023050: + text: CL:4023050 + description: L6 intratelencephalic projecting glutamatergic neuron of the + primary motor cortex + meaning: CL:4023050 + CL:4023030: + text: CL:4023030 + description: L2/3/5 fan Martinotti sst GABAergic cortical interneuron (Mmus) + meaning: CL:4023030 + CL:0000741: + text: CL:0000741 + description: spinal accessory motor neuron + meaning: CL:0000741 + CL:4033010: + text: CL:4033010 + description: neuroendocrine cell of epithelium of lobar bronchus + meaning: CL:4033010 + CL:1000425: + text: CL:1000425 + description: chromaffin cell of paraganglion + meaning: CL:1000425 + CL:4030051: + text: CL:4030051 + description: nucleus accumbens shell and olfactory tubercle D1 medium spiny + neuron + meaning: CL:4030051 + CL:0000567: + text: CL:0000567 + description: polymodal nocireceptor + meaning: CL:0000567 + CL:0004215: + text: CL:0004215 + description: type 5a cone bipolar cell + meaning: CL:0004215 + CL:0003032: + text: CL:0003032 + description: M3-OFF retinal ganglion cell + meaning: CL:0003032 + CL:4023079: + text: CL:4023079 + description: midbrain-derived inhibitory neuron + meaning: CL:4023079 + CL:0000099: + text: CL:0000099 + description: interneuron + meaning: CL:0000099 + CL:0000253: + text: CL:0000253 + description: eurydendroid cell + meaning: CL:0000253 + CL:0008013: + text: CL:0008013 + description: cranial visceromotor neuron + meaning: CL:0008013 + CL:0005000: + text: CL:0005000 + description: spinal cord interneuron + meaning: CL:0005000 + CL:0004222: + text: CL:0004222 + description: flag B amacrine cell + meaning: CL:0004222 + CL:0000617: + text: CL:0000617 + description: GABAergic neuron + meaning: CL:0000617 + CL:0003010: + text: CL:0003010 + description: G7 retinal ganglion cell + meaning: CL:0003010 + CL:0000577: + text: CL:0000577 + description: type EC enteroendocrine cell + meaning: CL:0000577 + CL:0003018: + text: CL:0003018 + description: retinal ganglion cell B3 inner + meaning: CL:0003018 + CL:0002083: + text: CL:0002083 + description: type I cell of adrenal medulla + meaning: CL:0002083 + CL:4023081: + text: CL:4023081 + description: inverted L6 intratelencephalic projecting glutamatergic neuron + of the primary motor cortex (Mmus) + meaning: CL:4023081 + CL:0004251: + text: CL:0004251 + description: narrow field retinal amacrine cell + meaning: CL:0004251 + CL:4023092: + text: CL:4023092 + description: inverted pyramidal neuron + meaning: CL:4023092 + CL:0002608: + text: CL:0002608 + description: hippocampal neuron + meaning: CL:0002608 + CL:0008048: + text: CL:0008048 + description: upper motor neuron + meaning: CL:0008048 + CL:0011113: + text: CL:0011113 + description: spiral ganglion neuron + meaning: CL:0011113 + CL:0000601: + text: CL:0000601 + description: cochlear outer hair cell + meaning: CL:0000601 + CL:0003041: + text: CL:0003041 + description: M9-ON retinal ganglion cell + meaning: CL:0003041 + CL:4023042: + text: CL:4023042 + description: L6 corticothalamic-projecting glutamatergic cortical neuron + meaning: CL:4023042 + CL:0000199: + text: CL:0000199 + description: mechanoreceptor cell + meaning: CL:0000199 + CL:1001571: + text: CL:1001571 + description: hippocampal pyramidal neuron + meaning: CL:1001571 + CL:2000048: + text: CL:2000048 + description: anterior horn motor neuron + meaning: CL:2000048 + CL:4023170: + text: CL:4023170 + description: trigeminal sensory neuron + meaning: CL:4023170 + CL:0002614: + text: CL:0002614 + description: neuron of the substantia nigra + meaning: CL:0002614 From 5276cc3b4c9cd71e325e2028aa448fb24143a388 Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Sun, 13 Aug 2023 12:11:16 -0700 Subject: [PATCH 73/78] Update docs/gallery/plot_term_set.py Co-authored-by: Oliver Ruebel --- docs/gallery/plot_term_set.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index ecd7ea4be..d0769fbcc 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -49,11 +49,13 @@ `example_term_set.yaml `_ for this tutorial, which provides a concise example of how a term set schema looks. -For more information on how to properly format the Google spreadsheet to be compatible with LinkMl, please -refer to https://linkml.io/schemasheets/#examples. +.. note:: + For more information on how to properly format the Google spreadsheet to be compatible with LinkMl, please + refer to https://linkml.io/schemasheets/#examples. -For more information how to properly format the schema to support LinkML Dynamic Enumerations, please -refer to https://linkml.io/linkml/schemas/enums.html#dynamic-enums. +.. note:: + For more information how to properly format the schema to support LinkML Dynamic Enumerations, please + refer to https://linkml.io/linkml/schemas/enums.html#dynamic-enums. """ from hdmf.common import DynamicTable, VectorData import os From 7712d4668bd9abb0b4536b58fd5741a5852a84ec Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Sun, 13 Aug 2023 12:37:34 -0700 Subject: [PATCH 74/78] Update src/hdmf/term_set.py Co-authored-by: Oliver Ruebel --- src/hdmf/term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 0cfe43b65..5be3300c5 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -40,7 +40,7 @@ def __init__(self, self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) - + self.expanded_term_set_path = None if dynamic: # reset view to now include the dynamically populated term_set self.expanded_term_set_path = self.enum_expander() From 05603843888434de2a487bfafe67d68657f029de Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Sun, 13 Aug 2023 12:37:57 -0700 Subject: [PATCH 75/78] Update src/hdmf/term_set.py Co-authored-by: Oliver Ruebel --- src/hdmf/term_set.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index 5be3300c5..e7de0e442 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -121,9 +121,9 @@ def schemasheets_convert(self): import yaml from linkml_runtime.utils.schema_as_dict import schema_as_dict from schemasheets.schemamaker import SchemaMaker - except ImportError: - msg="Install schemasheets." - raise ValueError(msg) + except ImportError: # pragma: no cover + msg="Install schemasheets." # pragma: no cover + raise ValueError(msg) # pragma: no cover schema_maker = SchemaMaker() tsv_file_paths = glob.glob(self.schemasheets_folder + "/*.tsv") schema = schema_maker.create_schema(tsv_file_paths) From 8f55f6a5f02d3e568f1bb5c214e118137f58185a Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Sun, 13 Aug 2023 12:38:54 -0700 Subject: [PATCH 76/78] Update src/hdmf/term_set.py Co-authored-by: Oliver Ruebel --- src/hdmf/term_set.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index e7de0e442..dd6d4df05 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -139,9 +139,9 @@ def enum_expander(self): try: warnings.filterwarnings("ignore", category=DeprecationWarning) from oaklib.utilities.subsets.value_set_expander import ValueSetExpander - except ImportError: - msg = 'Install oaklib.' - raise ValueError(msg) + except ImportError: # pragma: no cover + msg = 'Install oaklib.' # pragma: no cover + raise ValueError(msg) # pragma: no cover expander = ValueSetExpander() # TODO: linkml should raise a warning if the schema does not have dynamic enums enum = list(self.view.all_enums()) From 099c62b41f21c857eac21c2ba96c72a8f9da1458 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Sun, 13 Aug 2023 13:04:33 -0700 Subject: [PATCH 77/78] fixes from review --- docs/gallery/plot_term_set.py | 4 ++++ src/hdmf/term_set.py | 27 ++++++++++++++++++++++----- tests/unit/test_term_set.py | 5 +++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/docs/gallery/plot_term_set.py b/docs/gallery/plot_term_set.py index d0769fbcc..fc065264b 100644 --- a/docs/gallery/plot_term_set.py +++ b/docs/gallery/plot_term_set.py @@ -49,6 +49,10 @@ `example_term_set.yaml `_ for this tutorial, which provides a concise example of how a term set schema looks. +.. note:: + For more information regarding LinkML Enumerations, please refer to + https://linkml.io/linkml/intro/tutorial06.html. + .. note:: For more information on how to properly format the Google spreadsheet to be compatible with LinkMl, please refer to https://linkml.io/schemasheets/#examples. diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index dd6d4df05..a98b5ce95 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -10,9 +10,11 @@ class TermSet(): Class for implementing term sets from ontologies and other resources used to define the meaning and/or identify of terms. - :ivar term_schema_path: The LinkML YAML enumeration schema + :ivar term_schema_path: The path to LinkML YAML enumeration schema :ivar sources: The prefixes for the ontologies used in the TermSet :ivar view: SchemaView of the term set schema + :ivar schemasheets_folder: The path to the folder containing the LinkML TSV files + :ivar self.expanded_term_set_path: The path to the schema with the expanded enumerations """ def __init__(self, term_schema_path: str=None, @@ -21,6 +23,9 @@ def __init__(self, ): """ :param term_schema_path: The path to LinkML YAML enumeration schema + :param schemasheets_folder: The path to the folder containing the LinkML TSV files + :param dynamic: Boolean parameter denoting whether the schema uses Dynamic Enumerations + """ try: from linkml_runtime.utils.schemaview import SchemaView @@ -36,14 +41,14 @@ def __init__(self, msg = "Cannot have both a path to a Schemasheets folder and a TermSet schema." raise ValueError(msg) else: - self.term_schema_path = self.schemasheets_convert() + self.term_schema_path = self.__schemasheets_convert() self.view = SchemaView(self.term_schema_path) else: self.view = SchemaView(self.term_schema_path) self.expanded_term_set_path = None if dynamic: # reset view to now include the dynamically populated term_set - self.expanded_term_set_path = self.enum_expander() + self.expanded_term_set_path = self.__enum_expander() self.view = SchemaView(self.expanded_term_set_path) self.sources = self.view.schema.prefixes @@ -116,7 +121,12 @@ def __getitem__(self, term): msg = 'Term not in schema' raise ValueError(msg) - def schemasheets_convert(self): + def __schemasheets_convert(self): + """ + Method that will generate a schema from a directory of TSV files using SchemaMaker. + + This method returns a path to the new schema to be viewed via SchemaView. + """ try: import yaml from linkml_runtime.utils.schema_as_dict import schema_as_dict @@ -135,7 +145,14 @@ def schemasheets_convert(self): return schemasheet_schema_path - def enum_expander(self): + def __enum_expander(self): + """ + Method that will generate a new schema with the enumerations from the LinkML source. + This new schema will be stored in the same directory as the original schema with + the Dynamic Enumerations. + + This method returns a path to the new schema to be viewed via SchemaView. + """ try: warnings.filterwarnings("ignore", category=DeprecationWarning) from oaklib.utilities.subsets.value_set_expander import ValueSetExpander diff --git a/tests/unit/test_term_set.py b/tests/unit/test_term_set.py index 1274218ce..8130c7e4b 100644 --- a/tests/unit/test_term_set.py +++ b/tests/unit/test_term_set.py @@ -93,7 +93,8 @@ def test_enum_expander(self): @unittest.skipIf(not REQUIREMENTS_INSTALLED, "optional LinkML module is not installed") def test_enum_expander_output(self): schema_path = 'tests/unit/example_dynamic_term_set.yaml' - convert_path = TermSet(term_schema_path=schema_path, dynamic=True).enum_expander() + termset = TermSet(term_schema_path=schema_path, dynamic=True) + convert_path = termset._TermSet__enum_expander() convert_path = os.path.normpath(convert_path) expected_path = os.path.join("tests", "unit", "expanded_example_dynamic_term_set.yaml") @@ -105,6 +106,6 @@ def test_enum_expander_output(self): def test_folder_output(self): folder = os.path.join(CUR_DIR, "test_term_set_input", "schemasheets") termset = TermSet(schemasheets_folder=folder) - actual_path = termset.schemasheets_convert() + actual_path = termset._TermSet__schemasheets_convert() expected_path = os.path.normpath(os.path.join(os.path.dirname(folder), "schemasheets/nwb_static_enums.yaml")) self.assertEqual(actual_path, expected_path) From 2b63ec2528d3d60ce9d951112d402758aad89480 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Sun, 13 Aug 2023 13:36:42 -0700 Subject: [PATCH 78/78] Update src/hdmf/term_set.py --- src/hdmf/term_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdmf/term_set.py b/src/hdmf/term_set.py index a98b5ce95..9b5983b56 100644 --- a/src/hdmf/term_set.py +++ b/src/hdmf/term_set.py @@ -14,7 +14,7 @@ class TermSet(): :ivar sources: The prefixes for the ontologies used in the TermSet :ivar view: SchemaView of the term set schema :ivar schemasheets_folder: The path to the folder containing the LinkML TSV files - :ivar self.expanded_term_set_path: The path to the schema with the expanded enumerations + :ivar expanded_term_set_path: The path to the schema with the expanded enumerations """ def __init__(self, term_schema_path: str=None,