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.

Dependencies

The build-time and runtime dependencies of NeuroM are:

  • numpy

  • scipy

  • matplotlib

  • h5py (optional, required for reading HDF5 files)

  • enum34 (pip install takes care of this)

  • pyyaml (pip install takes care of this)

Installation

It is recommended that you use pip to install into NeuroM into a virtualenv:

NeuroM installation

The following assumes virtualenv named nrm with access to the dependencies has been set up and activated. We will see two ways to install NeuroM

  1. From the Python Package Index

  2. From the git repository

  3. From source (for NeuroM developers)

Install package from Python Package Index

(nrm)$ pip install neurom

Install package from git

Install the latest version:

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

Install a particular release:

(nrm)$ pip install git+https://github.com/BlueBrain/NeuroM.git@neurom-v0.0.1

Install 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 you make 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:

>>> from neurom import ezy
>>> nrn = ezy.load_neuron('some/data/path/morph_file.swc')
>>> apical_seg_lengths = ezy.get('segment_lengths', nrn, neurite_type=ezy.NeuriteType.apical_dendrite)
>>> axon_sec_lengths = ezy.get('section_lengths', nrn, neurite_type=ezy.NeuriteType.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()

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.0.tar.gz (58.7 kB view details)

Uploaded Source

File details

Details for the file neurom-0.1.0.tar.gz.

File metadata

  • Download URL: neurom-0.1.0.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for neurom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a93c1873f01154de15c89d2ce9cb55f9d4750c46ec85e1af0c9854145cd360a4
MD5 931b7fefa4b5cd96e170c944f42e5ca9
BLAKE2b-256 b65b2adda1ffdb9136c79a19011698e3bea873488a25f8a8c9f3e416f4014ce8

See more details on using hashes here.

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