Skip to content

Releases: navis-org/navis

Version 1.2.0

24 Feb 22:11
Compare
Choose a tag to compare

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!

Version 1.1.0

18 Nov 10:32
Compare
Choose a tag to compare

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

Version 1.0.0

11 Nov 15:29
Compare
Choose a tag to compare

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.

Version 0.6.0

12 May 10:52
Compare
Choose a tag to compare

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:

>>> nl = navis.example_neurons(4)
>>> pr = navis.prune_by_strahler(nl, to_prune=1, parallel=True)

To run generic (i.e. non-navis functions) in parallel you can use NeuronList.apply:

>>> 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:

$ pip3 install pathos -U

Read and write SWC files directly from/to zip files

>>> 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:

>>> # Example neurons are in raw (i.e. voxel) hemibrain space
>>> n = navis.example_neurons(1)
>>> n.units
8 <Unit('nanometer')>

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:

>>> # Example neuron is in 8nm voxels (see above)
>>> n_vxl = navis.example_neurons(1)
>>> # Convert to microns
>>> n_um = n_vxl.convert_units('um')
>>> n_um.units
1.0 <Unit('micrometer')>

Likewise, many navis functions that work with spatial units now alternatively accept a "unit str" that can be parsed by pint. For example:

>>> n = navis.example_neurons(1)
>>> # Prune twigs smaller than 5 microns
>>> # (which would be 5 * 1000 / 8 = 625 in this neuron's space)
>>> n_pr = navis.prune_twigs(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.

Version 0.5.3

18 Apr 14:43
Compare
Choose a tag to compare

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.

Version 0.5.2

25 Feb 09:25
Compare
Choose a tag to compare
  • 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.

Version 0.5.1

10 Jan 16:33
Compare
Choose a tag to compare
  • massively speed up thin plate spine transforms
  • hot fix for neuron's .has_.... properties
  • improved docstrings

Version 0.5.0

06 Jan 12:39
Compare
Choose a tag to compare

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.

Version 0.4.3

23 Dec 16:17
Compare
Choose a tag to compare

Hot fix for Vispy viewer (issue with legend). Also some improvements to navis.resample_neuron.

Version 0.4.2

22 Dec 16:51
Compare
Choose a tag to compare

Minor release with a few updates and changes to requirements to be more flexible with respect to the new pip dependency solver.