Skip to main content

Perform morphology measurement on neuron SWC files

Project description

nGauge

nGauge is a Python library which provides a collection of tools for the measurement, quantification, and visualization of neuron morphology. The library structure makes automation of data analysis pipelines easier, leading to faster and more reproducible results.

Documentation Status

Quickstart

> pip install ngauge
> neuron = ngauge.Neuron.from_swc('file.swc')

> neuron

Tutorials

We have prepared several tutorials provided as either markdown manuals or jupyter notebook documents which cover the usage of nGauge in the GitHub folder labeled "tutorials":

  • Basic Usage
    • Builds on the "Quickstart" example above.
  • Cell Type PCA
    • Provides the complete code to replicate Figure 5 from the nGauge manuscript. In short, this involves running PCA on the quantification from two collections of cells.
  • Comparing LMeasure and nGauge
    • Provides the complete code for the nGauge vs. LMeasure comparison figure.
  • Calculating Histograms
    • Shows how the 2D histogram figure in the nGauge manuscript was created.
  • Rasterize Neuron
    • Provides an example of how you could "rasterize" a neuron into a volumetric TIFF file.
  • Test all Functions
    • Runs a script that executes (almost) all nGauge functions.

There are also a collection of examples where are specific to using nGauge with Blender:

Installation

Prerequisites

nGauge should be compatible with any Python distribution, however, all code has been tested and developed using the Anaconda Python package. It is recommended that Anaconda be used if possible, as it includes serveral packages (numpy, etc.) that are guaranteed to work with nGauge.

Recommended Method (pip)

If you have pip and python 3.x installed already, nGauge can be installed by running the following command in the terminal: pip install ngauge. This will install the current release version of nGauge from the PyPi repository: https://pypi.org/project/nGauge/.

To install from source:

To install the development (source) version of nGauge to your local computer, follow these steps:

  1. Clone this GitHub repository: git clone https://github.com/Cai-Lab-at-University-of-Michigan/nGauge.git
  2. Change directory into the newly downloaded folder: cd nGauge
  3. Run the pip local installation script: pip install .

Using with Blender

Additional steps are required to utilize the Blender features of nGauge. First, blender must be installed using the directions from the developers (https://www.blender.org/download/). Only Blender versions newer than 2.8 are compatible due to changes in the Python API that nGauge utilizes.

In the tutorials folder, instructions to install and configure Blender with nGauge is provided as "install_blender_ubuntu". If you do not use Ubuntu, please see below for alternative install options.

By default, many versions of Blender support packages installed to the system Python library. In this case, no additional steps are required for setup. For Blender versions which do not share Python with the system-level install (such as Windows and snap versions), nGauge can be used with one of these two methods:

  1. If the Python version of the system and Blender are the same, the system library path can be appended to the Blender path by appending this to the runtime path (import sys; sys.path += ['<location>']).
  2. It is also possible to directly install packages to the Blender Python libary using pip, however support for this install method can not be provided.

Need Help?

Open a GitHub "Issue" with any feaure requests or questions!

Citation

nGauge has been submitted for publication, but the preprint is currently available on bioRxiv: https://www.biorxiv.org/content/10.1101/2021.05.13.443832v2.abstract

nGauge: Integrated and extensible neuron morphology analysis in Python
Logan A Walker, Jennifer S Williams, Ye Li, Douglas H Roossien, Nigel S Michki, Dawen Cai
bioRxiv 2021.05.13.443832; doi: https://doi.org/10.1101/2021.05.13.443832

Contact

License

This code is licensed under the GNU General Public License v3.0, a copy of which is available in LICENSE.

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

nGauge-1.0.0.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

nGauge-1.0.0-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file nGauge-1.0.0.tar.gz.

File metadata

  • Download URL: nGauge-1.0.0.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for nGauge-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e9c8c826add4ac107c612c9bf60bf47875439d15198a718565dcab9436b040ec
MD5 dd365628461e73d382a563f75d656810
BLAKE2b-256 ce76276b52edc2a41ceaafd8e56ad7e8844eaf3bd8f6a85498991a062bccd578

See more details on using hashes here.

File details

Details for the file nGauge-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nGauge-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for nGauge-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb45fef3ddf683019f92d5f5c4c9cfcb3610b3cc23beac07cd735ec0f2cd06bd
MD5 4ad63e511be8e080b2c5fda2a2201d79
BLAKE2b-256 2cec619fd33c80a8f6dad002a2866cadbb698a76d1f08d21fe466ec6411c9f70

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