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

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

Closed
Sungmin1234548932asdfasd opened this issue Nov 1, 2023 · 1 comment

Comments

@Sungmin1234548932asdfasd

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.

@Julie-Fabre
Copy link
Owner

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

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

No branches or pull requests

2 participants