Julie-Fabre/bombcell

how to make a .oebin file for multiple day recordings and after cutting bad channels

Sungmin1234548932asdfasd opened this issue · 1 comments

Hi

I am Sungmin Kang who is a post doc in Cardiff University, UK.

First of all, thanks for sharing a wonderful code.

I have recorded some ephys data using a neuropixel 1.0 probe for multiple days.

To keep same cell for days, we merged all data into one big file and run kilosort.

When I had a look for bc_qualityMetrics_pipeline.m, in line 20, I need to set the path for .oebin meta file.

However, unfortunately, as the data is merged, I feel like I need to make another .oebin file for merged data set

Do you have any idea or way to make a .oebin file for multiple recordings? or this program can only run in single data recording.

Another question is that sometimes we cut some bad channels from recorded data.

In this case, do I need to change some setting?

Thanks for again sharing your code.

Hi Sungmin,

I have recorded some ephys data using a neuropixel 1.0 probe for multiple days.
To keep same cell for days, we merged all data into one big file and run kilosort.
When I had a look for bc_qualityMetrics_pipeline.m, in line 20, I need to set the path for .oebin meta file.
However, unfortunately, as the data is merged, I feel like I need to make another .oebin file for merged data set
Do you have any idea or way to make a .oebin file for multiple recordings? or this program can only run in single data recording.

The meta file (in your case oebin) is only used to extract the gain_to_uV scaling factor, which is used to turn the raw mean waveforms bombcell extracts into units of microVolts. You can specify any of the oebin files for this (or create a separate one if you prefer - it needs to contain the value "bit_volts": xxx. Usually it is "bit_volts": 0.19499999284744263.

Another question is that sometimes we cut some bad channels from recorded data.
In this case, do I need to change some setting?

If you remove bad channels from your raw data, you will need to update the value param.nChannels. If it is just in the output of your spike sorter, you can simply use the inputs in bombcell with the bad channels removed. Make sure in the function [qMetric, unitType] = bc_runAllQualityMetrics(param, spikeTimes_samples, spikeTemplates, ... templateWaveforms, templateAmplitudes, pcFeatures, pcFeatureIdx, channelPositions, savePath) that size(templateWaveforms,3) == size(channelPositions,1).

P.S. If you are trying to track cells over days, you might also be interested in unitMatch preprint here, code here. It uses waveform features of units to match them across days, with no need to stitch any recordings together.

Best wishes,
Julie