Navis

Latest version: v1.6.0

Safety actively analyzes 629994 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 8

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!

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`

1.0

Likewise, many `navis` functions that work with spatial units now alternatively accept a "unit str" that can be parsed by `pint`. 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)
>>> 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](https://navis.readthedocs.io/en/latest/source/whats_new.html) and the commit history.

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](https://navis.readthedocs.io/en/latest/source/whats_new.html) for a full list.

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

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

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

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](https://navis.readthedocs.io/en/latest/source/whats_new.html) for details.

Page 2 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.