Recent Releases of navis
navis - Version 1.10.0
This version includes:
- improvements to reading skeletons from tar archives
- fixes to make sure that navis plays nicely with numpy 2.x (@floesche)
- various other fixes (including by @floesche)
See the Changelog for details.
- Python
Published by schlegelp about 1 year ago
navis - Version 1.9.1
This minor version bump fixes a few smaller issues:
- MICrONS & H01 interfaces:
fetch_neuronsnow accepts amaterializationparameter that determines which materialization version is used for synapse and nucleus queries; defaults to "auto" which meansnaviswill try to find a materialization version matching the queried root IDsfetch_neuronswill now also assign soma positions for H01 neurons (see the.soma_posneuron property); previously this only worked for MICrONS neuronsdatastack="cortex65"now points to the correct MICrONS datastack
CloudVolume.mesh.get_navis(seenavis.patch_cloudvolume) now accepts aprocess(default isFalse) parameter that determines whether the NeuroGlancer mesh is processed (deduplication of vertices, etc.); contribute by @fcollman- fixed a bug in
navis.subset_neuronthat caused branch points to not be re-calculated
- Python
Published by schlegelp over 1 year ago
navis - Version 1.9.0
This version comes with:
- a new and shiny interface to pull data from the H01 human cortex dataset (by @jinhan)
- TreeNeurons can now be initialized from vertices and edges
- improvements in handling and processing of image data
- general I/O improvements
See the changelog for details!
- Python
Published by schlegelp over 1 year ago
navis - Version 1.8.0
This version contains a major internal rework of both navis.plot2d and navis.plot3d to make them more consistent and easier to use.
Breaking
- Plotting: the
synapse_layoutparameter was renamed tocn_layout(matching e.g. other parameters such ascn_colors) - Negative views in
navis.plot2d(e.g.view=("x", "-z")) will now invert axes rather than changing the underlying data - Minimum version of
matplotlibis now3.9(was3.6) - The
plotlybackend is not part of a minimal install anymore (still installed vianavis[all]) - The Vispy backend is now deprecated and will be removed in a future release
- Removed
navis.screenshot- please use the Octarine/Vispy viewer's.screenshot()method instead navis.tortuositynow calculates tortuosity as-is (i.e. without resampling) by default
Additions
- Added Octarine as the default backend for plotting from terminal
- New Function:
navis.ivscc_features()computes some basic ICSCC features - New function:
navis.graph.skeleton_adjacency_matrix()computes the node adjacency for skeletons - New function:
navis.graph.simplify_graph()simplifies skeleton graphs to only root, branch and leaf nodes while preserving branch length (i.e. weights) - New
NeuronListmethod:get_neuron_attributesis analagous todict.get NeuronListsnow implement the|(__or__) operator which can be used to get the union of two [NeuronLists]navis.NeuronList]Tree/MeshNeurons,VolumesandDotpropsnow support addition/subtraction (similar to the already existing multiplication and division) to allow offsetting neuronsnavis.Volumenow have an (optional).unitsproperty similar to neurons
Improvements
- Plotting:
navis.plot3d:legendgroupparameter (plotly backend) now also sets the legend group's title- new parameters for the plotly backend:
legend(defaultTrue): determines whether legends is shownlegend_orientation(defaultv): determines whether legend is aranged vertically (v) or horizontally (h)linestyle(default-): determines line style for skeletons
- default for
radiusis now"auto" navis.plot2d:- the
viewparameter now also works withmethods3dand3d_complex - the
color_byandshade_byparameters now also work when plotting skeletons withradius=True - new defaults:
radius="auto",alpha=1,figsize=None(use matplotlib defaults) - new parameters for methods
3dand3d_complex:mesh_shade=Falseandnon_view_axes3d - the
scalebarandsomaparameters can now also be dictionaries to style (color, width, etc) the scalebar/soma - the
connectorsparameter can now be used to show specific connector types (e.g.connectors="pre")
- I/O:
read_*functions are now able to read from FTP servers (ftp://...)- the
limitparameter used in manyread_*functions can now also be a regex pattern or aslice
- New parameter in
navis.resample_skeleton()usemap_columnto include arbitrary columns in the resampling navis.prune_twigs()andnavis.cable_length()now accept amaskparameter- General improvements to docs and tutorials
Fixes
- Memory usage of
Neuron/Listsis now correctly re-calculated when the neuron is modified - Various fixes and improvements for the MICrONS interface (
navis.interfaces.microns) navis.graph.node_label_sorting()now correctly prioritizes total branch lengthnavis.TreeNeuron.simplenow correctly drops soma nodes if they aren't root, branch or leaf points themselves
Full Changelog: v1.7.0...v1.8.0
- Python
Published by schlegelp over 1 year ago
navis - Version 1.7.0
With this release we integrate navis-fastcore into navis which contains a number of core functions re-implemented in Rust 🎉
For now this is a soft dependency but if you pip install navis-fastcore, navis will automatically use these improved functions under the hood, which can speed things up by up to 20x 🚀
In other news:
Breaking
- plotting functions: dropped the
clusterparameter in favour of an improvedcolor_bylogic (see below)
New
- new method
navis.NeuronList.add_metadatato quickly add metadata to neurons
Improved
navis.find_somaandnavis.graph.neuron2nx(used under the hood) are now much faster- all I/O functions, such as
navis.read_swc, now show which file caused an error (if any); original filenames are tracked as.fileproperty navis.NeuronListwill only search the first 100 neurons for autocompletion to avoid freezing with very large lists- plotting functions:
color_bynow accepts either a list of labels (one per neuron) or the name of a neuron property navis.subset_neuronis now faster and more memory efficient when subsetting meshesnavis.TreeNeuron.cable_lengthis now faster
Fixed
- all I/O functions such as
navis.read_swcnow ignore hidden files (filename starts with._) instead of breaking navis.read_swcnow actually uses the soma label (if present) to set the soma node- fixed a bug in plotting when using vertex colors
- fixed the progress bar in
navis.interfaces.neuprint.fetch_mesh_neuron - fixed a bug in
navis.synblastthat caused multiprocessing to fail (pickling issue withpykdtree) navis.interfaces.neuprint.fetch_mesh_neuronwill now ignore thelodparameter if the data source does not support it instead of breaking- fixed a number of depcrecation warnings in the codebase
- Python
Published by schlegelp over 1 year ago
navis - Version 1.6.0
It has been a long time (7 months, to be precise) since the last release but we've not been idle!
Version 1.6.0 is chock-full with new features, improvements and fixes. Here are some of the highlights:
Breaking
- with this release we've dropped support for Python 3.8 as per NEP 29
navis.write_swcno longer writesDotprops
New Features
navis.read_parquetandnavis.write_parquetlet you read/write large set of skeletons or dotprops; note: these are experimental and the format specs might still change but feel free to take it for a spin- new
navis.NeuronConnectorclass for creating connectivity graphs from groups of neurons with consistent connector IDs (e.g. frompymaidneurons)
Improvements
- improved logic for splitting NBLASTs across multiple cores
- i/o functions can now read directly from
.taror.tar.gzfiles (.zipwas already supported)
Fixes
- fixes to the neuPrint interface by @stuarteberg
- plotting empty TreeNeurons no longer breaks things thanks to @floesche
- reading large files (i.e. mostly meshes) directly from a URL should not break anymore
New Contributors
- @stuarteberg made their first contribution in https://github.com/navis-org/navis/pull/124
- @floesche made their first contribution in https://github.com/navis-org/navis/pull/125
Full Changelog: https://navis.readthedocs.io/en/latest/source/whats_new.html Commit history: https://github.com/navis-org/navis/compare/v1.5.0...v1.6.0
- Python
Published by schlegelp almost 2 years ago
navis - Version 1.5.0
Changes:
- BREAKING: dropped support for Python 3.7
- new function: navis.pop3d() removes the most recently added object from the vispy 3d viewer
- new experimental functions for (pairwise) alignment of neurons using the pycpd package: navis.nblast_align(), navis.align.align_deform(), navis.align.align_rigid(), navis.align.align_pca(), navis.align.align_pairwise()
- navis.xform_brain() now recognizes the target template’s units if available
- new NeuronList method: navis.NeuronList.set_neuron_attributes()
- new utility functions: navis.nbl.compress_scores(), navis.nbl.nblast_prime()
- improved persistence functions: navis.persistence_distances(), navis.persistence_vector(), navis.persistence_diagram()
- navis.longest_neurite() and navis.cellbodyfiber() now also allow removing the longest neurite and CBF, respectively
- navis.heal_skeleton() now accepts a mask parameter that allows restricting where fragments are stitched
- various other bugfixes
- Python
Published by schlegelp over 2 years ago
navis - Version 1.4.0
This is release contains various improvements and fixes. Importantly, it fixes a couple incompatibilities with numpy 1.24.0.
Even though this is not a new major version there is one breaking change:
navis.flow_centrality was renamed to navis.synapse_flow_centrality and a new non-synaptic navis.flow_centrality function was added. This also impacts the method parameter in navis.split_axon_dendrite!
Please see the change log for other changes.
- Python
Published by schlegelp about 3 years ago
navis - Version 1.3.1
This is a small release containing 2 fixes:
1. Fixes a bug with the most recent version of dill which impact parallel processing.
2. In Jupyter, NBLAST now uses classic progress bars. This is not ideal and all progress bars are printed on top of another but the widgets seem to be entirely broken with the most recent version of tqdm.
- Python
Published by schlegelp over 3 years ago
navis - Version 1.3.0
- as of this version
pip install naviswon't install a vispy backend (see install instructions for details) - new interface to fetch data from Virtual Fly Brain:
navis.interfaces.vfb - tools to build custom NBLAST score matrices (big thanks to @clbarnes): see the new tutorial
- Bayesian implementation of the network traversal model:
navis.models.network_models.BayesianTraversalModel(big thanks to @aschampion) - NBLASTs: new
approx_nnparameter (sacrifices precision for speed) - example neurons now come with some meta data
- new morphometrics functions:
navis.segment_analysis&navis.form_factor - new function to write meshes:
navis.write_mesh - lots of fixes and improvements in particular for i/o-related functions
- Python
Published by schlegelp almost 4 years ago
navis - Version 1.2.1
Small fix for split_axon_dendrite.
- Python
Published by schlegelp almost 4 years ago
navis - Version 1.2.0
What's new:
- new function:
navis.betweeness_centrality - new function:
navis.combine_neuronsto simply concatenate neurons - new set of persistence functions:
navis.persistence_vectors,navis.persistence_pointsandnavis.persistence_distances - improvements to various functions: e.g.
navis.bending_flow,navis.flow_centrality,navis.split_axon_dendriteandnavis.longest_neurite navis.read_swcnow accepts alimitparameter that enables reading on the the first N neurons (useful to sample large collections)navis.write_nrrdandnavis.read_nrrdcan now be used to write/read Dotprops to/from NRRD filesnavis.nblast(and variants) now accept aprecisionparameter that allows setting the datatype for the matrix (useful to keep memory usage low for large NBLASTs)navis.simplify_mesh(and thereforenavis.downsample_neuronwith skeletons) now uses thepyfqmrif present (much faster!)- improved the interface to Neuromorpho
- added a new interface with the Allen Cell Types Atlas (see
navis.interfaces.allen_celltypes) - myriads of small and big bugfixes
Thanks to @clbarnes and @Robbie1977 for contributing various PRs!
- Python
Published by schlegelp almost 4 years ago
navis - Version 1.1.0
This is primarily a bug fix release for an issue when plotting skeletons with the newest plotly (5.4.0) but still managed to squeeze in a new function:
- new function :func:
navis.sholl_analysis - plotly is now correctly chosen as default backend in Google colab
- fixes a critical bug with plotting skeletons with plotly
5.4.0
- Python
Published by schlegelp over 4 years ago
navis - Version 1.0.0
This new version comes packed with goodies (including breaking changes)! Here are the highlights:
- new neuron type VoxelNeuron for image-type neurons
- conversion between neuron types (e.g. meshing VoxelNeurons or skeletonising MeshNeurons)
- new plotting function plot_flat for dendrogram style figures
- function names now better reflect what neuron type they work on (e.g. reroot_neuron is now called reroot_skeleton)
Check out the changelog for a full list.
- Python
Published by schlegelp over 4 years ago
navis - Version 0.6.0
This new version comes with tons of goodies:
Multi-core processing as (almost) first-class citizen
Many functions now accept a parallel=True. If the input is a NeuronList, navis will then use multiple cores to run that function. You can use n_cores=some number (defaults to half the available cores) to set the number of cores used.
A toy example:
```Python
nl = navis.exampleneurons(4) pr = navis.prunebystrahler(nl, toprune=1, parallel=True) ```
To run generic (i.e. non-navis functions) in parallel you can use NeuronList.apply:
``` Python
nl = navis.example_neurons(4) nl.apply(lambda x: x.id, parallel=True) [1734350788, 1734350908, 722817260, 754534424] ```
Note that this requires that you install pathos:
bash
$ pip3 install pathos -U
Read and write SWC files directly from/to zip files
```python
nl = navis.example_neurons(4)
Write to zip
navis.write_swc(nl, '~/Downloads/SWCs.zip')
Read from zip
unzipped = navis.read_swc('~/Downloads/SWCs.zip') ```
Unit awareness
For a while now, navis neurons had an (optional) units property, and some downstream libraries (e.g. fafbseg and pymaid) make use of that:
```python
Example neurons are in raw (i.e. voxel) hemibrain space
n = navis.example_neurons(1) n.units 8
```
Under the hood, this is using a neat library called pint which also lets you convert between units. So you can do stuff like this:
```python
Example neuron is in 8nm voxels (see above)
nvxl = navis.exampleneurons(1)
Convert to microns
num = nvxl.convertunits('um') num.units 1.0
`` Likewise, manynavisfunctions that work with spatial units now alternatively accept a "unit str" that can be parsed bypint`. For example:
```python
n = navis.example_neurons(1)
Prune twigs smaller than 5 microns
(which would be 5 * 1000 / 8 = 625 in this neuron's space)
npr = navis.prunetwigs(n, '5 microns') ```
New functions
navis.prune_at_depth: to prune at given distance from rootnavis.read_rda: read nat neuron-data R data (.rda) - also works for basic stuff like dataframesnavis.cell_body_fiber: prune neuron down to its cell body fiber
For a complete list of changes, see the change log and the commit history.
- Python
Published by schlegelp almost 5 years ago
navis - Version 0.5.3
New functions:
- navis.nblast_smart
- navis.synblast
- navis.symmetrize_brain
- navis.write_google_binary
New transform:
- navis.transforms.MovingLeastSquaresTransform (thanks to @clbarnes)
Improved:
- navis.Viewer
- navis.simplify_mesh
- navis.write_swc and read_swc (thanks to @clbarnes)
- better and more tests (thanks to @clbarnes)
Plus many many bug fixes.
See the Changelog for details.
- Python
Published by schlegelp almost 5 years ago
navis - Version 0.5.2
- added a lower-level
xform()andmirror()function that requires transform(s)/mirror axis size as input - new NBLAST variant
NBLAST_smart() - new io functions:
write_google_binary()to write skeletons to Google's binary formatread_h5()andwrite_h5()implement storing neurons in HDF5 files
- new function
merge_duplicate_nodes()to de-duplicate nodes in skeletons - new transform function:
symmetrize_brain() downsample_neuron()now works on dotprops- connectors are now included in a neuron's bounding box
- NeuronList division & multiplication now has a progress bar
- improve how HDF5 transforms deal with points outside the deformation field
- many small and big bug fixes
Check out the API docs to learn more about the new functions.
- Python
Published by schlegelp almost 5 years ago
navis - Version 0.5.1
- massively speed up thin plate spine transforms
- hot fix for neuron's
.has_....properties - improved docstrings
- Python
Published by schlegelp about 5 years ago
navis - Version 0.5.0
This major release brings a new module for transforming data between template brains. Specifically, navis now supports affine, CMTK, HDF5 and thin plate spine transforms. Check out the new transforms tutorial and the accompanying flybrains package.
- Python
Published by schlegelp about 5 years ago
navis - Version 0.4.3
Hot fix for Vispy viewer (issue with legend). Also some improvements to navis.resample_neuron.
- Python
Published by schlegelp about 5 years ago
navis - Version 0.4.2
Minor release with a few updates and changes to requirements to be more flexible with respect to the new pip dependency solver.
- Python
Published by schlegelp about 5 years ago
navis - Version 0.4.0
- native implementation of NBLAST: see
navis.nblastandnavis.nblast_allbyall! plot3dwith plotly accepts a new parameter: ifhover_id=Trueit will show its ID when hovering over a node- a couple of bugfixes
- Python
Published by schlegelp about 5 years ago
navis - Version 0.3.4
Bug fixes and improvements for Dotprops:
- fix bug in creation (navis.make_dotprops) that lead to points wrong
- allow passing of dot props to interfaces.r.xform_brain and interfaces.r.mirror_brain
- new method: recalculate_tangents
- Python
Published by schlegelp about 5 years ago
navis - Version 0.3.3
Fixes a critical bug when plotting volumes using the Plotly backend. Plus a bunch of small bugfixes.
- Python
Published by schlegelp about 5 years ago
navis - Version 0.3.2
Lots of new stuff, improvements to existing functions and tons of bug fixes:
- new 'colorby' and 'shadeby' parameters for plot2d and plot3d
- make NeuronLists pickleable
- new functions: insert_nodes and remove_nodes to insert/drop nodes from TreeNeuron without disconnecting the neuron
- new function: resample_along_axis resamples TreeNeurons such that you get nodes exactly in provided intervals
- total reworks of topology related functions strahler_index, segregation_index, bending_flow, flow_centrality and split_axon_dendrite
- new topology function: arbor_segregation_index
- fix some bugs in the VisPy viewer
- total rework of Dotprops - now a subclass of BaseNeuron
- added functions to read and write Dotprops from/to .nrrd files
- new module models currently featuring a network TraversalModel
- Python
Published by schlegelp over 5 years ago
navis - Version 0.3.1
- allow mesh-like objects for certain functions (e.g.
in_volumeorplot3d) - a couple small bug fixed
- Python
Published by schlegelp over 5 years ago
navis - Version 0.3.0
Lots of under-the-hood improvements and bug fixes. Most notably:
- reworked interface with R's nat.nblast
- improved (read: orders of magnitude faster) stitch_neurons and heal_fragmented_neuron
- under the hood changes to neuron property caching
See here for the full change log.
- Python
Published by schlegelp over 5 years ago
navis - Version 0.2.2
Lots of under-the-hood improvements and bug fixes. In particular, these changes should make subclassing of navis' neuron objects easier. See here for the full change log.
- Python
Published by schlegelp over 5 years ago
navis - Version 0.2.0 Release
Most important changes:
- new neuron class navis.MeshNeuron that consists of vertices and faces
- we now use ncollpyde for ray casting (intersections)
- new example data from the Janelia hemibrain data set
- breaking changes: navis.nx2neuron now returns a navis.TreeNeuron instead of a DataFrame
- Python
Published by schlegelp over 5 years ago