Title: | Point-Process Response Model for Optogenetics |
---|---|
Description: | Optogenetics is a new tool to study neuronal circuits that have been genetically modified to allow stimulation by flashes of light. This package implements the methodological framework, Point-process Response model for Optogenetics (PRO), for analyzing data from these experiments. This method provides explicit nonlinear transformations to link the flash point-process with the spiking point-process. Such response functions can be used to provide important and interpretable scientific insights into the properties of the biophysical process that governs neural spiking in response to optogenetic stimulation. |
Authors: | Xi (Rossi) LUO with contributions from Dylan Small and Vikaas Sohal |
Maintainer: | Xi (Rossi) LUO <[email protected]> |
License: | GPL-2 |
Version: | 0.1.1 |
Built: | 2024-11-11 03:43:20 UTC |
Source: | https://github.com/rluo/pro |
Constructs a data.frame
to be fitted using pro
.
Reference: X Luo, S Gee, V Sohal, D Small (In Press). A Point-process Response Model for Optogenetics Experiments on Neural Circuits. _Statistics in Medicine_.
model.pro(spike, flash, fixed = NULL, kv = F)
model.pro(spike, flash, fixed = NULL, kv = F)
spike |
A binary vector represents spiking (1) or no spiking (0). |
flash |
A binary vector of the same length of |
fixed |
Whether a fixed time window of spike/flash history should be used. If it is |
kv |
Whether the history dependence model in Kass and Ventura (2001) (A Spike-Train Probability Model, Neural Computation 13, 1713-1720) should be employed. This differs from the history dependence model in the reference. |
a data.frame
of the three response functions (PF, CF, SF) and other intermediate functions (for future modeling use).
n <- 500 set.seed(100) re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3) d <- model.pro(re$sbin, re$I) d[1:10, ]
n <- 500 set.seed(100) re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3) d <- model.pro(re$sbin, re$I) d[1:10, ]
Fit the PRO model to data. Reference: X Luo, S Gee, V Sohal, D Small (In Press). A Point-process Response Model for Optogenetics Experiments on Neural Circuits. _Statistics in Medicine_.
pro(spike, flash, ...)
pro(spike, flash, ...)
spike |
A binary vector represents spiking (1) or no spiking (0). |
flash |
A binary vector of the same length of |
... |
Additional parameters, see |
a glm
object of the fitted PRO coefficients.
n <- 500 set.seed(100) re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3) fit.pro <- pro(re$sbin, re$I) summary(fit.pro)
n <- 500 set.seed(100) re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3) fit.pro <- pro(re$sbin, re$I) summary(fit.pro)
Simulate various kinds of neural measures (e.g. membrane potentials and spikes) from a LIF neuron.
sim.lif(n, I, C, R, Vth = 1, V0 = 0, bin = 5, dt = 0.05)
sim.lif(n, I, C, R, Vth = 1, V0 = 0, bin = 5, dt = 0.05)
n |
Number of time bins. The total time is |
I |
Input stimulus vector of length |
C |
Membrane capacitance of the simulated neuron. |
R |
Membrane resistance of the simulated neuron. |
Vth |
Membrane potential threshold for spiking. |
V0 |
Membrane potential reset value after spiking. |
bin |
Time length for each time bin. Default 5 millisecond. |
dt |
Time length for each simulation step. Default 0.05 millisecond. |
a list
of simulated neural spikes, optogenetic light flashes, and simulation parameters.
n<- 500 set.seed(100) re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3)
n<- 500 set.seed(100) re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3)