GLMCC: The generalized linear model for spike cross-correlation
This program estimates interneuronal connections by fitting a generalized linear model (GLM) to spike cross-correlations (Kobayashi et al., Nature Communications 2019). A ready-to-use version of the web application is available at our website. For details, see here.
Python3 Numpy 1.10.4 Scipy 0.17.0 Matplotlib 1.5.1
You can install Numpy, Scipy and Matplotlib by using the following command.
$ pip install numpy
$ pip install scipy
$ pip install matplotlib
Multi-platform support
You can use the following command to clone from Git's repository.
$ git clone 'unknown'
Spike data is in the two directories:
glmcc.py:
glmcc.py has all the necessary functions to estimate interneuronal connections by fitting GLM to spike cross-correlations. You can run this code to plot the spike cross-correlation:
$ python3 glmcc.py CC
where,
You can also run this code to fit the GLM to spike cross-correlations:
$ python3 glmcc.py (GLM or LR)
where, tau+ (tau-) is the time constant after (before) the spike times of the reference neuron, gamma (the defualt parameter was gamma= 0.0005) is the hyper-parameter controling the faltness of a(t) (See Eq.(8) in the paper). This code generates an image file (GLMCC_
$ python3 glmcc.py GLM cell9.txt cell4.txt 4 4 0.0005 5400
Est_Data.py:
This program estimates the connectivity matrix among the neurons in a directory. You can run:
$ python3 Est_Data.py
where, sim (exp) corresponds to simulated (experimental) data, and GLM (LR) corresponds to original GLMCC (revised GLMCC). The output file "W_py_5400.csv" is the estimate of the connectivity matrix (in the units of the post-synaptic potential). The column (row) represents the index of the pre(post)-synaptic neuron. For example, you can analyze the simulation data in "simulation_data":
$ python3 Est_Data.py simulation_data 20 sim GLMCC
glmcc_fitting.py: This program generates a Cross-correlation figure for each pair of neurons. After you run "Est_Data.py", you can run:
$ python3 glmcc_fitting.py
where, sim (exp) corresponds to simulated (experimental) data, GLM (LR) corresponds to original GLMCC (revised GLMCC), and
$ python3 glmcc_fitting.py 20 simulation_data sim W_py_5400.csv all GLMCC
MIT
Please contact Ryota Kobayashi if you want to use the code for commercial purposes.
Junichi Haruna and Masahiro Naito