Automatic matching of neurons across sessions
Project description
UnitMatchPy (UMPy) and DeepUnitMatch (DUM)
This repository contains:
- UnitMatchPy (UMPy): automatic matching of neurons across sessions (Python package).
- DeepUnitMatch (DUM): DeepUnitMatch pipeline and demos (see preprint below).
References
- UnitMatch (UMPy): https://www.nature.com/articles/s41592-024-02440-1
- DeepUnitMatch (DUM) preprint: https://www.biorxiv.org/content/10.64898/2026.01.30.702777v1
Versions
- UnitMatchPy version:
3.2.9(frompyproject.toml) - DeepUnitMatch: code lives under
DeepUnitMatch/(see DeepUnitMatch (DUM) section)
Installation
pip install (including pip install -e .) installs into whatever Python environment your pip points to (system Python, a conda env, or a virtualenv). pip does not create or name environments.
We recommend using Anaconda/Miniconda (conda) to create an isolated environment first:
# Create a new environment (pick any name you like; example: UMPy)
conda create -n UMPy python=3.11 pip #(press y when prompted)
conda activate UMPy
Then install using pip (options below).
Option A: Install the released package (PyPI)
pip install UnitMatchPy
Optional extras (heavier dependencies used by some notebooks and integration with SpikeInterface):
pip install "UnitMatchPy[full,notebooks]"
Option B: Install a local, editable copy (for development / modified code)
First, open a terminal and navigate to this folder (the one containing pyproject.toml). The pip install -e command must be run from here:
# Windows (PowerShell)
cd $HOME\Documents\GitHub\DeepUnitMatch\UnitMatchPy
# macOS / Linux
cd ~/Documents/GitHub/DeepUnitMatch/UnitMatchPy
pip install -e .
Optional extras (e.g. if you'd like to run the notebooks or integrate with SpikeInterface):
pip install -e ".[full,notebooks]"
Demo notebooks
All demo notebooks are in Demo Notebooks/.
Run UnitMatchPy (UMPy)
To run UMPy, standard spike sorting data is needed (channel positions and extracted raw waveforms for each unit). Waveforms can be extracted externally (e.g. BombCell) or using the demo notebooks:
Demo Notebooks/extract_raw_data_demo.ipynb(compressed.cbin/.chor raw)Demo Notebooks/extract_raw_data_demo_open_ephys.ipynb(Open Ephys)Demo Notebooks/UMPy_spike_interface_demo.ipynb(SpikeInterface workflow)
Example notebooks:
Demo Notebooks/UMPy_example.ipynb(recommended starting point)Demo Notebooks/UMPy_example_detailed.ipynb(more modular / advanced)
The GUI is an optional step to curate and explore UnitMatch outputs; see Demo Notebooks/GUI_Reference_Guide.md for usage tips and shortcuts.
DeepUnitMatch (DUM)
To try the DeepUnitMatch version, start with:
Demo Notebooks/DeepUnitMatch.ipynb
If you want to train / fine-tune a model on your own data, see:
Demo Notebooks/DUM_training.ipynb
Important note: DeepUnitMatch current trained model is for Npix 2.0 4-shank only. You will need to train a new model with your own data if you have any other type of probe. (For example, Mouse2 from the figshare data is a Npix 1 dataset, you'll notice the trained model won't give good results on this mouse for that reason.)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unitmatchpy-3.3.0.tar.gz.
File metadata
- Download URL: unitmatchpy-3.3.0.tar.gz
- Upload date:
- Size: 182.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
784cfe7c9fbb8cf752a08af1e6f519e49af007dc03532b6363316e73a5a29f93
|
|
| MD5 |
8a12916c36fcc0a48c4b67bc54938b74
|
|
| BLAKE2b-256 |
8096cac38b2e494eced9133ff60e976f4959fcdbddca6533a41addd3e3a6fcf8
|
Provenance
The following attestation bundles were made for unitmatchpy-3.3.0.tar.gz:
Publisher:
publish.yml on EnnyvanBeest/UnitMatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unitmatchpy-3.3.0.tar.gz -
Subject digest:
784cfe7c9fbb8cf752a08af1e6f519e49af007dc03532b6363316e73a5a29f93 - Sigstore transparency entry: 937058999
- Sigstore integration time:
-
Permalink:
EnnyvanBeest/UnitMatch@4bdd70bd79fb8be5e5e3fe175cbf41b7b1221746 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EnnyvanBeest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4bdd70bd79fb8be5e5e3fe175cbf41b7b1221746 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unitmatchpy-3.3.0-py3-none-any.whl.
File metadata
- Download URL: unitmatchpy-3.3.0-py3-none-any.whl
- Upload date:
- Size: 487.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da3e457d8022986f2af090b8340683fa0d84c99c224aff7abd4a76b26d9bdcb1
|
|
| MD5 |
6771d46823601a22a05a150c2b7df184
|
|
| BLAKE2b-256 |
887ce14f4a84b566c16128dfe17910f998a896523ddfca73f01699fbceff9745
|
Provenance
The following attestation bundles were made for unitmatchpy-3.3.0-py3-none-any.whl:
Publisher:
publish.yml on EnnyvanBeest/UnitMatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unitmatchpy-3.3.0-py3-none-any.whl -
Subject digest:
da3e457d8022986f2af090b8340683fa0d84c99c224aff7abd4a76b26d9bdcb1 - Sigstore transparency entry: 937059001
- Sigstore integration time:
-
Permalink:
EnnyvanBeest/UnitMatch@4bdd70bd79fb8be5e5e3fe175cbf41b7b1221746 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EnnyvanBeest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4bdd70bd79fb8be5e5e3fe175cbf41b7b1221746 -
Trigger Event:
push
-
Statement type: