Axon velocity
Graph-based algorithm to reconstruct axonal branches and compute velocities from extracellular multi-electrode array (MEA) recordings in Python.
Installation
To install the axon_velocity package, you can clone the repo and install using pip:
pip install axon_velocity
To install from sources:
git clone https://github.com/alejoe91/axon_velocity.git
cd axon_velocity
python setup.py install (or develop)
Requirements
axon_velocity depends on the following packages, which are automatically installed
- numpy
- matplotlib
- scipy
- networkx
- sklearn
- MEAutility
- probeinterface
For the simulation notebooks in the simulation_notebooks folder, additional requirements are needed:
All additional requirements can be installed with: pip install -r requirements_fill.txt
Usage
The inputs to the tracking algorithm are:
- templates: mean extracellular waveforms (n_channels x n_samples)
- locations: x-y position of electrodes (n_channels x 2)
- fs: sampling frequency (float)
The graph-based method can be run as follows:
import axon_velocity as av
gtr = av.compute_graph_propagation_velocity(template=your_template, locations=your_locations, fs=fs)
To inspect available arguments, you can use av.compute_graph_propagation_velocity?.
The output gtr is an object of a class called GraphAxonTracking.
It contains the following fields:
branches: List of dictionaries containing the following fields:- 'selected_channels': selected channels in the path
- 'velocity': velocity estimate in mm/s (if locations in um and fs in Hz)
- 'offset': offset of velocity estimate (same units as locations)
- 'r2': r-squared of the velocoty fit
- 'error': standard error of the linear fit
- 'pval': p_value of the fit
- 'distances': array with distances computed along the branch
- 'peak_times': array with peak differences with initial channel
- 'init_channel': channel used as initial channel
selected_channels: List of selected channelsgraph: NetworkX directed graph
The GraphAxonTracking also implements useful methods for plotting the selected channels
(gtr.plot_channel_selection()), plot the underlying graph (gtr.plot_graph()), plot the selected axonal branches
(gtr.plot_branches()), and plot the estimated velocities for each branch (gtr.plot_velocities()).
Cite
If you use this package, please cite this paper: An automated method for precise axon reconstruction from recordings of high-density micro-electrode arrays:
@article{buccino2022automated,
title={An automated method for precise axon reconstruction from recordings of high-density micro-electrode arrays},
author={Buccino, Alessio Paolo and Yuan, Xinyue and Emmenegger, Vishalini and Xue, Xiaohan and G{\"a}nswein, Tobias and Hierlemann, Andreas},
journal={Journal of neural engineering},
volume={19},
number={2},
pages={026026},
year={2022},
publisher={IOP Publishing}
}
Contribute
Contributions are welcome! Before pushing, make sure to clean up all notebooks with nbconvert:
pip install nbconvert (just once)
jupyter nbconvert --to notebook --ClearOutputPreprocessor.enabled=True --ClearMetadataPreprocessor.enabled=True --inplace **/*.ipynb (before committing)
Metadata
Release files for axon-velocity 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| axon_velocity-0.2.0.tar.gz | 29.9 kB | Without provenance | Details for axon_velocity-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| axon_velocity-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for axon_velocity-0.2.0-py3-none-any.whl |
Total release size: 59.7 kB
Release files / axon_velocity-0.2.0.tar.gz
| Download URL | axon_velocity-0.2.0.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15af3e905c6d1cb3a865eeae03b7371a1ff491892febbe794fe80a81daa51331
|
|
BLAKE2b-256 checksum How to use checksums |
95d77effd9997d138bccecf393713e273697a9ccca076bd8ed6cf51155d8ea43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / axon_velocity-0.2.0-py3-none-any.whl
| Download URL | axon_velocity-0.2.0-py3-none-any.whl |
|---|---|
| Size | 29.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c191602f9824abebb244af57042fec7b0192703c6d8c396374b574ff303fbfe
|
|
BLAKE2b-256 checksum How to use checksums |
f4b00bf9fa79901a78fb57d8f1bbc337703a99feebda786e9f5db0c3df38f999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for axon-velocity 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.