Very large difference in sorting using SC2 vs Lupin with dense recordings

Open
#4,561 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

Start by reproducing the comparison with the described 3-minute 3Brain BioCAM recording, SC2 and Lupin defaults, and the stated preprocessing changes. Compare the unit distributions and contamination metrics, then investigate the iterative-isosplit clustering crash. Done means identifying the cause of the differing outputs or documenting the necessary preprocessing or parameters.

Written by the indexing model from the issue text.

Description

I've been comparing SC2 and Lupin on the same 3 minutes-long recording of a cerebellar slice on a 3Brain BioCAM.

Running both sorters with default params and their own preprocessing, apart from removing the calibrating channel and switching from unsigned to signed, the outputs are extremely different.

SC2 results in 4187 units, distributed across the entire chip :

Image

Of those, most seem contaminated with an average isi_violations_ratio of 18.8, and if I apply a threshold of 0.5% of contaminating spikes, only 120 units remain.

Zooming in, it seems that basically every channel has its own unit :

Image

(I labelled each localization directly with the unit ID, in a less-than-elegant way).

Looking at the templates, those units look like this :

Image

Whereas units founds outside of channels and in more believable clusters look like this :

Image

I'm pretty sure those "channel units" are actually signal from the calibrating electrode that gets propagated through the entire chip. Considering how it looks, I'm not surprised they get detected as spikes.

Lupin, on the other hand, returns 191 units.

Image

The distribution across the chip is a lot more believable, but the units are still very contaminated, with an average isi_violations_ratio of 11.6, and only 38 units retained after the threshold described above.

Based on this, I had the following questions :

  • Is there something specific to Lupin that allows it to effectively filter out those noisy units ? I've thought that applying a filter based on SNR or some template metric on the output of SC2 could help, but I haven't been successful so far.
  • Despite a seemingly more conservative sorting, the units that Lupin returns are still very contaminated. Is there something that can be done to help ? I've tried tuning some of the clustering parameters without success. I've also tried swapping iterative-hdbscan for iterative-isosplit in SC2 but the run then crashes at the clustering step.

Thanks !

Dominant language
Python
Stars
847
Forks
280
Avg merge
3d 9h
Merged PRs (30d)
29

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SpikeInterface/spikeinterface

All issues in SpikeInterface/spikeinterface

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.