Coder Social home page Coder Social logo

navis-org / navis Goto Github PK

View Code? Open in Web Editor NEW
81.0 6.0 29.0 135.01 MB

Python library for analysis of neuroanatomical data.

Home Page: https://navis.readthedocs.io

License: GNU General Public License v3.0

Shell 0.03% Python 99.85% Java 0.13%
neurons swc anatomy visualization neuroscience python 3d neuprint skeletons segmentation meshes volumes blender hemibrain nblast transform connectome neuroanatomy morphometric flywire

navis's Introduction

Documentation Status Tests Run notebooks Open In Colab DOI Downloads

NAVis is a Python 3 library for Neuron Analysis and Visualization.

Documentation

NAVis is on ReadTheDocs.

Features

  • polyglot: work and convert between neuron skeletons, meshes, dotprops and images
  • visualize: 2D (matplotlib) and 3D (vispy, plotly or k3d)
  • process: skeletonization, meshing, smoothing, repair, downsampling, etc.
  • morphometrics: Strahler analysis, cable length, volume, tortuosity and more
  • similarity: compare & cluster by morphology (e.g. NBLAST, persistence or form factor) or connectivity metrics
  • transform: move data between template brains (built-in support for HDF5, CMTK, Elastix and landmark-based transforms)
  • interface: load neurons directly from neuPrint, neuromorpho.org and other data sources
  • model neurons and networks using the NEURON simulator
  • render: use Blender 3D for high quality visualizations
  • R neuron libraries: interfaces with nat, rcatmaid, elmr and more
  • import-export: read/write SWCs, neuroglancer's "precomputed" format, NMX/NML, NRRD, mesh-files and more
  • scalable: out-of-the-box support for multiprocessing
  • extensible: build your own package on top of navis - see pymaid for example

Getting started

See the documentation for detailed installation instructions, tutorials and examples. For the impatient:

pip3 install 'navis[all]'

which includes all optional extras providing features and/or performance improvements. Currently, this is igraph, pathos, shapely, kdtree, hash, flybrains, cloudvolume, meshes, and vispy-default.

3D plotting from a python REPL is provided by vispy, which has a choice of backends. Different backends work best on different combinations of hardware, OS, python distribution, and REPL, so there may be some trial and error involved. vispy's backends are listed here, and each can be installed as a navis extra, e.g. pip3 install 'navis[vispy-pyqt6]'.

movie

Questions?

Questions on how to use navis are best placed in discussions. Same goes for cool projects or analyses you made using navis - we'd love to hear from you!

Changelog

A summary of changes can be found here.

NAVis & friends

NAVis comes with batteries included but is also highly extensible. Some libraries built on top of NAVis:

  • flybrains provides templates and transforms for Drosophila brains to use with navis
  • pymaid pulls and pushes data from/to CATMAID servers
  • fafbseg contains tools to work with auto-segmented data for the FAFB EM dataset including FlyWire

Who uses NAVis?

NAVis has been used in a range of neurobiological publications. See here for a list.

We have implemented various published algorithms and methods:

  1. NBLAST: Comparison of neurons based on morphology (Costa et al., 2016)
  2. Vertex Similarity: Comparison of neurons based on connectivity (Jarrell et al., 2012)
  3. Comparison of neurons based on synapse distribution (Schlegel et al., 2016)
  4. Synapse flow centrality for axon-dendrite splits (Schneider-Mizell et al., 2016)

Working on your own cool new method? Consider adding it to NAVis!

Citing NAVis

We'd love to know if you found NAVis useful for your research! You can help us spread the word by citing the DOI provided by Zenodo DOI

License

This code is under GNU GPL V3.

Acknowledgments

NAVis is inspired by and inherits much of its design from the excellent natverse R packages by Greg Jefferis, Alex Bates, James Manton and others.

Contributing

Want to contribute? Great, here is how!

Report bugs or request features

Open an issue. For bug reports please make sure to include some code/data with a minimum example for us to reproduce the bug.

Contribute code

We're always happy for people to contribute code - be it a small bug fix, a new feature or improved documentation.

Here's how you'd do it in a nutshell:

  1. Fork this repository
  2. git clone it to your local machine
  3. Install the full development dependencies with pip install -r requirements.txt
  4. Install the package in editable mode with pip install -e ".[all]"
  5. Create, git add, git commit, git push, and pull request your changes.

Run the tests locally with pytest -v.

Docstrings should use the numpydoc format, and make sure you include any relevant links and citations. Unit tests should be doctests and/or use pytest in the ./tests directory.

Doctests have access to the tmp_dir: pathlib.Path variable, which should be used if any files need to be written.

Feel free to get in touch either through an issue or discussion if you need pointers or input on how to implement an idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.