In the previous sections, we have described how to use the software toolbox LCG to characterize the electrophysiological properties of L5 pyramidal cells and to recreate in vivo-like synaptic activity in a slice preparation. The use of a command-line interface and semi-automated protocol favor the reproducibility and efficiency of the experiment, which can have a large impact on the output and quality of the data produced. Additionally, since the data is saved in a consistent way, it is easy to extend the analysis to a particular goal. Figure 1 shows the typical result of an experiment in which basic electrophysiological properties of a cell using six distinct protocols have been characterized.
Measurement of action potential shape and threshold (Figure 1A): a brief and strong pulse of depolarizing current is injected to measure the average action potential shape. The spike threshold is computed as the first peak of the third derivative of the action potential24. Measurement of the voltage-current curve (Figure 1B): sub-threshold current pulses are injected into the cell, allowing the measurement of passive response properties such as input resistance and the characterization of sub-threshold ionic currents.
Measurement of the minimal current sufficient for eliciting sustained firing (Figure 1C). The injected ramp of current allows for characterization of the cell as a type I or type II oscillator25. Measurement of the frequency-current (f-I) curve (Figure 1D): the injected current is a function of the instantaneous firing frequency and is updated every time the cell spikes, using the closed-loop protocol described in 5. Using this technique, a reliable estimation of the f-I curve can be obtained in less than 30 sec. Measurement of the membrane time constant (Figure 1E): a short hyperpolarizing current pulse is delivered to measure the passive relaxation properties of the membrane. This pulse is then fit to a double exponential to compute the membrane time constant (44 ms in this case).
Adaptation coefficient and response to depolarizing current (Figure 1F): two supra-threshold values of current are injected to measure the adaptation coefficient (ratio between the first and last inter-spike intervals). The automated application of a series of protocols like the ones described allows characterizing each recorded cell in terms of its key electrophysiological properties and constitutes the basic step for any effort aimed at comparing different neuron types and their role, both in health and disease.
Although LCG contains several scripts that implement specialized protocols, most of the power and flexibility of the toolbox resides in the ability to describe experiments by means of configuration files. In Sec. 5 it is described how to perform dynamic clamp to inject simulated background activity into the neuron. Here the concept of configuration files and entities is introduced. A configuration file is simply a text file containing the names and interconnections of all the basic building blocks (called entities) that are required for performing a given experiment; for this reason, designing novel paradigms by connecting entities is a relatively easy task, as is sharing and reusing experimental paradigms. In the experiment shown in Figure 2, five entities are used:
H5Recorder: records the connected entities to a compressed file. The HDF5 file format has been chosen since it is supported by most programming languages such as Python and MATLAB.
RealNeuron: provides an abstraction layer to the technical aspect of the real-time recording and injection. It contains the information about the data acquisition board and performs the active electrode compensation online. When an action potential is detected by threshold crossing, Real Neuron also outputs a spike in the form of an event: this can be used for instance to monitor the firing rate during the experiment or to interface with artificial synapses.
Poisson: generates spike trains following an exponential distribution with a particular rate. The seed of this process can be fixed so that trials can be reproduced consistently.
SynapticConnection: receives the spikes from the generator and relays them to the appropriate synapse after a given delay.
Exp2Synapse: model of a double exponential synapse. It contains the reversal potential and the rise and decay time constants.
As mentioned previously, each entity is connected to one or more others to compose an experiment. In the example of the simulation of an excitatory post-synaptic current described in Sec. 5.1, both the RealNeuron and the Exp2Synapse are connected to the H5Recorder, to save to file membrane voltage and synaptic current, respectively. The Poisson entity delivers spikes generated at a frequency of 2 Hz to the SynapticConnection, which in turn delivers the events to the Exp2Synapse after 1 ms. Finally, the Exp2Synapse entity is connected to the RealNeuron. Using small variations of this configuration file, as shown in Secs. 5.2 and 5.3, one can simulate inhibitory currents and recreate in vivo-like activity.
In Figure 2 it is shown how, by means of a dynamic clamp configuration, one can study synaptic integration in a controlled fashion by simulating the current induced into a neuron by artificial synapses. Figure 2A (top) shows individual post-synaptic potentials (top) together with the injected currents. Red (blue) traces denote excitatory (inhibitory) events. Note that the injected current is a function of the membrane voltage and of the change in conductance associated to the activation of the virtual synapse.
By delivering Poisson spike trains at higher frequencies to the synapses, in vivo-like background activity can be simulated (Figure 2B and 2D). Even during spiking when large currents are injected (black trace in the bottom of Figure 2B), the Active Electrode Compensation guarantees that the shape of the spikes is not affected (Figure 2C), even though a single electrode is used to simultaneously inject current and record the membrane voltage. Repeating multiple trials with the same conductance waveforms allows extending the work of 23 to a more realistic framework, making it possible to separate the contributions of different synaptic currents to reliability and precision of spike timing.
Figure 3 shows a simple example of hybrid network, obtained by recording simultaneously from two unconnected pyramidal cells and using a virtual GABAergic interneuron to simulate a form of disynaptic inhibition, a widespread mechanism that in the cerebral cortex involves the activation of Martinotti cells.26,27 Figure 3A shows a schematic of the experimental setup: a pair of real, unconnected pyramidal cells (black and red triangles) is artificially connected through a simulated GABAergic interneuron, modeled as a leaky integrate-and-fire neuron. The synapse that connects the presynaptic pyramidal cell to the interneuron displays homosynaptic short term facilitation implemented according to the Tsodyks-Markram model28, while the synapse connecting the interneuron and the postsynaptic pyramidal cell is a biexponential synapse with rise and decay time constants of 1 and 10 ms, respectively.
The weights of both connections were adjusted to have a deflection in the postsynaptic membrane potential of approximately 2 mV. Figure 3B and 3C show the response of the presynaptic pyramidal neuron to a train of intracellular pulses delivered at 90 Hz and the corresponding EPSPs in the simulated interneuron: the parameters of the synaptic connection were adjusted in order to have the artificial neuron emit a spike after a presynaptic burst of 3 - 4 spikes at high frequency, as reported experimentally.26,29 Figure 3D shows the effect of the disynaptic inhibition on the real postsynaptic pyramidal cell: 10 trials are superimposed, in which the neuron is stimulated with frozen in vivo-like background activity similar to the one described in Figure 2. Note the increase in reliability in response to the three inhibitory IPSPs, reflected in the smaller spike jitter after the activation of the inhibitory cell, as indicated by the red dashes below the voltage traces.

Figure 1. Electrophysiological characterization of a patched L5 Pyramidal neuron. Output figure of the e-code protocol for a typical pyramidal cell; quantifications are performed automatically and no further editing is required. (A) Calculation of action potential threshold (dashed line -50.5 mV). Red line is the average action potential shape. (B) Measurement of passive response (top) to hyperpolarizing currents (bottom). (C) Response to an increasing depolarizing current to measure the rheobase current (123 pA). (D) Firing frequency as a function of the injected current, measured using a closed-loop approach. Each gray point is located at the pair (current injected, inverse of the interspike interval). The red curve is the linear fit to the data points and the dashed line indicates the rheobase measured in panel (C). (E) Measure of the membrane time constant (43.8 ms). (F) Identification of basic active properties of the cell reveals that the cell is a regular spiking neuron and that there is minimal adaptation. Please click here to view a larger version of this figure.

Figure 2. Recreation of in vivo-like activity using dynamic clamp. (A) Simulation of excitatory (red, Sec. 5.1) and inhibitory (blue, Sec. 5.2) synapses, gray traces are other realizations of the same experiment. (B) Top, voltage traces recorded from a L5 pyramidal neuron subject to a bombardment of excitatory (inhibitory) post-synaptic currents at a rate of 7,000 (3,000) Hz. Multiple realizations with a fixed random seed are displayed in the figure (grey traces). Bottom, corresponding excitatory (red), inhibitory (blue) and total (black) current injected into the cell. (C) Shapes of the spikes during the experiment in (B). (D) Raster plot of the spikes generated across 20 trials shows that the neuron can be extremely reliable and precise in response to the same input as seen in 23. Please click here to view a larger version of this figure.


Figure 3. Simulation of disynaptic inhibition via a simulated inhibitory interneuron. (A) Schematic of the recording setup: the black and red pyramids represent a pair of real pyramidal cells recorded simultaneously. Black and red indicate presynaptic and postsynaptic neuron, respectively. The blue circle represents a virtual GABAergic interneuron, contacted by the black pyramidal cell, that in turn inhibits the red pyramidal cell. (B) Response of the real presynaptic pyramidal neuron to a train of pulses delivered at a frequency of 90 Hz, indicated by the orange dashes above the voltage trace. The black dashes below the voltage trace indicate the times action potentials were emitted by the presynaptic cell. (C) Response of the simulated interneuron to the train of spikes emitted by the presynaptic cell. (D) Superposition of 10 voltage traces recorded from the real postsynaptic pyramidal cell in response to the activation of the simulated interneuron. The postsynaptic cell was stimulated with frozen in vivo-like background activity, to obtain reliable voltage dynamics. The red dashes below the voltage traces indicate the times at which, during successive trials, the postsynaptic neurons emitted an action potential. Note the increased precision after the activation of the interneuron, indicated by a lower spike jitter across trials.