Skip to main content

A morphology repair tool

Project description

banner

build license Documentation Status doi

NeuroR

Introduction

NeuroR is a collection of tools to repair morphologies.

You can try NeuroR’s functionality on MyBinder:

  • Cut-plane detection - cutplane

  • Morphology repair - repair

Acknowledgements

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

This research was supported by the EBRAINS research infrastructure, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).

Citation

Cite NeuroR with the following DOI: doi

NeuroR implements the methods discussed in the following paper:

Anwar H., Riachi I., Schürmann F., Markram H. (2009). “An approach to capturing neuron morphological diversity,” in Computational Neuroscience: Realistic Modeling for Experimentalistsed. De Schutter E., editor. (Cambridge: The MIT Press) 211–232

DOI: 10.7551/mitpress/9780262013277.003.0010

Morphology repair with NeuroR

There are presently three types of repair which are outlined below.

Sanitization

This is the process of sanitizing a morphological file. It currently:

  • ensures it can be loaded with MorphIO

  • raises if the morphology has no soma or of invalid format

  • removes unifurcations

  • set negative diameters to zero

  • raises if the morphology has a neurite whose type changes along the way

  • removes segments with near zero lengths (shorter than 1e-4)

Note: more functionality may be added in the future

Cut plane repair

The cut plane repair aims at regrowing part of a morphologies that have been cut out when the cell has been experimentally sliced.

neuror cut-plane repair contains the collection of CLIs to perform this repair.

Additionally, there are CLIs for the cut plane detection and writing detected cut planes to JSON files:

  • If the cut plane is aligned with one of the X, Y or Z axes, the cut plane detection can be done automatically with the CLIs:

neuror cut-plane file
neuror cut-plane folder
  • If the cut plane is not one the X, Y or Z axes, the detection has to be performed through the helper web application that can be launched with the following CLI:

neuror cut-plane hint

Unravelling

Unravelling is the action of “stretching” the cell that has been shrunk because of the dehydratation caused by the slicing.

The unravelling CLI sub-group is:

neuror unravel

The unravelling algorithm can be described as follows:

  • Segments are unravelled iteratively.

  • Each segment direction is replaced by the averaged direction in a sliding window around this segment.

  • The original segment length is preserved.

  • The start position of the new segment is the end of the latest unravelled segment.

Installation

NeuroR is distributed as a Python package available on PyPi:

$ pip install --pre neuror[plotly]

Note: NeuroR relies on the experimental version 2 of NeuroM, hence the --pre option.

Only Python 3.6 and above are supported.

Prior to running pip install, we recommend updating pip in your virtual environment unless you have a compelling reason not to do it:

$ pip install --upgrade pip setuptools

Building BlueRepairSDK from sources

To install the old BlueRepairSDK, use this script:

#!/bin/bash

##########
# BBPSDK #
##########

git clone ssh://bbpcode.epfl.ch/common/BBPSDK --recursive
cd BBPSDK
git checkout 7ccfd867b43746909ac3429cf44e2e4014431bbf
git submodule update

cmake -DCLONE_SUBPROJECTS=ON
sed -i 's/add_subdirectory(tests)/#add_subdirectory(tests)/' Lunchbox/CMakeLists.txt

# Remove a word (2nd argument) from all files in a folder (1st argument) and its subfolder
delete_recursive() {
    find $1 \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s/$2//g"
}

delete_recursive . -Wextra
delete_recursive . -Wall
delete_recursive . -pedantic

make
sudo make install
cd ..

#################
# BlueRepairSDK #
#################

git clone ssh://bbpcode.epfl.ch/platform/BlueRepairSDK
cd BlueRepairSDK
make build

Contributing

If you want to improve the project or you see any issue, every contribution is welcome. Please check the contribution guidelines for more information.

License

NeuroR is licensed under the terms of the GNU Lesser General Public License version 3. Refer to COPYING.LESSER and COPYING for details.

Copyright (c) 2019-2021 Blue Brain Project/EPFL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NeuroR-1.4.0.tar.gz (347.8 kB view details)

Uploaded Source

File details

Details for the file NeuroR-1.4.0.tar.gz.

File metadata

  • Download URL: NeuroR-1.4.0.tar.gz
  • Upload date:
  • Size: 347.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for NeuroR-1.4.0.tar.gz
Algorithm Hash digest
SHA256 9cffc1523c4506b1c6d0af3f9d753b32a76cfdb8e7e47dae82d82aba58e41612
MD5 72d33f223e7115b21cd825840ad2c42f
BLAKE2b-256 bdf7713eaabde8765d980ddd92ea24136e308e13e5435a045f4b48bcfebd16bf

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page