- Python 99.9%
spikeNburst – A python framework for multi-electrode array (MEA) analysis
Installation
Currently, the installation is running on Linux or WSL. The recommended way to install the dependencies is to create a new Anaconda environment:
conda create -n spikenburst cython h5py librsvg matplotlib numpy openpyxl pandas pip python scipy conda-forge::gtk3 conda-forge::odfpy conda-forge::pygobject
conda activate spikenburst
or a python environment:
python -m venv venv_spikenburst
source venv_spikenburst/bin/activate
Then, spikenburst can be installed with:
pip install --extra-index-url https://codeberg.org/api/packages/spiky/pypi/simple/ spikenburst[full]
or inside the cloned git directory with:
pip install --extra-index-url https://codeberg.org/api/packages/spiky/pypi/simple/ .[full]
Some dependencies (cairo, gtk3) might need to be additionally installed using the usual distribution dependent tools, e.g. on Ubuntu 20.04 with:
sudo apt install libcairo2-dev pkg-config python3-dev libgirepository1.0-dev
Usage
There are two options how you can use this tool. The first is the spikeNburst library which can be used in python code with
import spikenburst
sa = spikenburst.SpikeAnalysis('/path/to/input_bxr_or_npz_file')
ba = spikenburst.BurstAnalysis(sa)
nba = spikenburst.NetworkBurstAnalysis(ba)
More detailed instructions can be found in BXR README and in the help pages of the different classes.
The second option is the use of the spikeNburst GUI which can be started with
spikenburst [FILE ...]
with optionally bxr/npz files as input arguments.
Screen shot of the spikenburst GUI with 4 files analysed
Detailed instructions how to use the GUI can be found in the GUI README.
Copyright
Copyright 2021–2025 Robert Wolff mahlzahn@posteo.de
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
How to cite this package?
The spikeNburst package was introduced in
The unit filtering for ISI violation ratio is described in
The burst and network burst detection is based on the algorithms described in
- Chiappalone et al. Burst detection algorithms for the analysis of spatio-temporal patterns in cortical networks of neurons. Neurocomputing 65–66, 653–662 (2005) and
- Pasquale et al. A self-adapting approach for the detection of bursts and network bursts in neuronal cultures. J Comput Neurosci 29, 213–229 (2010)..
The bxr files are created by the proprietary 3Brain BrainWave software. The npz files can be obtained by running spike_sorting_export.py on the previously spike sorted brw files with spike_sorting.py using the SpikeInterface tool.
If you use any of the synchrony measures (spike distance, STTC or phase synchrony),
you should include the corresponding references from the
burst_sync package. The main reference is
the reference for the spike distance is
the STTC is described in
and the phase synchrony is introduced by
- Li et al. Synchronization measurement of multiple neuronal populations. J Neurophysiol 98:6, 3341-3348 (2007),
- Patel et al. Dynamic changes in neural circuit topology following mild mechanical injury in vitro. Ann Biomed Eng 40, 23–36 (2012) and
- Patel et al. Single-neuron NMDA receptor phenotype influences neuronal rewiring and reintegration following traumatic injury. J Neurosci 34, 4200–4213 (2014).
Developer: build and publish the package
For uploading packages on https://codeberg.org (see Forgejo documentation), create ~/.pypirc with following content:
[distutils]
index-servers =
spiky
pypi
testpypi
[spiky]
repository = https://codeberg.org/api/packages/spiky/pypi
username = spiky
password = <token>
After adjusting the version number in pyproject.toml, the package can be build and uploaded with
python -m build
twine upload --skip-existing --repository spiky dist/*