RealNeuralNetworks.jl

A unified framework for skeletonization, morphological analysis, and connectivity analysis.
Popularity
38 Stars
Updated Last
4 Months Ago
Started In
September 2017

Generic badge Stable Dev CI Coverage Status License

3D neuron models extracted from EM image segmentation

Features

  • sparse skeletonization. extract the neuron skeletons based on image segmentation (colored labels).
  • morphological analysis with a lot of features.
  • neural networks including synapses. Most current morphological analysis tools do not have synapses.
  • neuron morphology similarity measurement using NBLAST algorithm.

Installation

This package was not registerred in the new Pkg package management system yet.

  • type julia to enter command line interface.
  • import Pkg
  • Pkg.develop(url="https://github.com/seung-lab/RealNeuralNetworks.jl.git")

Usage

Analysis

All the analysis functions are demonstrated in Jupyter Notebooks.

skeletonization of proofread neurons

The skeletonization could be done using a script. The following command will show the parameters to use it. julia skeletonize.jl -h

Docker

build docker image

sudo docker build . -t realneuralnetworks

The secret files containing cloud authentication keys follows the cloudvolume secret format.

docker run -v /tmp:/tmp -v $HOME/.cloudvolume/secrets:/root/.cloudvolume/secrets --net=host realneuralnetworks julia skeletonize.jl -h

REPL in Julia

using RealNeuralNetworks.NodeNets
using RealNeuralNetworks.Neurons
using RealNeuralNetworks.SWCs

nodeNet = NodeNet(seg::Array{UInt32,3}; obj_id = convert(UInt32,77605))
neuron = Neuron( nodeNet )
swc = SWC(neuron)
SWCs.save(swc, tempname()*".swc")

Morphological Features

features represent a whole neuron

  • arbor density
  • total path length
  • number of segment points
  • Median segment length is the median dendritic segment length of all the segments starting and ending at irreducible nodes (in μm). Irreducible nodes are the points of the dendritic arbor corresponding to soma, branching points or terminal points.
  • 3D sholl analysis.
  • Hull area is the area of the tightest convex hull containing the z-projection of the dendritic arbor (in μm2).
  • volume of the convex hull around all neurites
  • Average angle is the mean of the positive angle between (parent node, node) and (node, child node) vectors, where node, parent node and child node are irreducible nodes (in radians).
  • Average tortuosity is the average value of the ratio of the actual dendritic length to the Euclidean distance between irreducible nodes.
  • Asymmetry is the distance of the soma node to the dendritic arbor (skeleton) centre of mass (in nm).
  • Typical radius (λ) is the root-mean-square distance of dendritic arbor points to the centre of mass (in nm).
  • fractal dimension.
  • longest neurite length.
  • Strahler number
  • distribution of Euclidian distance of segmentes from soma (third principal component)
  • distribution of Euclidian distance of segmentes from soma as a function of segment order (third principal component)
  • number of segmentes per segment order (second principal component)
  • distribution of morphological distance of segmentes from soma along the skeleton as a function of segment order (first principal component)

features represent segmentes in a neuron

  • ratio of tail diameter to head. could be useful to identify spines.
  • segment order
  • segment length
  • branching angle. computation using dot product
  • tortuosity / curvature. caa4486b501f936743f781782e6561833da7e413
  • distance to root path length
  • segment asymmetry
  • average radius. easy to compute with radius list.

Credit

The skeletonization was originally implemented in Matlab by Alexander Bae using TEASAR algorithm, which was translated to Julia by Nicholas Turner.

This package is developed at Princeton University and Flatiron Institute.

Reference

We have a publication for this repo:

@article{wuRealNeuralNetworksJlIntegrated2022,
	title = {{RealNeuralNetworks}.jl: {An} {Integrated} {Julia} {Package} for {Skeletonization}, {Morphological} {Analysis}, and {Synaptic} {Connectivity} {Analysis} of {Terabyte}-{Scale} {3D} {Neural} {Segmentations}},
	volume = {16},
	issn = {1662-5196},
	shorttitle = {{RealNeuralNetworks}.jl},
	url = {https://www.frontiersin.org/article/10.3389/fninf.2022.828169},
	urldate = {2022-03-02},
	journal = {Frontiers in Neuroinformatics},
	author = {Wu, Jingpeng and Turner, Nicholas and Bae, J. Alexander and Vishwanathan, Ashwin and Seung, H. Sebastian},
	year = {2022},
}