Releases: navis-org/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
andnavis.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 alimit
parameter that enables reading on the the first N neurons (useful to sample large collections)navis.write_nrrd
andnavis.read_nrrd
can now be used to write/read Dotprops to/from NRRD filesnavis.nblast
(and variants) now accept aprecision
parameter that allows setting the datatype for the matrix (useful to keep memory usage low for large NBLASTs)navis.simplify_mesh
(and thereforenavis.downsample_neuron
with skeletons) now uses thepyfqmr
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
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
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 skeletonisingMeshNeurons
) - 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 calledreroot_skeleton
)
Check out the changelog for a full list.
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:
>>> 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 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.
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
andread_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
- 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.
Version 0.5.1
- massively speed up thin plate spine transforms
- hot fix for neuron's
.has_....
properties - improved docstrings
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.
Version 0.4.3
Hot fix for Vispy viewer (issue with legend). Also some improvements to navis.resample_neuron
.
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.