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_neurons now accepts a materialization parameter that determines which materialization version is used for synapse and nucleus queries; defaults to "auto" which means navis will try to find a materialization version matching the queried root IDs
    • fetch_neurons will now also assign soma positions for H01 neurons (see the .soma_pos neuron property); previously this only worked for MICrONS neurons
    • datastack="cortex65" now points to the correct MICrONS datastack
  • CloudVolume.mesh.get_navis (see navis.patch_cloudvolume) now accepts a process (default is False) parameter that determines whether the NeuroGlancer mesh is processed (deduplication of vertices, etc.); contribute by @fcollman
  • fixed a bug in navis.subset_neuron that 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_layout parameter was renamed to cn_layout (matching e.g. other parameters such as cn_colors)
  • Negative views in navis.plot2d (e.g. view=("x", "-z")) will now invert axes rather than changing the underlying data
  • Minimum version of matplotlib is now 3.9 (was 3.6)
  • The plotly backend is not part of a minimal install anymore (still installed via navis[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.tortuosity now 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 NeuronList method: get_neuron_attributes is analagous to dict.get
  • NeuronLists now implement the | (__or__) operator which can be used to get the union of two [NeuronLists]navis.NeuronList]
  • Tree/MeshNeurons, Volumes and Dotprops now support addition/subtraction (similar to the already existing multiplication and division) to allow offsetting neurons
  • navis.Volume now have an (optional) .units property similar to neurons

Improvements

  • Plotting:
    • navis.plot3d:
    • legendgroup parameter (plotly backend) now also sets the legend group's title
    • new parameters for the plotly backend:
      • legend (default True): determines whether legends is shown
      • legend_orientation (default v): determines whether legend is aranged vertically (v) or horizontally (h)
      • linestyle (default -): determines line style for skeletons
    • default for radius is now "auto"
    • navis.plot2d:
    • the view parameter now also works with methods 3d and 3d_complex
    • the color_by and shade_by parameters now also work when plotting skeletons with radius=True
    • new defaults: radius="auto", alpha=1, figsize=None (use matplotlib defaults)
    • new parameters for methods 3d and 3d_complex: mesh_shade=False and non_view_axes3d
    • the scalebar and soma parameters can now also be dictionaries to style (color, width, etc) the scalebar/soma
    • the connectors parameter 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 limit parameter used in many read_* functions can now also be a regex pattern or a slice
  • New parameter in navis.resample_skeleton() use map_column to include arbitrary columns in the resampling
  • navis.prune_twigs() and navis.cable_length() now accept a mask parameter
  • General improvements to docs and tutorials

Fixes

  • Memory usage of Neuron/Lists is 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 length
  • navis.TreeNeuron.simple now 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 cluster parameter in favour of an improved color_by logic (see below)

New

  • new method navis.NeuronList.add_metadata to quickly add metadata to neurons

Improved

  • navis.find_soma and navis.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 .file property
  • navis.NeuronList will only search the first 100 neurons for autocompletion to avoid freezing with very large lists
  • plotting functions: color_by now accepts either a list of labels (one per neuron) or the name of a neuron property
  • navis.subset_neuron is now faster and more memory efficient when subsetting meshes
  • navis.TreeNeuron.cable_length is now faster

Fixed

  • all I/O functions such as navis.read_swc now ignore hidden files (filename starts with ._) instead of breaking
  • navis.read_swc now 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.synblast that caused multiprocessing to fail (pickling issue with pykdtree)
  • navis.interfaces.neuprint.fetch_mesh_neuron will now ignore the lod parameter 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_swc no longer writes Dotprops

New Features

  • navis.read_parquet and navis.write_parquet let 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.NeuronConnector class for creating connectivity graphs from groups of neurons with consistent connector IDs (e.g. from pymaid neurons)

Improvements

  • improved logic for splitting NBLASTs across multiple cores
  • i/o functions can now read directly from .tar or .tar.gz files (.zip was 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 navis won'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_nn parameter (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_neurons to simply concatenate neurons
  • new set of persistence functions: navis.persistence_vectors, navis.persistence_points and navis.persistence_distances
  • improvements to various functions: e.g. navis.bending_flow, navis.flow_centrality, navis.split_axon_dendrite and navis.longest_neurite
  • navis.read_swc now accepts a limit parameter that enables reading on the the first N neurons (useful to sample large collections)
  • navis.write_nrrd and navis.read_nrrd can now be used to write/read Dotprops to/from NRRD files
  • navis.nblast (and variants) now accept a precision parameter that allows setting the datatype for the matrix (useful to keep memory usage low for large NBLASTs)
  • navis.simplify_mesh (and therefore navis.downsample_neuron with skeletons) now uses the pyfqmr if 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 root
  • navis.read_rda: read nat neuron-data R data (.rda) - also works for basic stuff like dataframes
  • navis.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() and mirror() 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 format
    • read_h5() and write_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.1

NBLAST-related bugfixes

- Python
Published by schlegelp about 5 years ago

navis - Version 0.4.0

  • native implementation of NBLAST: see navis.nblast and navis.nblast_allbyall!
  • plot3d with plotly accepts a new parameter: if hover_id=True it 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_volume or plot3d)
  • 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