NII-Kobayashi / GLMCC

GLMCC: The generalized linear model for spike cross-correlation (Kobayashi et al., Nature Communications, 2019)
MIT License
33 stars 3 forks source link

Using Revised GLM on numpy CCG #4

Open Lidors opened 3 years ago

Lidors commented 3 years ago

Hi,

I would like to use the GLMCC on my own data ( hippocampal mice data recorded with high dens silicon probe). The best way for me to integrate the GLMCC into my data analysis pipeline is to apply it on a numpy array of already made CCGs (a matrix which each column is a different CCG). Is there a way to give a CCG matrix as an input and to get as an output the connectivity (detection and PSP estimation) for each CCG together with all the other outputs to generate my own figures? Alternatively, if there is a MATLAB version for the GLMCC (which I assume there isn't) I could use it right away.

Thanks,

r-koba84 commented 2 years ago

Thanks for your inquiry.

The ideal way is to prepare the input format from the original data (spike times of each neuron).

You can also estimate the PSP using our python code from each CCG data if you prepare the artificial spike trains of two neurons from the CCG of a pair of neurons: 1) The spike times of a neuron should be an arithmetic sequence (periodic spike sequence) with a large period (e.g. T=1 [sec]): t_k= k* T, where t_k is the k-th spike time of the neuron. The number of spikes is equal to the number of CCG data. 2) The spike times of the other neuron should be the sum of the spike times of the periodic neuron and the time lag that corresponds to the CCG data: s_k= t_k + lag_k, where s_k is the k-th spike time of the neuron.

Though we are working on the MATLAB code, it will take a long time for coding. Thus, I suggest you work on the python code.

Sincerely yours, Ryota Kobayashi