Closed-loop protocols are becoming increasingly widespread in modern day electrophysiology. We present a simple, versatile and inexpensive way to perform complex electrophysiological protocols in cortical pyramidal neurons in vitro, using a desktop computer and a digital acquisition board.
Experimental neuroscience is witnessing an increased interest in the development and application of novel and often complex, closed-loop protocols, where the stimulus applied depends in real-time on the response of the system. Recent applications range from the implementation of virtual reality systems for studying motor responses both in mice1 and in zebrafish2, to control of seizures following cortical stroke using optogenetics3. A key advantage of closed-loop techniques resides in the capability of probing higher dimensional properties that are not directly accessible or that depend on multiple variables, such as neuronal excitability4 and reliability, while at the same time maximizing the experimental throughput. In this contribution and in the context of cellular electrophysiology, we describe how to apply a variety of closed-loop protocols to the study of the response properties of pyramidal cortical neurons, recorded intracellularly with the patch clamp technique in acute brain slices from the somatosensory cortex of juvenile rats. As no commercially available or open source software provides all the features required for efficiently performing the experiments described here, a new software toolbox called LCG5 was developed, whose modular structure maximizes reuse of computer code and facilitates the implementation of novel experimental paradigms. Stimulation waveforms are specified using a compact meta-description and full experimental protocols are described in text-based configuration files. Additionally, LCG has a command-line interface that is suited for repetition of trials and automation of experimental protocols.
In recent years, cellular electrophysiology has evolved from the traditional open-loop paradigm employed in voltage and current clamp experiments to modern closed-loop protocols. The best known closed-loop technique is perhaps the dynamic clamp6,7, which enabled the synthetic injection of artificial voltage-gated ion channels to determine the neuronal membrane voltage8, the in-depth study of the effects of non-deterministic flickering on ion channels on neuronal response dynamics9, as well as the recreation in vitro of realistic in vivo-like synaptic background activity10.
Other closed-loop paradigms that have been proposed include the reactive clamp11, to study in vitro the generation of self-sustained persistent activity, and the response clamp4,12, to investigate the cellular mechanisms underlying neuronal excitability.
Here we describe a powerful framework that allows applying a variety of closed-loop electrophysiological protocols in the context of whole-cell patch clamp recordings performed in acute brain slices. We show how to record somatic membrane voltage by means of patch clamp recordings in pyramidal neurons from the somatosensory cortex of juvenile rats and apply three different closed-loop protocols using LCG, a command-line-based software toolbox developed in the laboratory of Theoretical Neurobiology and Neuroengineering.
Briefly, the described protocols are, first the automated injection of a series of current clamp stimulus waveforms, relevant for the characterization of a large set of active and passive membrane properties. These have been suggested to capture the electrophysiological phenotype of a cell in terms of its response properties to a stereotyped series of stimulus waveforms. Known as the e-code of a cell (e.g., see 13,14), such a collection of electrical responses is used by several laboratories to objectively classify neurons on the basis of their electrical properties. This includes the analysis of the stationary input-output transfer relationship (f-I curve), by an innovative technique that involves the closed-loop, real-time control of the rate of firing by means of a proportional-integral-derivative (PID) controller, second the recreation of realistic in vivo-like background synaptic activity in in vitro preparations10 and , third the artificial connection in real-time of two simultaneously recorded pyramidal neurons by means of a virtual GABAergic interneuron, which is simulated by the computer.
Additionally, LCG implements the technique known as Active Electrode Compensation (AEC)15, which allows implementing dynamic clamp protocols using a single electrode. This allows compensating undesired effects (artifacts) of the recording electrode that arise when it is used for delivering intracellular stimuli. The method is based on a non-parametric estimate of the equivalent electrical properties of the recording circuit.
The techniques and experimental protocols described in this paper can be readily applied in conventional open-loop voltage and current clamp experiments and can be extended to other preparations, such as extracellular4,16 or intracellular recordings in vivo17,18. The careful assembly of the setup for whole cell patch clamp electrophysiology is a very important step for stable, high quality recordings. In the following we assume that such an experimental setup is already available to the experimenter, and focus our attention on describing the usage of LCG. The reader is pointed to 19–22 for additional tips about optimization and debugging.
The protocol described here complies with the recommendations and guidelines of the Ethics Committee of the Department of Biomedical Sciences of the University of Antwerp. This protocol requires the preparation of non-sentient material from the explanted brain of juvenile Wistar rats, obtained by approved humane euthanasia techniques.
1. Equipment Preparation
2. Preparation of Acute Brain Slices from the Somatosensory Cortex
3. Patch-clamp Recordings from Layer 5 Pyramidal Neurons
4. Semi-automatic Characterization of a Neuron’s Electrical Response Properties
5. Injection of Conductance through Simulated Synapses and Simulation of In Vivo-like Background Activity
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.
In this text a full protocol for the implementation of real-time, closed-loop single cell electrophysiological experiments was described, using the patch clamp technique and a recently developed software toolbox called LCG. To optimize the quality of the recordings it is crucial that the recording setup be properly grounded, shielded and vibration free: this ensures stable and lasting whole-cell access to the cell, which, together with the possibility of automating entire sections of the stimulation protocols, allows for maximization of the throughput of the experiment.
Two cases in which LCG can be applied have been presented, namely the characterization of a cell in terms of its electrophysiological properties (Figure 1), including the fast computation of a neuron’s active input-output relationship, and the recreation of in vivo-like activity in a brain slice (Figure 2). Such applications showed how to construct distinct protocols and highlighted some of the most prominent features of LCG: its command-line interface makes it suited for scripting, which enables the automated application of a series of protocols. Additionally, as was done in Figure 1, values extracted from one protocol can be used to tailor parameters of subsequent protocols.
It is possible to monitor in real time higher order features of the response of the cell under analysis (e.g., its instantaneous firing rate, as shown in Figure 1D) and modify the stimulation accordingly, for instance by using a PID controller to compute the current required to maintain a constant or time-varying firing rate.
The implementation of conductance and dynamic clamp protocols with LCG is straightforward and only requires writing a text configuration file, a procedure that can be automated by the usage of simple scripts. LCG includes over 30 entities that can be interconnected to devise new experimental protocols. We described how to use LCG using a command line interface, however a graphical experiment launcher has been designed to facilitate starting experiments and changing parameters by letting non-experienced users combine LCG commands to create their own graphical interfaces.
Two existing toolboxes offer functionalities similar to LCG: RELACS and RTXI. The former is both a platform for performing electrophysiological experiments and for analyzing and annotating the recorded data. The main difference between LCG and existing solutions is its user interface based on a command-line. The advantages of this approach are several: first of all, a command-line interface allows automating standardized and repetitive tasks by means of possibly complex scripts and secondly, it allows embedding experimental trials into more complicated workflows implemented in high-level scripting language, such as Matlab or Python.
In summary, the modular nature of LCG allows expanding the number of available experimental protocols in two ways: the first and most straightforward one is by writing ad hoc configuration files that use the existing objects to perform novel protocols. The second one is by implementing – using C++ – new elementary objects that can be used to expand further the capabilities and features of LCG. The examples presented in this protocol concern the study of individual cells in brain slices. However, similar protocols can also be successfully employed in in vivo preparations, to record both intracellular and extracellular signals, and in ex vivo preparations such as neuronal cultures, to record, for instance, extracellular potentials through multi-electrode arrays while stimulating in closed-loop4.
The authors have nothing to disclose.
Financial support from the Flanders Research Foundation FWO (contract n. 12C9112N to DL), the 7th Framework Programme of the European Commission (Marie Curie Network “C7”, contract n. 238214; ICT Future Emerging Technology “ENLIGHTENMENT” project, contract n. 306502), the Interuniversity Attraction Poles Program initiated by the Belgian Science Policy Office (contract n. IUAP-VII/20), and the University of Antwerp is kindly acknowledged.
Tissue slicer | Leica | VT-1000S | |
Pipette puller | Sutter | P-97 | |
Pipettes | WPI | 1B150F-4 | 1.5/0.84 mm OD/ID, with filament |
Vibration isolation table | TMC | 20 Series | |
Microscope | Leica | DMLFS | 40X Immersion Objective |
Manipulators | Scientifica | PatchStar | |
Amplifiers | Axon Instruments | MultiClamp 700B | Computer controlled |
Data acquisition card | National Instruments | PCI-6229 | Supported by Comedi Linux Drivers |
Desktop computer | Dell | Optiplex 7010 Tower | OS: real-time Linux |
Oscilloscopes | Tektronix | TDS-1002 | |
Perfusion Pump | Gibson | MINIPULS3 | Used with R4 Pump head (F117606) |
Temperature controller | Multichannel Systems | TC02 | PH01 Perfusion Cannula |
Manometer | Testo | 510 | Optional |
Incubator | Memmert | WB14 | |
NaCl | Sigma | 71376 | ACSF |
KCl | Sigma | P9541 | ACSF, ICS |
NaH2PO4 | Sigma | S3139 | ACSF |
NaHCO3 | Sigma | S6014 | ACSF |
CaCl2 | Sigma | C1016 | ACSF |
MgCl2 | Sigma | M8266 | ACSF |
Glucose | Sigma | G7528 | ACSF |
K-Gluconate | Sigma | G4500 | ICS |
HEPES | Sigma | H3375 | ICS |
Mg-ATP | Sigma | A9187 | ICS |
Na2-GTP | Sigma | 51120 | ICS |
Na2-Phosphocreatine | Sigma | P7936 | ICS |