Abstract
Studies of neuronal network emergence during sensory processing and motor control are greatly promoted by technologies that allow us to simultaneously record the membrane potential dynamics of a large population of neurons in single cell resolution. To achieve whole-brain recording with the ability to detect both small synaptic potentials and action potentials, we developed a voltage-sensitive dye (VSD) imaging technique based on a double-sided microscope that can image two sides of a nervous system simultaneously. We applied this system to the segmental ganglia of the medicinal leech. Double-sided VSD imaging enabled simultaneous recording of membrane potential events from almost all of the identifiable neurons. Using data obtained from double-sided VSD imaging we analyzed neuronal dynamics in both sensory processing and generation of behavior and constructed functional maps for identification of neurons contributing to these processes.
Introduction
One of the principal goals in neuroscience is to clarify how neuronal circuits process sensory information and control behavior. Sensory information and behavioral states are represented as dynamic activity patterns of neuronal populations in large neuronal networks. To clarify the neuronal mechanisms underlying sensory processing and behavioral generation, it is necessary to determine which neurons are involved in functionally relevant neuronal dynamics and how those neuronal components interact with each other within the larger network. Technological advances in neuroimaging have enabled brain-wide recording of neuronal activity with sufficiently fine spatial resolution to identify individual neurons within a population1. Researchers can perform pan-neuronal Ca2+ imaging in selected animals with small size nervous systems, including larval zebrafish 1 and C. elegans 2-4.
Although Ca2+ imaging is a convenient tool for detecting neuronal activity, it is limited to intracellular events that are associated with a change in Ca2+ concentration. Thus, Ca2+ imaging measures neither subthreshold depolarizing nor hyperpolarizing synaptic events. Accordingly, it is difficult to observe synaptic integration processes using Ca2+ indicators. In contrast, voltage sensitive dyes (VSDs) can detect both action potentials and sub-threshold excitatory and inhibitory synaptic potentials. Voltage sensors have enabled neuroscientists to examine ethologically relevant neuronal dynamics and to functionally map parts of the nervous systems of sea slugs5-7 and the medicinal leech Hirudo verbana 8-10. The segmental ganglion of the leech is particularly well suited for comprehensive recording using VSD imaging for two reasons: It consists of only about 400 identifiable neurons 11 arranged in a well-preserved geometry in a single spherical shell surrounding a central neuropil, and it functions as a basic unit of sensory processing and control of several behaviors 12. In the leech segmental ganglion, multiple neuronal circuits responsible for reflexive and voluntary locomotor behaviors have already been characterized by electrophysiology and VSD imaging 8-10, 12. However, existing technology only allowed imaging one side of a ganglion at a time, and hence captured the activity of at most half of the full ensemble of neurons: they could record from, at most, approximately 15% of all 6000 neurons in a pedal ganglion of Aplysia, and fewer than 50% of all 400 neurons in a leech segmental ganglion. In addition, VSDs applied in these previous studies had a disadvantage either on its sensitivity or its response speed: electrochromic dyes used in sea slugs do not possess enough sensitivity to detect subthreshold potentials5, 6 and FRET-based dye previously used in the leech has a non-negligible delay between optical signal and actual voltage change8, 9.
To overcome these limitations, we developed a double-sided microscope for VSD imaging, consisting of precisely aligned upright and inverted fluorescent microscopes, and imaged voltage changes from the neuronal membrane stained by a highly-sensitive, fast VSD13. This microscope enabled us to record from all cell bodies of a leech ganglion regardless of their location, and allowed us, for the first time, to directly analyze functional relationships between neurons located on opposite surfaces. We combined this double-sided neuronal imaging system with simultaneous electrophysiological recording and stimulation, which allowed us to monitor motor outputs, to verify agreement of VSD signals with actual membrane potentials, and to activate or inhibit selected target cells by injecting current.
To demonstrate the utility of the newly developed VSD imaging method, we addressed the following two questions. (1) How are individual identifiable neurons that exhibit higher discriminability for the different sensory stimuli distributed across different surfaces of the ganglion? (2) To what extent are neural circuit components unique or shared between different behaviors?
Results
VSD imaging using double-sided microscopy system
Double-sided VSD imaging requires simultaneously focusing two fluorescent microscopes. We achieved this by mounting the fluorescence train of an Olympus BX upright microscope with a custom focus rack on top of the body of an Olympus IX inverted microscope. Both microscopes were equipped with 20x objectives. An optically stabilized high-power LED 14 provided excitation light through the top objective, which operated in epifluorescence mode. The top objective also functioned as a condenser lens for imaging with the bottom objective, which thus operated in transfluorescence mode (Fig. 1a). Because of the high NA of the top objective, inhomogeneities in the imaged tissue did not cause substantive deviations from uniform illumination of the bottom focal plane.
(a) Schematic of the double-sided microscope. (b) Images of the ventral (left) and dorsal (right) aspects of a leech ganglion simultaneously acquired using this microscope. (c) Canonical maps of the ventral (left) and dorsal (right) aspects of the ganglion. (d) Single-sweep recordings of neuronal activity. Optical signals from VSD imaging (blue) are overlaid with simultaneous intracellular recordings (black). 1. Action potentials and subthreshold potentials in a Retzius cell; 2. Spontaneous regular firing in an AP cell; 3. Swimming pattern in a DE-3 motor neuron; 4. Crawling pattern in an AE cell.
The two microscopes were first coarsely aligned (to within about 200 μm) by moving the upright microscope’s body and its objective turret, after which micro-alignment was achieved by fine-tuning the position of the upright microscope’s objectives in their turret. We used highly sensitive CCD cameras (Photometrics QuantEM 512SC) to image neuronal activity with single cell resolution throughout the ganglion (Fig. 1b). We suppressed mechanical vibration noise by replacing the internal fans of the CCD cameras with external blowers. Photon noise was not substantially different between the top and the bottom image (Top: 72 ± 3 ppm; Bottom: 65 ± 3 ppm (mean ± SEM over 10 areas size-matched to typical cells).
We imaged neural activity with a new-generation voltage sensitive dye, VF2.1(OMe).H 13, which is sensitive enough to record subthreshold events and fast enough to detect action potentials with accurate timing. The dye was loaded into somatic membranes on both aspects of a ganglion by bath application and a perfusion pump for targeted delivery 8. In leech ganglia, the sensitivity reached 2.7% ± 0.3% (mean ± SD across five ganglia in two leeches) at resting potential (-50 mV) (Supplementary Fig. 1). Microscopic motion artifacts can have outsized effects on VSD signals compared to Ca2+ signals because of the limited relative change in fluorescence of VSDs and their location in the cell membrane. Accordingly, we applied a custom motion correction algorithm to all imaging data (Supplementary Fig.2 & Materials and Methods). Bleaching artifacts in the optical signals were corrected using locally fitted cubic polynomials 15 (Supplementary Fig.3) and global fluctuations were subtracted away 16 (Materials and Methods). The voltage sensor faithfully detected various types of membrane potential change, including action potentials, excitatory and inhibitory postsynaptic potentials, and rhythmic oscillation during fictive behaviors (Fig. 1d).
Panneuronal VSD imaging and functional mapping based on coherence analysis
We established a mapping between cells seen in the fluorescent images (Fig. 1b) and identified neurons on a canonical map (Fig. 1c) using a semi-automated procedure in a custom user interface (Materials and Methods). One of the major advantages of VSDs is that recorded traces can be directly compared to intracellular voltage recordings. This allowed us to identify selected cells in our recordings by comparing our data to previously published intracellular activity of those neurons in the same behaviors.
Optically recorded signals simultaneously recorded from both sides of the ganglion closely matched typical patterns of fictive behaviors that have been previously well characterized by electrophysiology and single-sided VSD imaging9, 12. We first focused on fictive swimming, which we induced by electrically stimulating a DP nerve root of a posterior ganglion9 (typically, M13). We then imaged ganglion M10 with our double-sided microscope and simultaneously recorded intracellularly from selected cells (Fig. 2a). Rhythmic activity associated with swimming was readily observed, and we determined which cells were involved in this rhythm by calculating the phase and magnitude of coherence9 for each cell at the frequency with the greatest spectral power in the rhythm (Fig. 2b, c). The optical signal of dorsal inhibitor motor neuron DI-1 exhibits a well-understood swimming oscillation and was used as the phase reference for other cells. Using the VF2.1(OMe).H dye, we were able to confirm the oscillatory behavior of neurons previously studied using an earlier-generation dye 9. In addition, we were able to detect weaker oscillations in many other neurons on both sides of the ganglion.
(a) Selected electrophysiological and VSD traces during fictive swimming. Extracellular recording from a nerve root in a posterior segment (DP(13)) showed rhythmic dorsal motor neuron bursts characteristic of swimming (top). Intracellular recording and simultaneous optical signal from an AE neuron show matching membrane potential oscillations. VSD signals from the ventral surface: bilateral cells 153 (a sensory neuron) and the Retzius cell (a neuromodulatory neuron). VSD signals from the dorsal surface: dorsal and ventral inhibitory and excitatory motor neurons DI-1, VI-2, DE-3, and VE-4. (b) Coherence of the optically recorded signals of all cells on the ventral (left) and dorsal (right) surfaces of the ganglion with the swim rhythm. Cells used in (a) are marked. (c) Magnitude (radial axis from 0 to 1) and phase (angular coordinate) of the coherence of each neuron’s activity with the swim rhythm; same data as in (b). Error bars indicate confidence intervals based on a multi-taper estimate.
Results from coherence analysis obtained from doubly desheathed ganglia imaged using either camera in our double-sided microscope closely matched results from conventional single-sided imaging, as evidenced by the consistency of the coherence maps computed from either method (Fig. 2b and Supplementary Fig.4). The measured amplitudes of swim oscillations in motor neuron DI-1, the noise levels in those recordings, and the coherence between bilateral homologues of DI-1 were also indistinguishable between single-sided and double-sided imaging experiments (Supplementary Fig.4), indicating that double-sided imaging does not entail any compromises from an imaging quality perspective.
Encoding of stimulus identity by individual neurons
We used double-sided VSD imaging to record the activity of all neurons in isolated single ganglia during a fictive reflexive behavior known as local bending, a withdrawal response to tactile stimulation in which the leech bends its body away from the stimulated location 12. Local bending can be induced readily in isolated single ganglia by stimulating one of four pressure-sensitive sensory neurons (P cells). Stimulating P cells causes a combination of excitation and inhibition in identified “local bend interneurons” (LBIs)12, 17. The LBIs synapse onto several motor neurons to produce an appropriate pattern of contraction and relaxation in the local area of the body wall that depends on which location (or which P cell) was stimulated12, 17, 18.
We induced local bending by stimulating the left and right ventral P cells (PVL and PVR) with trains of depolarizing pulses (20 Hz, 50% duty cycle, 1 s), which reliably evoked action potentials in those cells (Fig. 3a, b). Stimuli were presented in order of LRRLLR…, for a total of 10 stimuli per P cell. From each of the resulting VSD traces, we extracted the average fluorescence change (ΔF/F) during the first 0.5 s of the stimulus as well as during a control phase (1–0.5 s before stimulus onset), both relative to a reference phase (0.5–0.1 s before stimulus onset; Fig. 3c). Using a leave-one-out procedure, we calculated for each of the cells how reliably their activity could be used to “predict” which of the P cells had been stimulated (Fig. 3d). We then established a mapping between cells in the VSD images and identified neurons on the canonical maps to determine for all identified neurons to what degree their activity encoded stimulus identity (Fig. 3e).
(a) Schematic of the setup. Microelectrodes were inserted into left and right PV cells for stimulation and into the right AP cell for recording. A suction electrode around the right DP nerve confirmed the execution of a (fictive) local bend. (b) Simultaneously recorded motor activity from the DP nerve (top), membrane potential from the AP neuron (middle, black) and its corresponding VSD trace (blue) in response to stimuli to PVL (left) and PVR (right). Stimulus duration was 1 second (bottom). (c) Time series of averaged difference between PVL (n = 10) and PVR (n = 10) trials in the activity of all 248 recorded cells. Positive (red) indicates more depolarization (or less hyperpolarization) in response to PVR stimulation. Scale bar: 1 second. (d) Stimulus discriminability score overlaid on images of the ventral (left) and dorsal (right) aspects of the ganglion. Scale bars: 100 μm. (e) Averaged discriminability results across 8 animals. Color scale as in (d). Motor neurons (MNs) and LBIs are marked (black circles) as are other cells that strongly discriminate between stimuli (≥75% prediction success; circles and arrow heads). (f) Number of cells that could be mapped to identified neurons; mean and SD of 8 preparations and individual results (dots). Dashed lines indicate total number of cells in the canonical maps. (g) Number of cells that strongly discriminate between stimuli (≥75% prediction success) compared to control (grey bars). (*: p < 10−4; Paired sample T-test) (h) Discriminability scores for all neurons on the ventral (left) and dorsal (right) surfaces. Colored lines mark the scores of LBIs, AP cells and MNs.
On average across eight experiments, 113 ± 11 (mean ± SD) cells on the ventral surface and 129 ± 6 on the dorsal surface could be mapped to identified neurons (Fig. 3f). Among those, 28% of ventral cells [35 ± 11, mean ± SD] and 36% of dorsal cells (52 ± 18) encoded stimulus identity with prediction success higher than 75% during the first 0.5 s of the stimulus. This included one ventral LBI, all dorsal LBIs, and most motor neurons (MNs; Fig. 3g). (All other ventral LBIs had prediction success in the range 65%–75%. In contrast, the average prediction success in the control period was at chance level: 50.9 % ± 1.3% (mean ± SEM) for both ventral and dorsal cells.) The other neurons with high prediction success were AP cells and Leydig cells, as well as cells provisionally identified as cells 56, 61, 251, and 152 on the ventral surface and cells 9, 10, 22, 28, 107, and 123 on the dorsal surface.
Involvement of individual neurons in multiple behaviors
To further establish the utility of double-sided VSD imaging, we set out to determine to what extent neural circuit components are unique or shared between three behaviors: local bending, swimming, and crawling. To do so, we evoked the corresponding fictive behaviors in isolated whole nerve cords using electrical stimulation9. Specifically, local bending was activated by intracellular stimulation of a single PVL or PVR 19; swimming was elicited by stimulating a DP nerve from either ganglion 11, 12, or 13; and crawling was elicited by stimulating tail brain nerve roots. Motor patterns of local bending and swimming were confirmed based on extracellular recordings of DP nerves or intracellular recording of AE cells9, 10, 20. Crawling patterns were confirmed based on by simultaneous intracellular recordings from two different motor neurons: the AE and CV cells9. All three behaviors could be induced in each of six animals (Supplementary Videos 1–4).
We calculated the phase and magnitude of the coherence of each imaged neuron to the stimulus train (0.5 Hz) during local bending; to the optical signal of motor neuron DI-1during swimming; and to the intracellular trace of an AE cell during crawling. Results from all behaviors in one animal are shown in Fig. 4a–d and Supplementary Videos 1–4. Optical signals from representative cells located on both surfaces confirmed stereotyped activity patterns that were highly distinctive for each of the behaviors (Fig. 4e–h).
(a–d) Coherence of optically recorded signals of all cells on the ventral (left) and dorsal (right) surfaces of a ganglion with (a) PVL-induced local bending, (b) PVR-induced local bending, (c) fictive swimming, and (d) fictive crawling. Color map as in Fig. 2b. (e-h) VSD signals of cells indicated in (a–d) during those behaviors. (i) Summary maps of the involvement of identified neurons on the ventral (left) and dorsal (right) surface of the ganglion. Colors indicate which behavior each neuron was involved in. (j) Venn diagram showing the total number of identified neurons that oscillated with each individual behaviors or combinations of behaviors. Colors as in (i).
We established identities of imaged neurons as before. On average over six preparations, we were able to assign 126 ±11 cells on the ventral surface and 121±10 on the dorsal surface. This allowed us to construct summary maps showing which neurons were consistently involved in which behaviors (Fig.4j and Materials and Methods). Approximately 10% cells were involved in all three behaviors, 33% in two out of the three behaviors, and 42% in a single behavior (Fig. 4j). For the remaining 15% of cells, involvement in any of the behaviors could not be established.
Finally, we calculated a correlation matrix between the recorded activity of each of the cells, separately during each of the three behaviors, and performed automated clustering based on these correlations (Fig. 5a). For each of the cells in a recording, we then calculated what fraction of the cells in the same cluster were located on the ventral or the dorsal side of the ganglion. We found that during crawling and especially during local bending, most clusters were largely confined to only one side of the ganglion, whereas during swimming they more commonly spanned sides (Fig. 5b), which indicates that swimming involves correlated activity among cells located on both surfaces whereas local bending largely does not. We quantified this by calculating an “integration coefficient” (Materials and Methods) which is equal to zero if all clusters are either wholly on the dorsal or wholly on the ventral side, and equal to one if all clusters are equally spread between the two sides (Fig. 5c).
(a) Cluster assignments of all cells recorded in one animal based on the correlation matrix of their activity during fictive crawling (left), swimming (center), and local bending (right). (b) Degree to which cells within a cluster were fully contained on the ventral side (“All V.”), fully on the dorsal side (“All D.”), or equally distributed (“50:50”). To prevent overrepresentation of small clusters, each cell is an entry in the histogram, not each cluster. Clusters with fewer than 3 members were excluded. Data from N = 6 leeches. (c) Quantification of the degree to which members of clusters were distributed across surfaces in the three behaviors tested (mean ± SEM, N = 6). All differences were significant (ANOVA, F(2,15) = 63.4, p < 10−7, followed by Tukey).
Discussion
We constructed a double-sided microscope that can record fluorescence signals from two sides of a biological preparation. This technique should be broadly applicable to experimental questions that require simultaneous imaging from two widely spaced cell layers in Drosophila21, sea slugs5, 6 and other organisms. The optical system can be assembled from conventional optic parts and devices. In our implementation, we used microscope parts from Olympus, but an equivalent system could now be constructed using, e.g., Thorlabs CERNA parts.
By combining our microscope with next-generation voltage-sensitive dyes (VF2.1(OMe).H13, we achieved simultaneous large-scale neuronal recording from two widely spaced cell layers at single-cell resolution, capturing not only action potentials but also small excitatory and inhibitory synaptic potentials. A primary feature of the system is its ability to acquire these signals at high speed, and without delay for image capture between the two focal planes. At present, this cannot be achieved by wide-brain volumetric Ca2+ imaging as previously established for C. elegans2, 3. With our newly developed microscope, we simultaneously recorded, for the first time, the activity of the majority of neurons in a leech ganglion. While beyond the scope of this study, the fact that VSD recordings contain both spikes and postsynaptic potentials makes it possible to infer network connectivity among the different individual, identifiable cells. This offers a notable advantage over techniques that only give access to spike events or intracellular Ca2+ concentration.
The leech has 21 nearly identical segmental ganglia containing approximately 400 neurons that are arranged in a highly conserved geometry12. For 148 of these neurons, functional descriptions have been published. (A gateway to the relevant literature is available online, at http://www.danielwagenaar.net/ganglion.) The ganglionic neurons are distributed in a single layer on the surface of the ganglion, but this layer wraps around both the dorsal and ventral sides, so that at best half of the neurons can be simultaneously imaged with conventional microscopy. Our double-sided microscope, in contrast, has access to all of them, although surface curvature means that not all neurons can simultaneously be in sharp focus (Fig. 1b). A single light source was sufficient for illuminating both top and bottom surfaces, because the leech nervous system is sufficiently translucent to permit even lighting onto both sides.
In many leech ganglionic neurons, the somata exhibit both action potentials and synaptic potentials not greatly attenuated from their origin in the neuropil, a notable difference from typical monopolar neurons in invertebrate central nervous systems12. Hence, a low-noise imaging system using sensitive voltage sensors potentially enables us to analyze synaptic integration even in small neurons in the leech. In addition, our double-sided microscope is compatible with both intra- and extracellular electrode placement, enabling detailed electrophysiological interrogation of selected specific neurons along with optical imaging from the population.
Intriguing features that we observed using our pan-neuronal imaging system are (1) widespread distribution of neurons that are differentially involved in left and right ventral local bending (Fig. 3c, d), and (2) involvement in multiple behaviors of a large fraction of identifiable neurons (Fig. 4i, j).
With respect to (1), we found that not only the local bend interneurons and the motor neurons previously reported17 discriminate between the stimuli, but so did many other neurons that had not previously been implicated in local bending. It has long been known that the neural mechanism of local bending involves population coding22-27, but its exact algorithm and computation remain unknown. Although the calculation of discriminability here was based on stimulus category (PVL vs. PVR) instead of actual local bend patterns in the leech’s body wall, the population dynamics of the highly discriminative cells we identified putatively underlie the neuronal computation. The discriminability maps from our study can thus be utilized for future investigations of mechanosensory information processing.
With respect to (2), we observed that 43% of identifiable neurons on the ventral and dorsal surfaces were involved in at least two of the three behaviors tested (local bending, swimming, and crawling). This result indicates that the neural circuits for those behaviors share many components while generating unique motor patterns for each behavior. The percentage of circuit components shared between swimming and crawling identified in this study differed from previous work9; in particular, the number of cells we identified as involved in crawling (56) was lower than in the previous study (188). The reason is probably that crawl episodes in our experiments were somewhat shorter (typically only 3–4 cycles) than in the older study, resulting in a weaker coherence signal. Double-sided imaging revealed a previously unappreciated difference between the swim rhythm and local bending: The cell assemblies that are simultaneously active in the former span both sides of the ganglion, whereas in local bending, they are mostly confined to either the dorsal or the ventral side.
In this study, we identified imaged cells with known neurons using a semi-automatic mapping algorithm based on cell size and location along with an expert’s assessment based on the physiological properties of cells along with this geometrical information. To gain more insight into the neuronal networks responsible for behavior, it will be necessary to carry out more accurate neurocartography, which we will achieve by combining functional mapping using machine learning methods10 with a connectomic approach using serial block face scanning electron microscopy11. The combination of those techniques with double-sided VSD imaging will pave the way for future investigations on how the activity of all neurons in a central nervous system is recruited to process sensory information and to generate distinctive behaviors from overlapping neuronal circuits.
Materials and Methods
Optical recording by double-sided microscope
We acquired fluorescence images simultaneously from two focal planes using a custom double-sided microscope consisting of the fluorescence train of an upright microscope (Olympus BX, Tokyo, Japan) mounted on top of an inversed microscope (Olympus IX). The top microscope was used to image the upper focal plane while the bottom microscope imaged the lower focal plane. We used a 20x, 1.0 numerical aperture (NA), water-immersion objective for the upright and a 20x, 0.7 NA objective with cover-slip adjustment collar for the inverted microscope (both Olympus). The alignment of those two objectives was fine-adjusted manually so that cameras attached to the top and bottom microscopes saw the same field of view to within about 300 nm when the two focal planes were at the same depth.
The two objectives served as condenser for each other, so that blue excitation light delivered through the top objective for epifluorescence imaging also served as a transfluorescence light source for the bottom objective. Further, a red LED illuminator attached to the bottom microscope provided wide-field transillumination that enabled us to use the upright objective to visualize intracellular electrodes. Both objectives were mounted on standard turrets so that they could be rotated out of the way to make place for 5x objectives used to visualize extracellular suction electrodes.
For VSD imaging, we used excitation light (bandpass filtered to 470 ± 15 nm) from a high-power blue LED (LedEngin LZ1-10B200) controlled with optical stabilization13. In both the upright and inverted microscopes, we used a 490-nm dichroic mirror and 505-nm LP emission filter. Images were acquired with two cooled CCD cameras (QuantEM 512SC; Photometrics, Tucson, AZ) at a resolution of 512 × 128 pixels. The frame rate was set depending on which behavior was recorded: for local bending and swimming, images were acquired at 50 Hz; for crawling, images were acquired at 20 Hz. Imaging data were acquired using custom software VScope28. Optical and electrical recordings were synchronized by connecting frame timing signals from each camera to a data acquisition board that also recorded electrophysiology signals (see below).
VSD imaging is highly sensitive to even sub-micrometer motions. Because VSDs are located in cell membranes rather than the cytosol, a movement of less than 1% of a cell diameter can cause a signal change of well over 1% due to bright edge pixels moving out of a pre-defined region of interest (ROI). Since typical VSD signals are themselves far less than 1%, this can cause dramatic motion artifacts. To mitigate this problem, we replaced cooling fans inside each CCD camera with external blowers, since we determined that internal fans in cameras caused significant vibrations of the microscope objectives relative to the sample. After removing these fans, the noise in image sequences was dominated by shot noise.
Animal maintenance and sample preparation
Medicinal leeches (Hirudo verbana) were obtained from Niagara Leeches (Niagara Falls, NY) and maintained in artificial pond water at 15 °C. In experiments where only local bending was the target behavior, we dissected out short chains of ganglia from segments 8 through 12. In experiments involving swimming or crawling, we isolated whole nerve cords (Supplementary Fig 5), including the head brain, all 21 segmental ganglia, and the tail brain. In all cases, the blood sinus surrounding the nervous system was dissected away around segmental ganglion 10. We removed the sheath from the ventral and dorsal surface of this ganglion before applying voltage-sensitive dyes. To induce swimming, a dorsal posterior (DP) nerve root in one of ganglia 11 through 13 was stimulated through a suction electrode. Brief electrical pulses (3 ms) were delivered at 50 Hz in a 3-s-long train, with an amplitude of 7–8 V. To elicit crawling, several nerves from the tail brain were stimulated using the same stimulus parameters as for DP nerve stimulation. Isolated leech ganglia can move slightly move because muscle cells are embedding in the nerve cord. We therefore stablized the ganglion to be imaged by tightly pinning down blood sinus tissue to the PDMS (Sylgard 184, Dow Corning, Midland, MI) substrate and by sandwiching adjacent connectives between small pieces of medical dressing (Tegaderm, 3M, Maplewood, MN) which was also pinned down, to minimize any motion artifacts. Throughout the dissection and during imaging, preparations were maintained in chambers filled with cold leech saline consisting of the following (in mM): 115 NaCl, 4 KCl, 1.8 CaCl2, 2 MgCl2, 10 glucose, and 10 HEPES, at pH 7.4. Only before crawling was induced, we temporarily replaced the cold saline with room temperature (20–23 °C) saline to obtain the most natural crawling rhythm. We bath loaded 800 μM VF2.1(OMe).H 13 (provided by Evan Miller) in leech saline containing 1% Pluronic acid (PowerloadTM Concentrate 100x, Thermo Fisher Scientific, Waltham, MA). To help with dye penetration into the cell membranes, we circulated the solution using a pair of peristaltic pumps (approximately 1.1 mL/min flow rate) with outflows directed at the dorsal and ventral surfaces of the ganglion, for 20 minutes total.
Electrophysiology
We recorded intracellularly from up to three neurons simultaneously using 20–50 MΩ glass microelectrodes filled with 3 M potassium acetate and 60 mM potassium chloride, using Neuroprobe amplifiers (Model 1600; A-M systems, Sequim, WA). Intracellular recordings provided additional information regarding the behavioral state of the preparation as well as confirmation of the corresponding optical signals. We recorded extracellularly using suction electrodes and a four-channel differential amplifier (Model 1700; A-M Systems). All electrical signals were digitized at 10 kHz using a 16-bit analog-to-digital board (NI USB-6221; National Instruments, Austin, TX) and VScope software28.
Basic data processing
We outlined the images of individual cell bodies manually as regions of interest using VScope. Pixel values within each cellular outline were then averaged in each frame, yielding a raw fluorescence signal. Signals were processed to remove artifacts from micromotion (next section), and to correct for slow reduction of overall fluorescence intensity due to dye bleaching. The latter was achieved by subtracting locally fitted third-order polynomials using the SALPA algorithm15 with a time constant of 1 to 15 s. In addition, brightness averaged across the areas of the ganglion outside of ROIs was subtracted for each frame to reduce global noise due to fluorescent crosstalk among top and bottom images16. Finally, signals were normalized to their average value and expressed as a percent change in fluorescence (ΔF/F).
Motion correction
As mentioned above, motion artifacts were reduced by removing fans from CCD cameras and by pinning down ganglia tightly on the PDMS substrate. However, even very small motions can cause highly detrimental artifacts in VSD recordings.
To correct for small motions, we designated the middle frame of any recording as a reference frame, and generated a pair of artificial frames by shifting the reference frame one pixel to the left or to the right. Let IR and IL be vectors consisting of the intensity values of the pixels in the right- and left-shifted reference frames, and let I′ be the intensity vector of an arbitrary frame in the recording. As long as the motion is small (less than or approximately equal to one pixel),
where · is the vector product and □I□ is the vector norm, is a good estimate for the motion in the x-direction between the frame under study and the reference frame. (The reason is that an image shifted by Δx pixels can be approximated as
as long as |Δx| ⍰ 1. The first equation is derived from the second by minimizing with respect to Δx.)
The same method can of course be used for motion in the y-direction. More interestingly, the method can be used for other affine distortions as well. For instance, if we calculate artificial frames by rotating the reference frame by ±0.1□, the above procedure would yield estimates of image rotation (in units of 0.1□).
Using this method, we estimated and corrected for small motions that may occur with the preparation or even due to vibrations in the microscope, thus preventing motion artifacts in the extracted VSD traces (Supplemental Figure 2).
Calculation of prediction success
In our experiments on the encoding of stimulus identity by individual neurons, we performed 10 trials stimulating the left PV cell and 10 stimulating the right PV cell, in order (LR)(RL)(LR)(RL)… To calculate how well each cell “predicted” the stimulus identity (i.e., “left” or “right”), we calculated the average ΔF/F during the first 0.5 s of each stimulus relative to the preceding reference phase, separately for each trial. Taking each trial in turn, we then took that trial and its “partner” trial out, and calculated the average ΔF/F for the 9 “left” stimuli out of the remaining 18 trials and also for the “right” stimuli. The “partner” trial was the next trial for odd-numbered trials, and the preceding trial for even-numbered trials. If the ΔF/F in the trial under consideration was closer to the average ΔF/F of the “left” trials in the training set than to the average of the “right” trials, the neuron was considered correct in its “prediction” of stimulus identity if the trial under consideration was in fact a “left” trial, and conversely for “right” trials. The percentage of trials in which a cell correctly predicted stimulus identity in this sense was used as a measure of prediction success. Any cell that correctly predicted stimulus identity in at least 75% of trials (50% being change performance) was considered to encode stimulus identity.
Coherence analysis
We used multitaper spectral analysis29 to estimate the coherence between optical signals from individual cells with a common reference. That reference was the stimulus train for local bending, the optical signal of a DI-1 motor neuron for swimming, or the intracellular electrode signal of an AE motor neuron for crawling. For each recording, we calculated the 95% confidence interval for the magnitude of estimated coherence under the null hypothesis that a signal was not coherent with the reference30. A cell was considered to be involved in the behavior expressed during a given trial if its measured coherence exceeded this confidence interval.
Canonical mapping
The overall layout of neurons within leech ganglia is highly conserved between ganglia within an animal as well as between animals, but the precise geometry does vary. In order to identify cells seen in the VSD image sequence (Supplementary Fig.5a) with neurons in the canonical map, we developed a graphical user interface that allows us to proceed as follows. First, we mark all the visible cells as regions of interest on the image (Supplementary Fig.5b). Then, we overlay the canonical map over this (Supplementary Fig.5c). To the trained eye, the identification of many of the larger cells is immediately obvious, so we register these identities (using a drag-and-drop mechanism in the GUI; (Supplementary Fig.5d)). This partial mapping of ROIs to identified neurons allows the program to do a coarse alignment between the canonical map and the actual image using affine transformations local to each of the four packets of cells (Supplementary Fig.5e). (The ganglion is divided by giant glial cells into several packets12, the boundaries of which are indicated on the canonical map.) This preliminary alignment enables us to identify several other neurons with high confidence, after which the computer can perform a local alignment step. Finally, the computer assigns putative identities to the remaining ROIs, leading to a nearly complete mapping between ROIs (orange dots in Supplementary Fig.5f) and identified neurons (cross marks).
Determination of which cells are consistently involved in a behavior
For each neuron in each animal, we determined whether its coherence exceeded the 95% confidence interval of the null hypothesis that a given neuron was not involved in a given behavior. If a neuron exceeded that threshold for a given behavior in four out of six animals, it was considered to be involved in that behavior (Fig. 4i.) Since swimming and crawling are both symmetric behaviors, we included both members of a homologous pair if (and only if) at least one member exceeded the 97.5% C.I.
Clustering and calculation of integration coefficients
We clustered cells based on the matrix of the correlation coefficients of their activity patterns, separately for each behavior (by constructing a dendrogram based on the correlation distance followed by tree cutting). We then assigned a dorsoventrality index (DVI) to each cell, which was equal to the fraction of dorsally localted cells in that cell’s cluster. This is what is shown in the histograms of Fig. 5b. Cells in clusters with fewer than three members were ignored for this calculation; the results did not change qualitatively if this threshold was changed to two or five. Based on the DVI, we calculated the integration coefficient (CI) of Fig. 5c as:
where |·| denotes absolute value and 〈·〉 denotes the average across all cells (except those not in clusters of size three or more).
Software for data analysis
All data processing and statistical analysis were performed in GNU Octave, version 4.0.0.
Competing Interests
The authors declare no competing interests.
Acknowledgments
We thank Evan Miller for sharing of the VF2.1(OMe).H dye; Annette Stowasser for her role in developing a prototype of the double-sided microscope and many helpful conversations; and Angela Bruno for useful discussions regarding data analysis. This work was supported by the Burroughs Welcome Fund through a Career Award at the Scientific Interface and by the National Institute of Neurological Disorders and Stroke through grant R01 NS094403 (both to DAW). YT was supported by JSPS Overseas Research Fellowships.