Help with waveforms data

Hello everyone, is there any notebook (with a python/matlab code) that illustrates how to analyse waveforms data (ie how to classify an excitatory/inhibitory neuron based on his waveforms?)

1 Like

Yes. Check out this review and the references there in.

In general you want to do the following:

  1. Take raw waveforms from data for each unit

  2. Average them

  3. Interpolate between waveform points for smoother estimates

  4. Measure features of interest. The ones I’ve found to work best are the difference in time between the peak and the trough of the waveform plus the width at 1/2 height of the hyper polarisation part of the waveform.

  5. Then you do k-means clustering with 2 centroids on this 2D data. You can use other clustering approaches too.

  6. You may want to validate the clustering approach via computing cross correlograms for your neurons and seeing whether inhibitory neurons from clustering have negative cross correlograms with at least one neuron in the time period 0-4ms and positive for putative excitatory.

If raw waveforms not available, you can take the mean ones that are provided.

Sorry, I should have specified that I’m looking for a code that implement that different steps (python/matlab).

I am afraid this is not smth so standard such that packages exist.

I have a Matlab code that works with Neuropixels data. It’s not a proper library or package like in Python but I am happy to share and explain how it works.

We can arrange Zoom or other way so I can tell you how to use it if you want.

@Nya the trough-to-peak duration has already been calculated and is in the data. Check out the comments in the data loader at the top to see how this relates to excitatory/inhibitory neurons. It’s important to know that only some inhibitory neurons can be found this way (PV-positive or fast spiking interneurons) and that this can only be used in cortex and hippocampus.

2 Likes

And it goes the other way too…there’s a subclass of pyramidal cells that fire very thin, “inhibitory-style” action potentials too, at least in cat visual cortex. (I spent a year sitting in the dark, hunting for them!)

1 Like