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

Question regarding Unit IDs #27

Closed
simon37robledo opened this issue Sep 7, 2023 · 4 comments
Closed

Question regarding Unit IDs #27

simon37robledo opened this issue Sep 7, 2023 · 4 comments

Comments

@simon37robledo
Copy link

First, thanks for making Bombcell. It is a great toolbox!  I ran the example pipeline on my data and have some questions: How do the unit IDs relate to the ones in Phy? Can I look at both GUIs simultaneously and compare the units? Looking at the unitType variable, I see that the indexes ==1 don't relate to the somatic unit numbers in the Bombcell GUI.  For example, I search for unit 11 in the GUI, and the title of the unit is a different number. And another question. I may have missed it, but which output provides the spike times per unit? I want to make rasters of the units. 

@Julie-Fabre
Copy link
Owner

Hi Simon,
Thank you for question and I am glad you're enjoying bombcell!

Bombcell stores the unit ID for each unit in qMetric.clusterID, this corresponds to the kilosort/phy label + 1 (the +1 makes it 1-indexed, and easier to use in MATLAB). I've just pushed a change so it's clearer by adding a field qMetric.phy_clusterID that directly gives you the kilosort/phy label.
The value in qMetric.clusterID value does not necessarily correspond to the row in the qMetric structure the unit is in (ie for unit say 5, it might be in row 3 for instance), because kilosort drops units in the last stages of the algorithm but does not rename them, leading to some empty units.

I pushed changes yesterday to make this clearer. There's now a little blurb and example at the end of bc_qualityMetrics_pipeline, and the GUI now displays all three values: the clusterID, the phy clusterID and the row the unit is in (see image below for what it should look like now)
image

@Julie-Fabre
Copy link
Owner

To answer you question about spikes, spike times per unit are extracted with the function bc_loadEphysData. If you use the bc_qualityMetrics_pipeline script, they will be stored in spikeTimes_samples. To get them into seconds, divide spikeTimes_samples by your ephys sampling rate (usually 30000 samples/second).

@simon37robledo
Copy link
Author

Thanks for the answers! It is clear now.

@Julie-Fabre
Copy link
Owner

Great! Closing the issue now. Don't hesitate to open it back up or create a new one if you have any other questions or issues.

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