read_hoc_file¶
-
singlecell_input_mapper.udvary2022.reader.read_hoc_file(fname: str =
'', label_map: dict[str, str] | None =None) list[_Edge]¶ Read a .hoc morphology file and return a list of Edge objects.
Instead of hard-coding section-type names, the function extracts the raw label from every
create <label>statement via regex and resolves it through label_map.The map key is compared against the prefix of the raw label (everything before the first
_), case- insensitively. If no key matches, the raw label itself is used as the semantic label so that unknown section types are preserved.Mapping a prefix to
Nonecauses those sections to be skipped entirely.
Documentation unclear, incomplete, broken or wrong? Let us know