From 6c9b0d438fc43e027ed202cc533dae4f2239e1fd Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 11 Sep 2024 17:42:42 +0100 Subject: [PATCH] feat(neuroml): refer to neuro_lex_ids in neuroml instead of hard coding --- netpyne/conversion/neuromlFormat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netpyne/conversion/neuromlFormat.py b/netpyne/conversion/neuromlFormat.py index 08935c246..a310478ea 100644 --- a/netpyne/conversion/neuromlFormat.py +++ b/netpyne/conversion/neuromlFormat.py @@ -23,6 +23,7 @@ try: import neuroml + from neuroml.neuro_lex_ids import neuro_lex_ids from pyneuroml import pynml from pyneuroml import __version__ as pynml_ver from distutils.version import StrictVersion @@ -1354,7 +1355,7 @@ def handle_population( # Unbranched segment group -> NEURON section if ( hasattr(seg_grp, "neuro_lex_id") - and seg_grp.neuro_lex_id == "sao864921383" + and seg_grp.neuro_lex_id == neuro_lex_ids["section"] ): use_segment_groups_for_neuron = True cellRule["secs"][seg_grp.id] = { @@ -1524,7 +1525,7 @@ def handle_population( if ( not seg_grp.neuro_lex_id - or seg_grp.neuro_lex_id != "sao864921383" + or seg_grp.neuro_lex_id != neuro_lex_ids["section"] ): cellRule["secLists"][seg_grp.id] = seg_grps_vs_nrn_sections[ seg_grp.id