morph_tool.utils¶
Utils.
Functions
|
Returns the path to a morphology in morphology_dir matching stem. |
|
Returns True if the extension is supported. |
|
Iterator that returns path to morphology files. |
|
Returns a DataFrame. |
- morph_tool.utils.find_morph(folder: Path, stem: str) Path | None ¶
Returns the path to a morphology in morphology_dir matching stem.
If no morphology is found, returns None
- morph_tool.utils.is_morphology(filename, extensions=None)¶
Returns True if the extension is supported.
- morph_tool.utils.iter_morphology_files(folder, recursive=False, extensions=None)¶
Iterator that returns path to morphology files.
- morph_tool.utils.neurondb_dataframe(neurondb: Path, morphology_dir: Path | None = None) DataFrame ¶
Returns a DataFrame.
The expected columns: name, layer, mtype, use_axon, (optional) path. If read from an XML, additional columns maybe be present.
- Parameters:
neurondb – the neurondb.(dat|xml) file
morphology_dir – (Optional) If passed, a column with the path to each morphology file will be added
Raises: ValueError if the neurondb does not abide by the specification https://bbpteam.epfl.ch/documentation/projects/morphology-repair-workflow/latest/input_files.html#specification
Deprecated since version Use: morph_tool.morphdb.MorphDB instead.