bsb.morphologies.parsers package

Module contents

bsb.morphologies.parsers.parse_morphology_content(content: str | bytes, parser='bsb', **kwargs)[source]
Parameters:

content (str | bytes)

bsb.morphologies.parsers.parse_morphology_file(file: str | PathLike, parser='bsb', **kwargs)[source]
Parameters:

file (str | PathLike)

class bsb.morphologies.parsers.parser.BsbParser(*args, _parent=None, _key=None, **kwargs)[source]

Bases: MorphologyParser

get_node_name()
parse(file: FileDependency | str)[source]

Parse the morphology.

Parameters:

file (FileDependency | str)

parse_content(content: str)[source]
Parameters:

content (str)

skip_boundary_labels: list[str]

A set of labels that is used to create gaps in a morphology at certain boundaries.

No point will be inferred between a child branch of a branch labelled with the given labels; usually used to skip points between the soma and its child branches.

tags: dict[str | list[str]]

Dictionary mapping SWC tags to sets of morphology labels.

class bsb.morphologies.parsers.parser.MorphIOParser(*args, _parent=None, _key=None, **kwargs)[source]

Bases: MorphologyParser

flags
get_node_name()
parse(file: FileDependency | str) Morphology[source]

Parse the morphology.

Parameters:

file (FileDependency | str)

Return type:

Morphology

class bsb.morphologies.parsers.parser.MorphologyParser(*args, _parent=None, _key=None, **kwargs)[source]

Bases: object

branch_cls: type

Base implementation of all the different configuration attributes.

Call the factory function attr() instead.

cls: type

Base implementation of all the different configuration attributes.

Call the factory function attr() instead.

get_node_name()
abstractmethod parse(file: FileDependency | str) Morphology[source]

Parse the morphology.

Parameters:

file (FileDependency | str)

Return type:

Morphology

parser

Base implementation of all the different configuration attributes.

Call the factory function attr() instead.