Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kilosort 2 without channel map #528

Closed
robisonwr opened this issue Jan 24, 2023 · 7 comments · Fixed by #595
Closed

Kilosort 2 without channel map #528

robisonwr opened this issue Jan 24, 2023 · 7 comments · Fixed by #595

Comments

@robisonwr
Copy link

Hello,

I was wondering if it was possible to spike sort with kilosort without using a proper channel map? We're recording using bundles of microwaves that splay out into the brain, so there is no way for us to know the position of each channel relative to the others. From what I've been able to gather, kilosort 2 may be our best bet.

Any information would be helpful.

Thanks,
Will

@ianheimbuch
Copy link

ianheimbuch commented Feb 8, 2023

Yes, I believe you can 🙂 The two main things you'll need to set in your config for Kilosort is 1) the drift correction parameter ops.nblocks and 2) to make a specific channel map, ops.chanMap.

1. Turn off drift correction
Set the drift correction paramter to 0, since drift correction requires lots of overlapping channels to function (e.g. on the Neuropixels probes)

% type of data shifting (0 = none, 1 = rigid, 2 = nonrigid)
ops.nblocks = 0;

2. Create a channel map with large spacing
Make a channel map (config variable name: ops.chanMap) that has large spacing, so Kilosort knows channels are far away and will not be picking up the same units.

To help with specifics on the channel map, could you provide more details on your recording electrodes? Are you using bundled wire tetrodes?

@robisonwr
Copy link
Author

robisonwr commented Sep 5, 2023

Yes, I believe you can 🙂 The two main things you'll need to set in your config for Kilosort is 1) the drift correction parameter ops.nblocks and 2) to make a specific channel map, ops.chanMap.

1. Turn of drift correction Set the drift correction paramter to 0, since drift correction requires lots of overlapping channels to function (e.g. on the Neuropixels probes)

% type of data shifting (0 = none, 1 = rigid, 2 = nonrigid)
ops.nblocks = 0;

2. Create a channel map with large spacing Make a channel map (config variable name: ops.chanMap) that has large spacing, so Kilosort knows channels are far away and will not be picking up the same units.

To help with specifics on the channel map, could you provide more details on your recording electrodes? Are you using bundled wire tetrodes?

Great, so this means we'll just have to do all the merging manually in phy? And we're using 64 channel microwire arrays, in which we don't know the geometry now that they're implanted. Is there any way we can treat every channel as if it's neighboring every other channel. It seems like kilosort has strong bias to compare neighboring channels.

@ianheimbuch
Copy link

So that I can give a better answer, what kind of microwire away exactly are you using? In your original post, it sounded like you were using bundled microwire tetrodes, but your more recent comment you mention "64 channel microwire arrays", which sounds like the microwire arrays sold by entities like Tucker-Davis Technologies (TDT), etc.

@ckfaber
Copy link

ckfaber commented Oct 20, 2023

@ianheimbuch I have a related follow-up question for you, re: the 'large spacing' you mentioned in creating a channel map. I'm using NeuroNexus 16-32-channel probes, and have had some confusion on the x-, y-, and kcoords units. Do the numbers entered into these variables correspond to some real distance apart?

@ianheimbuch
Copy link

@ianheimbuch I have a related follow-up question for you, re: the 'large spacing' you mentioned in creating a channel map. I'm using NeuroNexus 16-32-channel probes, and have had some confusion on the x-, y-, and kcoords units. Do the numbers entered into these variables correspond to some real distance apart?

My understanding is that it is the relative values that matter. As such, yes I use the true distances apart in μm. You should be able to find the relative distances for your exact probe in the electrode map documentation from NeuroNexus 🙂

@robisonwr
Copy link
Author

So that I can give a better answer, what kind of microwire away exactly are you using? In your original post, it sounded like you were using bundled microwire tetrodes, but your more recent comment you mention "64 channel microwire arrays", which sounds like the microwire arrays sold by entities like Tucker-Davis Technologies (TDT), etc.

Sorry for the delayed response! We're using microwire brush array by microprobes, they're this: https://microprobes.com/products/multichannel-arrays/mba. Due to its nature, we can't know the position of each channel and therefore can't create a proper channel map. What we'd like is for kilosort to compare all channels against each other. We've tried a basic 8x8 channel map, but whenever we randomize the channel locations within the 8x8 map, we get different results.

@ianheimbuch
Copy link

ianheimbuch commented Oct 25, 2023

We're using microwire brush array by microprobes

whenever we randomize the channel locations within the 8x8 map, we get different results

Oh wow, that sounds tricky! 😅 I don't think I'll have a perfect answer for that for Kilosort, because it is my understanding the Kilosort requires information about channel separation. As such, I think you might always have this issue regardless of how you do the channel map (i.e. results will always change depending on how you set the channel map).

If Kilosort does not have a way to all channels to be compared against one another evenly:
Perhaps your use case may actually be best suited with another algorithm? I believe MountainSort does not take into account channel separation, for example. MountainSort appears to be available via SpikeInterface.

But Kilosort team should feel free to correct me if there is a way to use Kilosort while keeping channels equally separated from each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants