Skip to main content

NeuroM: a light-weight neuron morphology analysis package

Project description

NeuroM is a Python-based toolkit for the analysis and processing of neuron morphologies.

Test Status Test Coverage Status Documentation Status

Acknowlegments

This work has been partially funded by the European Union Seventh Framework Program (FP7/2007�2013) under grant agreement no. 604102 (HBP). For license and authors, see LICENSE.txt and AUTHORS.md respectively.

Documentation

NeuroM documentation is built and hosted on readthedocs.

Installation

It is recommended that you use pip to install into NeuroM into a virtualenv. The following assumes virtualenv named nrm with access to the dependencies has been set up and activated. We will see three ways to install NeuroM

1. From the Python Package Index

(nrm)$ pip install neurom

2. From git repository

(nrm)$ pip install git+https://github.com/BlueBrain/NeuroM.git

3. From source

Clone the repository and install it:

(nrm)$ git clone https://github.com/BlueBrain/NeuroM.git
(nrm)$ pip install -e ./NeuroM

This installs NeuroM into your virtualenv in “editable” mode. That means changes made to the source code are seen by the installation. To install in read-only mode, omit the -e.

Examples

  • Perform checks on neuron morphology files:

(nrm)$ morph_check some/data/path/morph_file.swc # single file
INFO: ================================
INFO: Check file some/data/path/morph_file.swc...
INFO: Has valid soma? PASS
INFO: Has Apical Dendrite? PASS
INFO: Has Basal Dendrite? PASS
INFO: All neurites have non-zero radius? PASS
INFO: All segments have non-zero length? PASS
INFO: All sections have non-zero length? PASS
INFO: Check result: PASS
INFO: ================================


(nrm)$ morph_check some/data/path # all files in directory
....
  • Load a neuron and obtain some information from it:

>>> import neurom as nm
>>> nrn = nm.load_neuron('some/data/path/morph_file.swc')
>>> apical_seg_lengths = nm.get('segment_lengths', nrn, neurite_type=nm.APICAL_DENDRITE)
>>> axon_sec_lengths = nm.get('section_lengths', nrn, neurite_type=nm.AXON)
  • Visualize a neuronal morphology:

>>> # Initialize nrn as above
>>> from neurom import viewer
>>> fig, ax = viewer.draw(nrn)
>>> fig.show()
>>> fig, ax = viewer.draw(nrn, mode='3d') # valid modes '2d', '3d', 'dendrogram'
>>> fig.show()

Dependencies

The build-time and runtime dependencies of NeuroM are:

Reporting issues

Issues should be reported to the NeuroM github repository issue tracker. The ability and speed with which issues can be resolved depends on how complete and succinct the report is. For this reason, it is recommended that reports be accompanied with a minimal but self-contained code sample that reproduces the issue, the observed and expected output, and if possible, the commit ID of the version used. If reporting a regression, the commit ID of the change that introduced the problem is also extremely valuable information.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

neurom-0.1.2.dev0.tar.gz (61.5 kB view hashes)

Uploaded Source

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