Skip to content

Commit 4dc7b28

Browse files
authored
Add a why integrate your software with spikeinterface section (#4393)
1 parent 8a5fc43 commit 4dc7b28

4 files changed

Lines changed: 93 additions & 3 deletions

File tree

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@
4646

4747
[![Twitter](https://img.shields.io/badge/@spikeinterface-%231DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white)](https://twitter.com/spikeinterface) [![Mastodon](https://img.shields.io/badge/-@spikeinterface-%232B90D9?style=for-the-badge&logo=mastodon&logoColor=white)](https://fosstodon.org/@spikeinterface)
4848

49+
Please [Star](https://github.com/SpikeInterface/spikeinterface/stargazers) the project to support us and [Watch](https://github.com/SpikeInterface/spikeinterface/subscription) to always stay up-to-date!
4950

50-
SpikeInterface is a Python framework designed to unify preexisting spike sorting technologies into a single code base.
51+
SpikeInterface is a Python package designed to unify preexisting spike sorting technologies into a single code base. If you use SpikeInterface, you are also using code and ideas from many other projects. Our codebase would be tiny without the amazing algorithms and formats that we interface with. See them all, and how to cite them, on our [references page](https://spikeinterface.readthedocs.io/en/latest/references.html). In the past year, we have added support for the following tools:
5152

52-
Please [Star](https://github.com/SpikeInterface/spikeinterface/stargazers) the project to support us and [Watch](https://github.com/SpikeInterface/spikeinterface/subscription) to always stay up-to-date!
53+
- SLAy. [SLAy-ing oversplitting errors in high-density electrophysiology spike sorting](https://www.biorxiv.org/content/10.1101/2025.06.20.660590v2) ([docs](https://spikeinterface.readthedocs.io/en/latest/modules/curation.html#auto-merging-units))
54+
- Lupin, Spykingcicus2 and Tridesclous2. [Opening the black box: a modular approach to spike sorting](https://www.biorxiv.org/content/10.64898/2026.01.23.701239v1) ([docs](https://spikeinterface.readthedocs.io/en/stable/modules/sorters.html#supported-spike-sorters))
55+
- rtsort. [RT-Sort: An action potential propagation-based algorithm for real time spike detection and sorting with millisecond latencies](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0312438) ([docs](https://spikeinterface.readthedocs.io/en/stable/modules/sorters.html#supported-spike-sorters))
56+
- MEDiCINe. [MEDiCINe: Motion Correction for Neural Electrophysiology Recordings](https://www.eneuro.org/content/12/3/ENEURO.0529-24.2025) ([docs](https://spikeinterface.readthedocs.io/en/latest/how_to/handle_drift.html))
57+
- UnitRefine. [UnitRefine: A Community Toolbox for Automated Spike Sorting Curation](https://www.biorxiv.org/content/10.1101/2025.03.30.645770v2) ([docs](https://spikeinterface.readthedocs.io/en/latest/tutorials_custom_index.html#automated-curation-tutorials))
5358

59+
If you would like us to add another tool, or you would like to integrate your project with our package, please [open an issue](https://github.com/SpikeInterface/spikeinterface/issues).
5460

5561
With SpikeInterface, users can:
5662

doc/development/development.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,74 @@ Note, however, that the running time of the command above will be quite long. If
248248
249249
pytest src/spikeinterface/core/ --cov=spikeinterface/core --cov-report html
250250
251+
252+
Integrate your software with SpikeInterface
253+
-------------------------------------------
254+
255+
You've made a great analysis tool for ephys data - congrats! It's popular and people are using it.
256+
Why would you integrate it into SpikeInterface? And how can do you do that?
257+
258+
Why integrate it
259+
^^^^^^^^^^^^^^^^
260+
261+
SpikeInterface is designed to allow users to 1) read in any recording format 2) apply a wide variety
262+
of preprocessing steps to the recording 3) run any sorter on the data 4) compute standard
263+
postprocessing data about the sorting (and more!!). We work hard to be general and allow users to do
264+
anything they'd like with their data. Hence if your tool works with SpikeInterface, it works with an
265+
enormous array of possible analysis pipelines.
266+
267+
When they're first written, analysis tools are usually designed in a specific lab and are tested
268+
with a small number of collaborators and datasets. It's technically difficult to design a tool
269+
which can be applied to data from a wide variety of devices, set-ups and sorters. There are many
270+
edge cases and "gotcha"s to consider. But the SpikeInterface team have extensive experience with
271+
exactly this problem. We know how to write code so that it doesn't depend on data-specific or
272+
sorter-specific quirks. Hence we can help generalize the tool and widen its potential userbase.
273+
274+
Often, the first step when using an analysis tool is to wrangle the data into a specific format:
275+
"please save your recording to a binary file which is preprocessed in a certain way" or "ensure your
276+
sorting output is in this format". SpikeInterface deals with this painful data wrangling for you: we
277+
load many formats and internally represent them in a consistent way. We also apply all preprocessing
278+
steps lazily, meaning that users never need to save a copy of a preprocessed recording: they can work
279+
directly from the raw recording. We believe this reduces the barrier to entry for the end user, which
280+
makes your tool more likely to be used by many researchers.
281+
282+
How to integrate it
283+
^^^^^^^^^^^^^^^^^^^
284+
285+
If you'd like to integrate your tool into SpikeInterface: amazing! Just
286+
`raise an issue <https://github.com/SpikeInterface/spikeinterface/issues>`_. There are two main ways
287+
to integrate your software into SpikeInterface.
288+
289+
1) Wrapping
290+
291+
You keep your code in your own codebase, and write a thin wrapper in SpikeInterface which interacts
292+
with your library. Most external sorters that SpikeInterface can call are organized in this way. To
293+
use the tool, the user will have to install your package and the maintenance of the software is primarily
294+
on your shoulders.
295+
296+
2) Integration
297+
298+
You re-implement your code and add it to the SpikeInterface package. Many preprocessing steps, motion
299+
correction algorithms and postprocessing steps are implemented like this. Your method and code become
300+
part of the SpikeInterface package and we take on the maintenance burden (with your help, we hope!).
301+
302+
In this case, we don't expect the re-implementation to be a perfect copy of the code, since we may need
303+
to change the code to work for a more general set of data.
304+
305+
306+
Credit and Citation
307+
^^^^^^^^^^^^^^^^^^^
308+
309+
We want to ensure the tools that SpikeInterface wrap and integrate are properly cited. We'll ensure that
310+
credit is given when the tool is mentioned in the docs, in the docstring of the function, and we will
311+
add it to the :doc:`../references` page. When added, we will include your software on the front-page of
312+
the SpikeInterface GitHub for at least 1 year. If we fail to cite you properly, this is certainly a mistake.
313+
Please `raise an issue <https://github.com/SpikeInterface/spikeinterface/issues>`_.
314+
315+
See all the packages and projects which have been wrapped or integrated into SpikeInterface in our
316+
:doc:`../references` page.
317+
318+
251319
Implement a new extractor
252320
-------------------------
253321

doc/index.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ SpikeInterface is a Python module to analyze extracellular electrophysiology dat
77
With a few lines of code, SpikeInterface enables you to load and pre-process the recording, run several
88
state-of-the-art spike sorters, post-process and curate the output, compute quality metrics, and visualize the results.
99

10+
If you use SpikeInterface, you are also using code and ideas from many other projects. Our codebase would be tiny without the
11+
amazing algorithms and formats that we interface with. See them all, and how to cite them, on our
12+
`references page <https://spikeinterface.readthedocs.io/en/latest/references.html>`_. In the past year, we have added support
13+
for the following tools:
14+
15+
- SLAy. `SLAy-ing oversplitting errors in high-density electrophysiology spike sorting <https://www.biorxiv.org/content/10.1101/2025.06.20.660590v2>`_ (`docs <https://spikeinterface.readthedocs.io/en/latest/modules/curation.html#auto-merging-units>`_)
16+
- Lupin, Spykingcicus2 and Tridesclous2. `Opening the black box: a modular approach to spike sorting <https://www.biorxiv.org/content/10.64898/2026.01.23.701239v1>`_ (`docs <https://spikeinterface.readthedocs.io/en/stable/modules/sorters.html#supported-spike-sorters>`_)
17+
- RT-Sort. `RT-Sort: An action potential propagation-based algorithm for real time spike detection and sorting with millisecond latencies <https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0312438>`_ (`docs <https://spikeinterface.readthedocs.io/en/stable/modules/sorters.html#supported-spike-sorters>`_)
18+
- MEDiCINe. `MEDiCINe: Motion Correction for Neural Electrophysiology Recordings <https://www.eneuro.org/content/12/3/ENEURO.0529-24.2025>`_ (`docs <https://spikeinterface.readthedocs.io/en/latest/how_to/handle_drift.html>`_)
19+
- UnitRefine. `UnitRefine: A Community Toolbox for Automated Spike Sorting Curation <https://www.biorxiv.org/content/10.1101/2025.03.30.645770v2>`_ (`docs <https://spikeinterface.readthedocs.io/en/latest/tutorials_custom_index.html#automated-curation-tutorials>`_)
20+
21+
If you would like us to add another tool, or you would like to integrate your project with our package, please
22+
`open an issue <https://github.com/SpikeInterface/spikeinterface/issues>`_.
1023

1124
Overview of SpikeInterface modules
1225
----------------------------------
@@ -21,7 +34,7 @@ SpikeInterface is made of several modules to deal with different aspects of the
2134
- pre-process extracellular recordings.
2235
- run many popular, semi-automatic spike sorters (kilosort1-4, mountainsort4-5, spykingcircus,
2336
tridesclous, ironclust, herdingspikes, yass, waveclus)
24-
- run sorters developed in house (lupin, spkykingcicus2, tridesclous2, simple) that compete with
37+
- run sorters developed in house (lupin, spykingcicus2, tridesclous2, simple) that compete with
2538
kilosort4
2639
- run theses polar sorters without installation using containers (Docker/Singularity).
2740
- post-process sorted datasets using th SortingAnalyzer

doc/modules/curation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ merges. It offers multiple "presets" and the flexibility to apply individual ste
154154
# here we apply the merges
155155
analyzer_merged = analyzer.merge_units(merge_unit_groups=merge_unit_groups)
156156
157+
Currently, we support the following presets: 'similarity_correlograms', 'temporal_splits', 'x_contaminations',
158+
'feature_neighbors' and 'slay'. Find out more about SLAy in their preprint: [Koukuntla]_.
159+
157160
There is also the convenient :py:func:`~spikeinterface.curation.auto_merge_units` function that combines the
158161
:py:func:`~spikeinterface.curation.compute_merge_unit_groups` and :py:func:`~spikeinterface.core.SortingAnalyzer.merge_units` functions.
159162
This is a high level function that allows you to apply either one or several presets/lists of steps in one go. For example, let's

0 commit comments

Comments
 (0)