- Python 99.8%
- Shell 0.2%
|
Robert Wolff
352ad539ae
All checks were successful
/ sync (push) Successful in 9s
|
||
|---|---|---|
| .forgejo/workflows | feat(ci): add workflow with test installation on various python versions | |
| src/nicespike | feat: in dialogs fit scroll area to available height, make settings dialogs big | |
| .gitignore | fix numpy<2, output folder | |
| datacite.yml | chore: adjust datacite for protocol title | |
| LICENSE | add DataCite document | |
| pypi_publish.sh | fix package path | |
| pyproject.toml | chore: version bump to 1.0.0 | |
| README.md | chore: add code G-Node DOI | |
nicespike: Analysis of high-density multi-electrode array (HD-MEA) recordings
Requirements
A GPU with installed CUDA is necessary to run nicespike on Linux (or WSL).
Installation and running in docker container
Running nicespike in a docker container is the recommended option. It is documented in the docker branch.
Installation in a python virtual environment
While the base docker container already contains binaries of Kilosort2, here you will need to install it to a given directory KILOSORT2_PATH, such that it is accessible in spikeinterface.
See instructions from spikeinterface
and from Kilosort2.
python -m venv venv_nicespike
source venv_nicespike/bin/activate
pip install --extra-index-url https://codeberg.org/api/packages/spiky/pypi/simple/ nicespike
KILOSORT2_PATH=$KILOSORT2_PATH nicespike
Run nicespike GUI
Open http://localhost:8080 and enjoy running nicespike.
Use nicespike as python package
The functionality of nicespike can be also used programatically by usage as a python module, e.g. with
from nicespike import settings, set_value, SpikeSorting
set_value(settings['General']['Number of parallel processes'], 8)
set_value(settings['Spikes']['Minimum firing rate'], 0.05)
set_value(settings['Network bursts']['Minimum number of units'], 5)
set_value(settings['Synchrony']['STTC: time window'], 0.5)
sorting = SpikeSorting(path='brw/div_21_21_chip_A.brw',
output_dir='output/div_21_21_chip_A',
settings=settings,
verbose=True)
sorting.read_and_filter()
sorting.run_kilosort2()
sorting.extract_waveforms()
sorting.export_npz()
sorting.spikenburst_analysis()
sorting.spikeinterface_plot()
sorting.spikenburst_plot()
sorting.spikenburst_export()
Copyright
Copyright 2024 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 nicespike package was introduced in
The tool uses spikeinterface, python-neo and KiloSort that should be referenced as following:
- Buccino et al. SpikeInterface, a unified framework for spike sorting. eLife 9:e61834 (2020),
- Garcia et al. Neo: an object model for handling electrophysiology data in multiple formats. Front Neuroinform. 8 (2014) and
- Pachitariu et al. Fast and accurate spike sorting of high-channel count probes with KiloSort. In: Advances in Neural Information Processing Systems. Vol 29. Curran Associates, Inc. (2016).
Further, it uses the spikeNburst package and thus all references that are listed here must be referenced:
Developer: build and publish the package
For uploading packages on Codeberg (see Forgejo documentation), create ~/.pypirc with following content:
[distutils]
index-servers =
codeberg
pypi
testpypi
[codeberg]
repository = https://codeberg.org/api/packages/<user>/pypi
username = <user>
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 codeberg dist/*