Abstract
Neuronal activity is routinely recorded in vivo using genetically encoded calcium indicators (GECIs) and 2-photon microscopy, but calcium imaging is poorly sensitive for single voltage spikes under typical population imaging conditions, lacks temporal precision, and does not report subthreshold voltage changes. Genetically encoded voltage indicators (GEVIs) offer better temporal resolution and subthreshold sensitivity, but 2-photon detection of single spikes in vivo using GEVIs has required specialized imaging equipment. Here, we report ASAP4b and ASAP4e, two GEVIs that brighten in response to membrane depolarization, inverting the fluorescence-voltage relationship of previous ASAP-family GEVIs. ASAP4b and ASAP4e feature 180% and 210% fluorescence increases to 100-mV depolarizations, respectively, as well as modestly prolonged deactivation and high photostability. We demonstrate single-trial detection of spikes and oscillations in vivo with standard 1 and 2-photon imaging systems, and confirm improved temporal resolution in comparison to calcium imaging on the same equipment. Thus, ASAP4b and ASAP4e GEVIs extend the uses of existing imaging equipment to include multiunit voltage imaging in vivo.
One Sentence Summary Positively tuned ASAP voltage indicators facilitate imaging of electrical activity in the brain.
INTRODUCTION
Recording the real-time activity of genetically specified neurons during animal behavior will be crucial for understanding how the nervous system relays and processes information (1, 2). Currently, most genetically targeted neuronal activity recording is performed with genetically encoded calcium indicators (GECIs) and either 1-photon or 2-photon imaging. Detection of calcium activity is aided by high expression levels of GECIs, low fluorescence at baseline, the high calcium concentrations after bursts of action potentials (APs), and the long duration of calcium transients. However, GECI signals lack precision for timing spikes, as somatic calcium continues rising after the AP peak due to delayed inactivation of voltage-gated calcium channels and continued calcium diffusion from initial influx points into the cytosol (3, 4). This spatiotemporal smoothing effect, together with >200-ms half-extrusion times for calcium, prevents GECIs from accurately discerning closely spaced APs (2). Lastly, calcium levels do not respond appreciably to subthreshold and hyperpolarizing changes in transmembrane voltage, and thus do not reveal subthreshold dynamics such as theta rhythms and hyperpolarizing events.
Genetically encoded voltage indicators (GEVIs) can provide more accurate spike timing information while also revealing subthreshold dynamics, but suffer from signal detection challenges. The transmembrane restriction and temporal transience of voltage signals present unique obstacles for imaging. Unlike GECIs which detect calcium changes in the cytosol, GEVIs must exist at the membrane to report voltage changes, resulting in fewer molecules and thus fewer photons per imaging volume (5). Electrical events are also much faster than calcium events, and GEVIs that track electrical kinetics produce shorter-lived signals than GECIs. This limits the number of integrated photons per transient, and requires fast sampling rates to detect the response. For example, the GEVI ASAP3 produces a similar relative fluorescence change (ΔF/F0) to a single AP as the widely used GECI GCaMP6 (~20%), and actually does so with ~20-fold higher per-molecule brightness (6). However, its expression level per cell body is estimated to be ~20-fold less, and its signal is 20-fold shorter in duration (6). These constraints are especially limiting for laser-scanning 2-photon (2-P) microscopy, in which diffraction limited spots are excited sequentially. Exciting multiple neurons with enough power per cell for signal detection, and sufficient speed for time resolution, has required expensive or specialized equipment (6, 7).
To combat these formidable challenges, GEVI engineering over the last several decades has focused on increasing the per-molecule change in fluorescence during electrical activity while optimizing kinetics. In particular, brighter fluorophores and fast onset kinetics allow the largest response in absolute photons per molecule, while slightly slower offset kinetics improve detectability by allowing the response to persist for longer. Currently, the GEVIs with the largest relative response per AP are the opsin-based GEVI Archon1 and the voltage sensing domain (VSD)-based GEVI ASAP3. Archon1 consists of a non-conducting opsin domain and demonstrates voltagedependent fluorescence upon red light illumination, due to absorbance shifting by voltage-dependent retinal Schiff base protonation. As the inherent fluorescence of opsins is dim, intense illumination is required to detect them (8). Opsins can be fused to a brighter fluorophore, allowing the fluorophore brightness to be modulated by FRET in a voltage-dependent manner, but the degree of modulation is limited (9–12). Notably, both types of opsin-based GEVIs show poor responsivity under 2-P illumination, likely because voltage sensitivity resides in a transient state of the opsin photocycle with is inefficiently interrogated with 2-P excitation (5, 13, 14).
In contrast to opsin-based GEVIs, ASAP3 is composed of a circularly permuted GFP (cpGFP) inserted in an extracellular loop of a VSD (6, 15). Voltage-dependent movements of the VSD are transduced to alter cpGFP fluorescence, analogous to cpGFP-based indicators such as GCaMP (Fig. 1A). ASAP3 features a large response range of 51% from –70mV to +30mV, is reasonably bright and sufficiently fast to track trains of action potentials at up to 100hz on single trials, and can be used in awake and behaving flies and mice (4, 6, 13). While it may be surpassed in individual parameters of kinetics, relative responsiveness, or per-molecule peak brightness by different indicators, ASAP3 performs well across multiple parameters and thus exhibits the highest power-normalized signal-to-noise ratio for both spiking and subthreshold activity (16). In addition, ASAP-family GEVIs operate equally well under 1-P and 2-P illumination (6, 13). However, multi-unit voltage recordings with ASAP-family GEVIs in mammalian brains has only been performed with advanced 2-P scanning methods to achieve the required speed and power per cell.
We set out to enhance the performance ASAP-family GEVIs with the goal of improving optical voltage recordings with commonly available imaging systems. A current aim in GEVI engineering is to create indicators that brighten in response to positive voltage changes. Regardless of directionality, the largest possible change in signal for a fluorescent indicator is determined by the molar brightness of the fluorophore. However, in the shot noise-limited regime, noise is related to the square root of baseline fluorescence, and thus an indicator with low baseline fluorescence would have the benefit of lower baseline noise. A well engineered positively tuned GEVI would thus have the ability to surpass all negatively tuned GEVIs in signal-to-noise ratio (SNR) (10).
Here, using PCR transfection, electroporation, and computational protein modeling (6, 17), we develop two new GEVIs, ASAP4b and ASAP4e, that brighten in response to membrane depolarization. One variant, ASAP4e, features a steady-state voltage change of 210% over the physiological range and 468% over all voltages, while another variant, ASAP4b, combines faster activation with higher basal and peak brightness. We demonstrate that ASAP4e and ASAP4b report APs and sub-threshold oscillations in awake behaving animals using standard one-photon (1-P) or two-photon (2-P) equipment. By simultaneously imaging red GECIs, we verify that ASAP4 GEVIs provide higher temporal resolution with better SNR for single APs.
RESULTS
Engineering of positively tuned GEVIs
Our goal was to create fluorescent GEVIs that respond positively, i.e. increase in brightness with positive (depolarizing) changes in the transmembrane potential. Positively tuned GEVIs have a major theoretical advantage in potentially achieving higher SNR than negatively tuned GEVIs. In the shot-noise limited regime, where photons are Poisson distributed, SNR is proportional to , where ΔFevent is the change in photons emitted from the imaged population of molecules due to the event of interest per time interval, and Frest is photons emitted per time interval at rest. With a positively tuned GEVI, it is theoretically possible to achieve near-zero Frest while having ΔFevent approach the entire maximum brightness of the fluorophore population. However, previous ASAP-family GEVIs brighten upon negative (hyperpolarizing) voltage changes.
As with most other GFP-based indicators, ASAP-family GEVIs are imaged by excitation with ~490-nm light in 1-P mode or ~950-nm light with 2-P illumination. This wavelength selectively excites the deprotonated anionic form of the GFP chromophore with peak absorbance at ~490 nm, avoiding the protonated or neutral GFP chromophore with peak ~390-nm absorbance (18, 19). In wild-type GFP, hydrogen bond donation by His-148 (His-151 in ASAP variants) stabilizes the deprotonated state. We hypothesized that depolarization-induced movements in the S4 transmembrane helix cause ASAP dimming by disrupting hydrogen bond donation by His-151. Correspondingly, to invert the relationship between S4 movement and chromophore protonation, we targeted His-151 and neighboring amino acids (Fig. 1A).
Starting with ASAP2f L146G S147T R414Q, an intermediate in ASAP3 evolution (6), we first constructed and tested all 400 possible amino acid combinations at positions 150 and 151 by 384-well PCR transfection followed by automated electroporation and imaging (6). We identified several mutants with upward responsivity (Fig. S1), one of which, S150D H151G (ASAP4.0), demonstrated a ~100% increase in fluorescence upon voltage steps from −70 mV to +30 mV (Fig. S2A), thereby inverting the response relative to ASAP3 (Fig. 1B). However, ASAP4.0’s fluorescence-vs-voltage (F-V) curve was right-shifted, such that the physiological voltage range of −70 to +30 mV mapped to the shallow lower portion of the curve (Fig. S2B). As a result, the fluorescence change from −70 to +30 mV (ΔF100) was only 29% of the maximum obtainable fluorescence across all voltages (Fmax), and the fluorescence at +30 mV (F+30) was less than half of Fmax (Fig. S2B). In addition, ASAP4.0 responses demonstrated partial reversion during depolarization steps (Fig. S2A), suggesting a relaxation process that reduces the proportion of activated molecules and/or shifts a proportion to a dimmer conformation.
Over 4 rounds of structure-guided mutagenesis of ASAP4.0, we were able to left-shift and sharpen the F-V curve, producing large responses in the physiological voltage range. Briefly, to reduce the rapid relaxation and obtain higher F+30/Fmax, we mutated a chromophore-interacting site in ASAP4.0 to increase chromophore rigidity (20). One mutant, ASAP4.1, showed less relaxation (Fig. S2A) but higher fractional fluorescence at rest (F−70/Fmax), resulting in reduced ΔF100/F−70 (Fig. S2B). We then performed double-site saturation mutagenesis at positions 148 and 149 in the linker between the third transmembrane helix of the VSD (S3) and cpGFP (Fig. S2C), obtaining ASAP4.2 with an improved ΔF100/F−70 and lower F−70/Fmax (Fig. S2B).
Finally, by developing an atomic model of ASAP4.2, we identified Phe-413 at the end of the fourth transmembrane helix (S4) as a site that could modulate the energetic barrier to voltage-induced movements (21). Mutation of Phe-413 produced multiple interesting mutants, with F413A, F413G, and F143M showing the largest relative responses to depolarization (Fig. S3A). By testing responses over their full voltage-sensitivity range (Fig. 1C), we determined F413G and F413M had steeper F-V curves than F413A (Fig. S3B). Correspondingly, F413G and F413M showed higher ΔF100/F−70 values of 180% and 210% respectively compared to the 110% of F413A (Fig. 1D, Table S1). Further details and rationale of protein engineering are in Supplementary Text.
Among fully genetically encoded voltage indicators with high fluorescence, only ElectricPk, FlicR1, Marina and upward Ace2N-mNeon are positively tuned (10, 16, 22). Like ASAPs, ElectricPk, FlicR1, and Marina are based on fusions of a VSD with a fluorescent protein domain, while upward Ace2N-mNeon is based on electrochromic FRET between the mNeonGreen fluorescent protein and a voltage-sensing opsin. Among these, Marina has the largest reported ΔF100/F−70 at 29%. The positive indicator Ace2N-mNeon recently demonstrated single-AP detection, but no F-V curve was reported (10). To allow comparison, we measured its F-V curve as well (Fig. 1C), obtaining ΔF100/F−70 of 12% (Fig. 1D). Thus, ASAP4.2 F413G and ASAP4.2 F413M report physiological voltage changes with larger responses than previously described positively tuned GEVIs (23). Given their optical characteristics, we named ASAP4.2 F413G as ASAP4b (brighter baseline) and ASAP4.2 F413M as ASAP4e (enhanced response).
Characterization of ASAP4 brightness and photostability
Since ASAP4.2 and later variants share an identical GFP fluorophore, their maximum obtainable fluorescence per molecule should be identical. Fluorescence at any given voltage as a fraction of maximal fluorescence across all voltages should then scale with per-molecule brightness at that voltage. Between ASAP4b and ASAP4e, ASAP4b had the higher molar brightness at both –70 mV and +30 mV, while ASAP4e had the larger change relative to baseline due to its lower baseline brightness (Fig. S3C). Both reached >50% of peak fluorescence at +30 mV. While previous GEVI studies measured F-V curves at room temperature only, we also measured them for ASAP3, ASAP4b, and ASAP4e at 37 °C. Interestingly, the F-V curves of ASAP4b and ASAP4e steepened and converged, due to lower F−70 Fmax for ASAP4b and higher F+30/Fmax for ASAP4e, while the F-V curve for ASAP3 underwent a left-shift (Fig. S3D).
Per-cell brightness of an indicator will be influenced not just by voltage tuning, but also by total chromophore level per cell which itself depends upon protein expression and chromophore maturation efficiency. To rule out issues with expression or maturation of ASAP4b or ASAP4e, we compared brightness of cells expressing ASAP3, ASAP4b, or ASAP4e with cells expressing ncpASAP4b, a protein composed of the VSD of ASAP4b with a non-circularly permuted version of the ASAP4b/4e GFP moiety in the S3-S4 loop. The GFP moiety in ncpASAP4b should be voltage-independent, as observed for other non-pHluorin non-permuted GFP fusions with VSDs (10, 16, 22, 22, 24), and thus serve as a proxy for the fluorophore of ASAP4b/4e in the maximally bright state. We found that cells expressing ASAP3, ASAP4b, and ASAP4e had 47%, 21%, and 17%, respectively, of the brightness of cells expressing ncpASAP4b (Fig. S4A). These numbers agree well with the F−70/Fmax values of ASAP3, ASAP4b, and ASAP4e (Table S1), indicating that total chromophore levels per cell are similar between these three GEVIs. We confirmed that the fluorescent signal from ASAP4b and ASAP4e in neurons is localized to the neuronal membrane, where the indicators can sense voltage (Fig. 1E).
We next compared photostability under 1-P or 2-P illumination for ASAP4b, ASAP4e, and ASAP3. Under 453-nm 1-P illumination at 50 mW/mm2, ASAP3 exhibited mono-exponential photobleaching while ASAP4e and ASAP4b increased in brightness for several minutes before finally decaying (Fig. S4B, Table S3). ASAP4e and ASAP3 were more photostable than ASAP4b during 940-nm 2-P illumination (Fig. S4C, Table S3). Most of the photobleaching represented reversibly photoswitchable events, as a few minutes of incubation in the dark led to recovery of the majority of the lost fluorescence.
Reporting of fast voltage dynamics by ASAP4
To understand how well ASAP4b and ASAP4e can report voltage dynamics of different speeds, we measured the kinetics of fluorescence responses to voltage steps at room temperature and 37 °C. Activation kinetics were well modelled as a sum of two exponentials. At room temperature, ASAP4e was faster than ASAP4b in responding to depolarization, with fast activation kinetics of 2.6 ms vs 3.9 ms, accounting for 14% and 19% of the response amplitude, respectively (Table S2). At 37 °C, ASAP4b and ASAP4e activation kinetics accelerated, with the fast component reaching similar values of 1.5 ms each (Table S2).
To understand how well ASAP4b and ASAP4e can report voltage dynamics of mammalian neurons, we first tested responses in HEK293A cells to AP waveforms recorded from rat hippocampal neurons in culture. At room temperature, responses to APs of 2-ms full-width at half-maximum (FWHM) followed the rank order ASAP4b < ASAP3 < ASAP4e, with ΔFAP/F−70 values of 19%, 22%, and 23% respectively (Fig. S5A). In response to 4-ms APs, which can be more easily compared to previously reported results (8), fluorescence changes were 26%, 29%, and 34%, respectively (Fig. S5A). In contrast, upward Ace2N-mNeon (10) showed 8% or 10% responses to 2-ms or 4-ms APs, respectively. ASAP4b and ASAP4e were able to discern single spikes within 50- and 100-Hz bursts of AP waveforms (Fig. 1F, Fig. S5B).
We also benchmarked ASAP4b and ASAP4e performance in detecting naturalistic spike bursts at 37°C. Responses in HEK293A cells to imposed voltage waveforms of differing numbers of spikes recorded from mouse hippocampal pyramidal neurons in vivo (baseline Vm of −60 mV, AP FWHM of 1 ms). Responses to single APs were 24%, 30%, and 41%, respectively for ASAP3, ASAP4b, and ASAP4e, and bursts of 2–4 spikes could easily be read by all three GEVIs (Fig. S5C). For example, individual spikes within a triplet spaced apart by intervals of 9.3 and 18.2 ms were well discerned (Fig. 1G). ASAP4b and ASAP4e, but not ASAP3, showed a higher response to the second spike within bursts; this is expected from the slowly activating component in ASAP4b and ASAP4e (Table S2).
Taken together, our measurements indicate that ASAP4b and ASAP4e have the largest fluorescence responses of any GEVIs described so far, both relative to baseline and in absolute brightness change per molecule, and for both slow steps and fast spikes (Table S1).
ASAP4 expression and performance in brain tissue
To rapidly obtain evidence that positively tuned ASAPs function well in neurons in vivo, we performed 2-P imaging of ASAP4b in the axon termini of L2 neurons in the fruit fly visual system during visual stimulation. L2 neurons respond to increased luminance with hyperpolarization and to decreased luminance with depolarization. As expected, ASAP4b responded oppositely to the negatively tuned indicator ASAP2f fluorescence, by dimming upon a bright stimulus and brightening upon a dark stimulus (Fig. S6). ASAP4b response amplitudes were ~2-fold higher than ASAP2f, and activation kinetics were slightly faster (Fig. S6). These results verify that ASAP4b functions in vivo, and further confirm its 2-P compatibility and ability to reveal subcellular electrical activity.
To enhance delineation of GEVI-expressing neurons in mammalian brains, we fused ASAP4b and ASAP4e to a Kv2.1 segment that we found can efficiently target GEVIs to somata in vivo (6, 25), creating ASAP4b-Kv and ASAP4e-Kv. We then determined if these proteins expressed well in the mouse brain compared to ASAP3-Kv, whose performance has been well validated in vivo (6, 26). We expressed each GEVI in mouse dorsal striatum or hippocampus by adeno-associated virus (AAV)-mediated transduction. One month after transduction, all three GEVIs were well expressed at the plasma membrane (Fig. S7A). Striatal medium spiny neurons or hippocampal somatostatin-positive (SST+) interneurons expressing ASAP4b-Kv or ASAP4e-Kv were at least 40% as bright as neurons expressing ASAP3 under 1-P illumination (Fig. S7B,C). Given their relative F−70/Fmax values, this suggests ASAP4b-Kv and ASAP4e-Kv were at least as well expressed as ASAP3. We obtained similar results when comparing hippocampal pyramidal neurons expressing ASAP4b-Kv and ASAP3-Kv under 2-P illumination (Fig. S7D). These results thus indicate that ASAP4b-Kv and ASAP4e-Kv express well in vivo relative to ASAP3-Kv.
To confirm an ASAP4-family GEVI can report natural APs in mammalian brain tissue, we performed simultaneous whole-cell patch-clamp electrophysiology and fluorescence imaging in acute hippocampal slices expressing ASAP3-Kv or ASAP4b-Kv. Under 1-P illumination, response amplitudes were similar between the two indicators (Fig. S8A), and individual spikes could be discerned within 50-Hz trains (Fig. S8B). SNR values were also similar for firing rates between 10 and 50 Hz (Fig. S8C). Under 2-P imaging, responses to APs were again similar between ASAP3-Kv and ASAP4b-v for 10 Hz (Fig. S8D) and 50 Hz (Fig. S8E), as were SNR values (Fig. S8F). Compared to the 1-P case, 2-P illumination produced larger response amplitudes (≥ 35%), as expected from less background fluorescence (Fig. S8G). When applying current steps to evoke AP trains in place of individual current injections, ASAP4b-Kv again demonstrated similar responses and SNRs as ASAP3-Kv (Fig. S9). These results indicate that the performance of ASAP4b-Kv initially characterized in HEK293 cells is well preserved in neurons in brain tissue.
1-photon imaging of interneuron activity with ASAP4e-Kv in awake mice
While 1-P voltage imaging with ASAP-family GEVIs in the brain has not been reported previously, their higher molar brightness than opsin-only GEVIs, which have been used for in vivo 1-P imaging, suggests they should work as well. ASAP4b-Kv and ASAP4e-Kv have similar per-cell SNRs for spikes, but in 1-P where scattered signals can come from out-of-focus neurons, the lower baseline brightness of ASAP4e-Kv should be preferable. We expressed ASAP3-Kv or ASAP4e-Kv in SST+ interneurons of mice in the dorsal CA1 region of the hippocampus. Imaging was done through a cranial window using a CMOS camera while mice were awake, head-fixed and running. Illumination by a LED at a power density of 100 mW/mm2, an order of magnitude less intense than previously used for 1-P opsin imaging (8), was sufficient for ASAP to reveal spikes with framerates of 1000 frames per s (fps) (Fig. 2A).
We performed prolonged illumination of ASAP3-Kv, ASAP4b-Kv, and ASAP4e-Kv to assess photostability under in vivo 1-P imaging conditions. After 60 s of continual 100 mW/mm2 blue light illumination, ASAP3-Kv and ASAP4b-Kv showed 22 ± 5% and 32 ± 8% loss of fluorescence (mean ± SEM of 4 neurons each), respectively (Fig. S10A). ASAP4e-Kv actually showed 0 ± 10% loss over this time, due to some cells exhibiting photoactivation as previously observed in vitro and others photobleaching (Fig. S10A). This variability can be explained by different amounts of illumination while searching for cells, which we did not record. Neurons that exhibited higher baseline brightness can be imaged with powers as low as 35 mW/mm2 while revealing apparent spikes, allowing even longer imaging sessions (Fig. S10B). At typical expression levels and imaging powers, ASAP4e-Kv regularly maintained at least 44% of its signal for 80 s of imaging (Fig. S10C), equating to an expected 66% retention in SNR in this time.
To quantify the ability of ASAP GEVIs to detect single APs, we employed a template-matching loglikelihood strategy based on the log-likelihood probability work of Wilt et. al., 2013 (Fig. 2B,C, see methods), but used Gaussian assumptions about the noise rather than Poisson ones. Briefly, putative APs for training were identified from optical spikes occurring selectively in the negative direction for ASAP3-Kv and in the positive direction for ASAP4e (Fig. 2B,C). As deflections in the incorrect direction are due to noise, this allowed the establishment of an amplitude threshold beyond which optical spikes in the correct direction are predominantly reporting APs. At least 10 of the largest of these spikes were chosen to serve as templates for the log-likelihood calculation. New template spikes were chosen for each trial, and if good templates were not available in a trial, then the templates from the same cell but a different trial were used. While this results in conservative detection, we wanted to be sure we did not have many false positives. The log-likelihood function itself exhibited a symmetric distribution with positive outliers; a threshold was set to identify these outliers as AP events (Fig. 2B,C). Using this algorithm, optical spike amplitudes (Fevent/Frest) averaged 10.2 % for ASAP3-Kv and 11.5 % for ASAP4e-Kv, and empirically measured SNR values averaged 2.8 and 2.3, respectively (Fig. 2D).
To determine if GEVIs can relate spike generation to subthreshold modulation in the same neurons, we also examined spike onset probability as a function of theta phase. Fluorescence traces were bandpass filtered from 6 to 11 Hz, then the Hilbert transform applied to obtain the instantaneous amplitude and phase, and a histogram of the theta phase values when spikes occurred was created. Both ASAP3-Kv and ASAP4e-Kv showed a preference for spiking near the peak of theta, which was set to 0 radians, although spikes can also be seen at other points in theta phase as well (Fig. 2E). Our results confirm findings from simultaneous whole-cell patch-clamping of SST+ interneurons and field electrode recordings in the mouse hippocampus (27).
Simultaneous calcium and voltage imaging in vivo with ASAP4e-Kv
Genetically encoded calcium indicators (GECIs) are widely used to reveal neuronal activity in vivo, but the slow kinetics of these indicators and of calcium transients themselves prevents the reliable reconstruction of spike patterns from GECI signals (28). A GEVI that could detect APs using standard 2-P scanning methods may allow more accurate assessment of spiking activity without requiring expensive equipment upgrades. We thus explored whether ASAP4’s extended decay kinetics (Table S1) could allow it to report APs at a sampling rate of 100 fps, only several-fold faster than standard GECI imaging conditions.
We co-expressed the dimmer but more responsive ASAP4e-Kv and the red GECI jRGECO1a in layer 2/3 of mouse cortex, then performed imaging with 1000-nm 2-P excitation in awake, head-fixed animals. We imaged 13 spontaneously active neurons in one animal, acquiring 128×128-voxel frames at 15 to 99 fps. ASAP4e-Kv photostability was excellent; in 100-s continuous recordings at 99 fps, 91% of beginning fluorescence was retained (Fig. 3A, Movie S1). Despite the 1000-nm excitation being non-optimal for ASAP, we observed that each GECI transient was temporally preceded by ASAP4e-Kv signals (Fig. 3A, Movie S1). Indeed, these ASAP4e-Kv signals extended across multiple frames, indicating spike bursts (Fig. 3B). In addition, several clear ASAP4e-Kv transients were associated with small changes in GECI fluorescence that were not clearly distinguishable from noise (Fig. 3A,B). A recent study found that only a minority of single APs are detected by GCaMP6f and GCaMP6s under standard 2-P population imaging conditions (28). By using jRGECO1a, which has similar single-AP responses to these green indicators (29), our findings add further evidence to this conclusion. Our results also suggest that ASAP4e-Kv can be used to detect single APs with higher reliability than widely used GECIs with only a modest increase in acquisition speed.
Imaging place cell population dynamics with ASAP4b-Kv
Finally, we used ASAP4 and jRGECO1b to simultaneously record voltage and calcium activity in CA1 pyramidal neurons as mice navigated through a virtual reality environment to find hidden rewards (Fig. 4A,B). For this task, we chose ASAP4b-Kv as we desired to scan as many neurons as possible, and the higher molecular brightness at rest may be more useful for detecting multiple neurons over a large region, similar to the use case for jGCaMP7b (30). With minimal modifications to a commercially available resonant-scanning 2-P microscope (Neurolabware), we were able to continuously image rectangular fields of view containing >50 cells at 989 fps for tens of minutes (Fig. 4C). To minimize power delivery and to use a commonly available imaging setup, we used one excitation laser at 940 nm at a minimum power capable of detecting ASAP4b-Kv at baseline, and split green (ASAP4b-Kv) and red (jRGECO1b) signals to separate detectors.
Applying an analysis pipeline previously developed for calcium imaging to ASAP4b-Kv fluorescence (see Methods), we identified a large population of place cells (~30% of cells with significant spatial information). As expected from calcium imaging and extracellular voltage recordings, ASAP4b-Kv place cells tiled the environment with their place fields (Fig. 4D-G). Calcium and voltage activity rate maps were largely consistent in cells with strong co-expression, but ASAP4b-Kv signals clearly demonstrated higher temporal resolution and better ability to discern closely spaced spikes (Fig. 4D,G). Thus, using a standard commercial 2-P microscopy system designed for imaging calcium indicators, we were able to record populations of place cells in the hippocampus by imaging ASAP4b-Kv. Additionally, the signals were large and robust enough that a standard calcium imaging data processing pipeline, using Suite2P coupled with a common spatial information metric (31), was able to pull out place cell tiling in the green ASAP4b-Kv channel that matched the red jRGECO1b channel (Fig. 4G).
DISCUSSION
In this study, we introduce two positively tuned and highly responsive GEVIs, ASAP4b and ASAP4e, and use them to detect spiking activity in single trials in vivo by 1-photon and 2-photon imaging. We demonstrate that both ASAP4e and the negatively tuned ASAP3 can be used to detect spikes in multiple hippocampal interneurons by 1-photon imaging for over a minute, establishing the ability to perform voltage imaging with commonly available epifluorescence equipment. The ability to image multiple neurons in a wide field of view over minutes opens up new possibilities for neuroscientific investigation. For example, monitoring the subthreshold and spiking activity of multiple cells can be used to determine how oscillations relate to spiking activity in different neurons within a local network, and whether such relationships are modulated by stimuli or experience.
We also demonstrate simultaneous single-cell voltage and calcium imaging by 2-P microscopy of ASAP4e and ASAP4b with a red GECI. Our results reveal that calcium transients in layer-2 pyramidal neurons of the cortex do not always capture the underlying voltage activity, and that ASAP4 can be used simultaneously to image voltage on a standard galvanometric 2-P imaging setup, even at frame rates as low as 99 Hz. While temporal resolution of the voltage signal may be affected at these frame rates, our results suggest simultaneous tracking of calcium and voltage is feasible. We also find that voltage imaging can be used to map place fields of hippocampal pyramidal neurons using a standard calcium indicator processing pipeline relying on spatial information (31). This provides the voltage imaging equivalent to the spike-based place field mapping performed by extracellular electrodes and GECIs.
With regard to the relative coverage of GEVI and GECI imaging, it is informative to compare molecular performance and identify inherent limiting factors. In response to a single 2-ms AP, ASAP4e responds with a relative increase of 25% at peak. This is similar to the response relative to baseline of GCaMP6f, which is also ~25% for a single AP (32). However, in terms of per-molecule brightness and kinetics, ASAP4e and GCaMP6f differ in opposite ways. To produce its 25% response, ASAP4e fluorescence increases from 20% to 25% of the maximum brightness of its GFP fluorophore. In contrast, GCaMP6f increases from ~2% to ~2.5%. Thus the change in photon flux per molecule in response to an AP is an order of magnitude larger for ASAP4e. However, an opposite relationship is observed in the persistence of the response; GCaMP6f is an order of magnitude slower in its signal decay compared to ASAP4e (off time-constants of 150 ms vs. 15 ms at room temperature). Another major difference between GEVIs and GECIs is their abundance in a neuronal soma; it has been estimated there are ~20 times more GECI molecules (5). Thus the higher molecular performance of GEVIs is in practice balanced by the shorter imaging intervals that are needed to capture spiking activity with GEVIs. GEVI imaging is then further disadvantaged by an inherently lower molecular abundance than GECIs.
Nevertheless, it is still possible that future improvements to ASAP-family GEVIs could help reduce the 2-P coverage disadvantage by producing larger per-AP responses, as this would reduce dwell time requirements while maintaining SNR. In response to steady-state voltages from −70 to +30 mV, ASAP4 operates from 20% to 57% of the maximum brightness of its GFP fluorophore. Sharpening the F-V curve to further decrease basal fluorescence at −70 mV and increase fluorescence at +30 mV will produce larger responses to voltage changes. Accelerating activation kinetics will allow for more of the already substantial steady-state fluorescence range (210% for ASAP4e) to be sampled during APs. Finally, selectively slowing deactivation kinetics further would allow for more widely spaced imaging intervals, although at a cost in resolving closely spaced spikes. Such optimizations would also aid 1-P imaging, improving the SNR for spike detection or allowing lower illumination powers, thereby increasing reliability of event detection or duration of recording.
All of the imaging systems used in this study were standard systems routinely used for calcium imaging, many of which have been around for over a decade. Labs currently imaging GECIs should thus be able to image ASAP4b and ASAP4e with minimal equipment optimization. However, if the interest is to maximize the number of cells imaged per session with optimized SNR, then more sophisticated imaging methods, such as patterned or random-access illumination, would allow for even higher coverage.
In summary, we perform voltage imaging using ASAP4-family GEVIs on existing 1-P and 2-P equipment previously developed for imaging GECIs, demonstrating that voltage imaging is within the technical abilities of a large number of neuroscience laboratories. GEVI imaging should be widely applicable for recording neuronal spiking activity with higher temporal precision than possible with calcium imaging, or for relating spiking activities to subthreshold dynamics. Future work will aim to improve genetically encoded voltage indicators in detection reliability, to allow for larger populations of cells to be imaged while maintaining high SNR.
Movie S1. In Vivo Imaging of ASAP4e-kv and jRGECO1a in Mouse V1. Neurons coexpressing ASAP4e-Kv and jRECO1a were recorded by 2-P scanning at 99 frames per second with a single 1000-nm excitation wavelength, with green (ASAP4e-Kv) and red (jRECO1a) emissions directed to separate detectors by a beam-splitter. Above, raw image data. The white arrow points to the quantified cell. Below, plots of ΔF/F0 in green and red channels. Traces are corrected for photobleaching for display purposes but unfiltered. The same traces uncorrected for photobleaching can be seen in Fig. 3. ASAP4e-Kv fluorescence changes of ΔF/F0 > 3 standard deviations from the baseline are marked visually by ticks above the trace and aurally by a click sound.
Supplementary Text
We wanted to shift the F-V curve leftwards so that V1/2 would lie within the physiological range. In energetic terms, this is equivalent to stabilizing the deprotonated (bright) state of the chromophore. Position T206 is known to interact with the chromophore and alter its pKa, and so we chose it for saturated mutagenesis in our screening system, hoping to find an amino acid that further stabilized the deprotonated state of the chromophore. We were rewarded with a T206H mutation that resulted in a dramatically left-shifted GEVI, which we designated ASAP4.1. Brightness at +30 mV (F+30) reached 91% of Fmax, and ΔF100 improved to 35% of Fmax (Supp Table 1). However, brightness at −70 mV (F–70)also increased, resulting in decreased relative fluorescence change from −70 mV to +30 mV (ΔF100/F−70) (Supp Table 1).
To search for further improvements, especially to dynamic range, we next mutagenized Phe-148 and Asn-149, the first two GFP-derived residues after the S3-cpGFP junction in the linker region. These sites are directly adjacent to the sites that we screened to initially flip the response, and we reasoned that in addition to interacting with them, Phe-148 and Asn-149 should be critical in translating VSD movement into chromophore stability and therefore improving our indicator. After screening all 400 combinations of possible amino acids by electroporation, we identified a F148P N149V mutant (ASAP4.2) as exhibiting a preferential decrease in F–70 compared to F+30. This resulted in a sharper F-V curve and a larger ΔF100.
To reduce F–70 even more, and thereby further improve ΔF100, we turned to mutating the voltage-sensing domain (VSD) of ASAP4.2. We hypothesized that if we could stabilize the down conformation of the S4 helix at −70 mV, we could make it dimmer there.
Modeling ASAP with MODELLER (49) suggested position 413 as being very important for creating an energy barrier to VSD movement. It was also previously reported to modulate the voltage input tuning of the Ciona voltage-sensing domain, which is structurally similar to our own (21). This position needs to move from the cytosol into the membrane bilayer during upward S4 helix movement, and interacts with the external environment. This suggests that hydrophobic/hydrophilic amino acids should have large effects on VSD movement at this position, which should translate into changes in fluorescence. Patch-clamp electrophysiology of all 20 amino acids at position 413 revealed two mutants with the desired dimming at −70 mV and increased ΔF100, F413V (ASAP4.3) and F413G (ASAP4b). F413M (ASAP4e) was also interesting, as it dramatically reduced brightness at both −70 and +30 mV, although more at +30 mV. This had the undesirable effect of reducing the ΔF100, but the relative fluorescence change (ΔF100/F–70) was improved.
Position 401 was also suggested to influence voltage tuning by modulating the hydrophobic plug there (50). Since both could be working together to control and tune the ability of the S4 helix to transition from the cytosol to the lipid bilayer of the cell, we screened all possible combinations of positions L401 and F413 by electroporation in our screening system. To our unpleasant surprise, no combinations gave a better response than ASAP4.3, ASAP4b and ASAP4e, which only had the single 413 mutations of F413V, F413G and F413M, respectively. Still seeking further improvements, we also screened all 400 combinations of position 65 and 69 in the beta barrel, but all resulting mutants were so dim that we did not pursue them any further.
Materials and Methods
Plasmid Construction
For transfection into HEK293-Kir2.1 Cells for electrical screening, the parent ASAP2f L146G S147T R414Q was subcloned into pcDNA3.1 with a CMV enhancer and promoter and bGH poly(A) signal. All plasmids were made by standard molecular biology techniques with all cloned fragments confirmed by sequencing (Sequetech). PCR reactions were carried out to generate PCR product libraries using standard PCR techniques, which were used to directly transfect HEK293-Kir2.1 cells with the linear product using lipofectamine 3000 (Thermo Fisher Scientific). For patch clamp characterization in HEK293A cells, all voltage indicators were subcloned into a pcDNA3.1/Puro-CAG vector between NheI and HindIII sites (20).
For in vitro characterization in cultured neurons, acute hippocampal slice and in vivo hippocampal imaging, ASAP variants were subcloned into pAAV.hSyn.WPRE. These were then midi-prepped and packaged into adeno-associated virus 8 (AAV8) by the Neuroscience Gene Vector and Virus Core of Stanford University. For somatic targeting in acute slice and in vivo, the C-terminus of ASAP4 variants was attached to the C-terminal cytoplasmic segment of the Kv2.1 potassium channel (33), that we previously used to restrict ASAP3 to the soma, axon and proximal dendrites (6). For EF1α-driven ASAP expression, viral constructs were generated by modifying published methods (34) using GateWay recombination and Gibson assembly, and produced in-house as previously described (6, 35). These were then packaged into AAV8 capsids by the Neuroscience Gene Vector and Virus Core at Stanford University.
Cultured Cell Lines
All cell lines were maintained in a humidified incubator at 37°C with 5% CO2. For electrical screening the previously described HEK293-Kir2.1 cell line (36) was maintained in high-glucose DMEM, 5% FBS, 2 mM glutamine, and 500 μg/mL geneticin (Life Technologies). For patch-clamp recordings to measure ASAP responsivity and kinetics, HEK293A cells were cultured in high-glucose Dulbecco’s Modified Eagle Medium (DMEM, Life Technologies) with 5% fetal bovine serum (FBS, Life Technologies) and 2 mM glutamine (Sigma-Aldrich).
Cultured Neurons
Hippocampal neurons were isolated from embryonic day 18 Sprague Dawley rat embryos of both sexes. Procedures were carried out in compliance with the rules of the Stanford University Administrative Panel on Laboratory Animal Care.
Viruses
AAV9-CamKII-Cre was obtained from the Penn Vector Core. AAV1-Syn-NES-jRGECO1a, ≥1×1011 vg/mL, Addgene #100854, and AAV1-syn-NES-jRGECO1b-WPRE-SV40, AddGene #100857, were ordered from Addgene. All ASAP viruses were produced by the Stanford Neuroscience Gene Vector and Virus Core facility, and by the lab of Sui Wang at Stanford University.
For the acute slice brightness comparisons, viruses were diluted in phosphate-buffered saline (PBS) until the following titers were reached: AAV9-CamKII-cre at a titer of 5.6×109 vg/mL, and all three ASAP viruses at a titer of 3.45×1011 vg/mL. For the 2-P imaging while patch clamping evoked spikes in hippocampal slice work, AAV8-syn-ASAP3/4b-Kv was injected at a titer between 1.21×1012 and 5×1012 vg/mL, and AAV1-syn-jrGECO1b was injected at a titer between 1.3×1012 and 5×1012 vg/mL, but we were not able to image the jRGECO1b well, so it was excluded from the analysis. For the 1-P imaging of patch clamping in hippocampal slice and evoking spikes, AAV8-syn-ASAP4b-Kv and AAV8-syn-ASAP3-Kv were injected at titers approximately between 1×1012 and 1×1013 vg/mL. For the in vivo 2-P imaging of ASAP4e and jRGECO1a in V1, AAV8-Syn-ASAP4e-Kv at a titer of 4.66×1011 vg/mL was co-injected with AAV1-Syn-NES-jRGECO1a at a titer of approximately 1×1011 vg/mL. For the in vivo 1-P imaging of hippocampus during running, either AAV8-ef1α -DiO-ASAP3-Kv at a titer of 2.35×1012 vg/mL, AAV8-ef1α -DiO-ASAP4b-Kv at a titer of 2.36×1012 vg/mL, or AAV8-ef1α -DiO-ASAP4e-Kv at a titer of 3.45×1011 vg/mL was injected. For the in vivo 2-P imaging of the hippocampus during a spatial navigation task, AAV8-syn-ASAP4b-Kv at a titer of 1.17×1012 vg/mL was co-injected with AAV1-syn-NES-jRGECO1b-WPRE-SV40 at a titer of 1.3×1013.
Animals
For the 1-P acute slice brightness comparisons, 2-P acute slice patch clamping experiments and in 2-P in vivo imaging experiments, adult male and female wild-type C57BL/6 were used. All mice were housed in standard conditions (up to five animals per cage, 12-hour light/dark cycles with the light on at 7 a.m., with water and food ad libitum). Day-18 Sprague Dawley rat embryos were used for hippocampal tissue for neuronal culture. All protocols were approved by the Stanford Institutional Animal Use and Care Committee.
For the in vivo fly imaging, ASAP4b was cloned into the pJFRC7-20XUAS vector (37) using standard molecular cloning methods (GenScript Biotech), and then inserted into the attP40 phiC31 landing site by injection of fertilized embryos (BestGene). We used the cell type-specific driver 21D-Gal4 (38) to express ASAP2f and ASAP4b in L2 cells. We imaged the axon terminals of L2 cells in its medulla layer M2 arbors. The genotypes of the imaged flies in Fig. S4 were: L2>>ASAP2f: +; UAS-ASAP2f/+; 21D-Gal4/+. L2>>ASAP4b: yw/+; UAS-ASAP4b/+; 21D-Gal4/+. All protocols were approved by the Stanford Institutional Animal Use and Care Committee.
In vivo 1-P imaging experiments were conducted at the University of California at Los Angeles (UCLA), where adult (11–23 week old) SST-IRES-cre knock-in adult male and female mice were used for all experiments. All animals were group housed (2–5 per cage) on a 12 h light/dark cycle. All experimental protocols were approved by the Chancellor’s Animal Research Committee of the University of California, Los Angeles, in accordance with NIH guidelines.
Animals used in acute slice 1-P patch clamping experiments were male and female wild-type mice aged 20–40 days. All mice used were maintained on a 12-h light/dark cycle, with food and water available ad libitum and in accordance with the Institutional Animal Care and Use Committee of Columbia University.
For the co-imaging of ASAP4e and jRGECO1a in V1, all animal experiments were conducted according to the National Institutes of Health guidelines for animal research. Procedures and protocols on mice were approved by the Animal Care and Use Committee at the University of California, Berkeley.
Cell screening
Cell screening was the same as previously described in Villette et. al. 2019. Briefly, HEK293-Kir2.1 cells were plated in 384-well plates (Grace Bio-Labs) on conductive glass slides (Sigma-Aldrich). Cells were transfected with PCR-generated libraries in 384-well plates with Lipofectamine 3000 (~100 ng DNA, 0.4 μL p3000 reagent, 0.4 μL Lipofectamine) followed by a media change 4–5 hours later, with imaging done 2 days post-transfection in Hank’s Balanced Salt solution (HBSS) buffered with 10 mM HEPES (Life Technologies). Cells were imaged at room temperature on an IX81 inverted microscope fitted with a 20× 0.75-numerical aperture (NA) objective (Olympus). A 120-W Mercury vapor short arc lamp (X-Cite 120PC, Exfo) served as the excitation light source. The filter cube set consisted of a 480/40-nm excitation filter and a 503-nm long pass emission filter. ASAP libraries were screened at room temperature with the operator locating the best field of view and focusing on the cells. A single field of view was imaged for a total of 5 s, with a 10-μs 150-V square pulse applied near the 3-s mark. Fluorescence was recorded at 100 Hz (10-ms exposure per frame) by an ORCA Flash4.0 V2 C11440–22CA CMOS camera (Hamamatsu) with pixel binning set to 4×4. Mutants were screened at least three times.
Whole cell patch clamping and imaging of HEK293A cells
Methods were as based on those in Villette et. al. 2019, with modifications. Briefly, ASAPs and upward Ace2N-mNeon variants were subcloned into a pcDNA3.1/Puro-CAG vector, and cells were transfected using Lipofectamine 3000 (400 ng DNA, 0.8 μL P3000 reagent, 0.8 μL Lipofectamine) per manufacturer’s recommended instructions. After plating the cells on 12 mm glass coverslips (Carolina Biological), the cells were patch clamped 24 hours after transfection. Patch-clamp experiments were mainly done as previously described in Villette et. al., 2019. Signals were recorded in voltage-clamp mode with a Multiclamp 700B amplifier and using pClamp software (Molecular Devices). Fluorophores were illuminated at ~4.3 mW/mm2 power density at the sample plane with an UHP-Mic-LED-460 blue LED (Prizmatix) passed through a 484/15-nm excitation filter and focused on the sample through a 40×1.3-NA oil-immersion objective (Zeiss). Emitted fluorescence passed through a 525/50-nm emission filter and was captured by an iXon 860 electron-multiplied charge-coupled device camera (Oxford Instruments) cooled to −80 °C. For all experiments fluorescence traces were corrected for photobleaching by dividing the recorded signal by a mono-exponential fit to the data. To characterize steady-state fluorescence responses, cells were voltage-clamped at a holding potential of −70 mV, then voltage steps of 1 s duration were imposed at −120, −100, −80, −60, −40, −20, 0, 30, 50, 70, 90, and 120mV. To obtain complete voltage −tuning curves, steps between −200 and +120 mV were imposed. The specific steps were −200, −180, −160, −140, −120, −100, −80, −60, −40, −20, 0, 30, 50, 70, 90, and 120mV. When voltage-clamp could not be imposed on some cells at the highest potentials, that step was excluded from data analysis. A scaled action potential waveform (FWHM = 3.5ms, −70mV to +30mV) recorded from a cultured hippocampal neuron was included before each step to estimate the fluorescence change of the indicators to action potential waveform. To characterize kinetics of ASAP indicators at both room temperature and 37°C, images were acquired at 2.5 kHz from an area cropped down to 64×64 pixels and further binned to comprise only 8×8 pixels. Fluorescence was quantified by averaging pixels with signal change in the corresponding cell shape after subtracting by the background pixels. Command voltage steps were applied for 1 s, and a double exponential or single exponential fit was applied to a 60-ms interval from the starting point of the onset and offset of voltage steps using MATLAB software (MathWorks). To characterize ASAP and upward Ace2N-mNeon variants on simulated AP burst waveforms (2 and 4 ms at FWHM) at room temperature, images were acquired at 1000 Hz from a 64×64-pixel FOV, then binned using 4×4 pixel binning. To characterize ASAP variants on square pulses (1, 2, and 4 ms, −70mV to +30mV) and AP burst waveforms (1.0 ms at FWHM) at 37 °C, images were acquired at 2500 Hz from a 64×64-pixel FOV, then binned using 8×8 binning. For more details, please see Villette et. al., 2019.
Brightness comparison of ASAP indicators in vitro
Cultured hippocampal neurons were transfected at 10 DIV via calcium phosphate with pcDNA3.1-ASAPx-Kv-mCyRFP2 variants. Cells were imaged at 12 DIV on an inverted confocal microscope (Olympus U-TB190) with a 20× objective (Olympus, NA 0.75). Images were taken using an Andor EMCCD897 camera with Andor IQ2.0 software. ASAPs and mCyRFP2 were excited with a 488 nm laser and fluorescence were collected via 514/30-nm and 607/36-nm filters, respectively. To correct crosstalk between the two channels, we constructed a colorless version of ASAP4b-Kv-mCyRFP2 with a Y312A mutation, which corresponds to the Y66A mutation in GFP. The fluorescence signal collected in the green channel was 3.28% of that of the red channel (n = 58 neurons) and was then subtracted for all the other variants. For a control comparison, we also changed the cpsfGFP part of ASAP4b into a non-circular-permuted version. The artificial cerebral spinal fluid (ACSF) recipe used was as follows: NaCl (150 mM), KCl (3 mM), CaCl2 (3 mM), MgCl2 (2 mM), HEPES (10 mM), and Glucose (5 mM) in deionized (DI) H2O.
Primary neuronal culture and transfection
Methods used here were the same as in Villette et. al., 2019. Briefly, hippocampal neurons were isolated from embryonic day 18 Sprague Dawley rat embryos by dissociating them in RPMI medium containing 5 units/mL papain (Worthington Biochemical) and 0.005% DNase I at 37° C and 5% CO2 in air. Neurons were plated on washed 12-mm No. 1 glass coverslips pre-coated overnight with > 300-kDa poly-D-lysine hydrobromide (Sigma-Aldrich). Cells were plated for several hours in Neurobasal media with 10% FBS, 2 mM GlutaMAX, and B27 supplement (all Life Technologies), then the media was replaced with Neurobasal with 1% FBS, 2 mM GlutaMAX, and B27. Half of the media was replaced every 3–4 days with fresh media without FBS. 5-Fluoro-2’-deoxyuridine (Sigma-Aldrich) was typically added at a final concentration of 16 μM at 7–9 DIV to limit glial growth. Hippocampal neurons were transfected at 9–11 DIV with a mix of 500 ng total DNA including 100–300 ng of indicator DNA, 1 μL Lipofectamine 2000 (Life Technologies) in 200 μL Neurobasal with 2 mM GlutaMax.
High resolution cultured hippocampal neuron imaging
Cultured hippocampal neurons were transfected at 9–11 DIV via Lipofectamine 3000 (Life Technologies) with pAAV-hSyn-ASAPx-WPRE and pAAV-hSyn-Ace2-D92N-E199V-mNeon-ST-WPRE (upward Ace2N-mNeon) variants. Cells were imaged at 12–20 DIV on an inverted confocal microscope (Zeiss Axiovert 200M) with a 40×/1.2-NA objective (Zeiss). ASAPs and upward Ace2N-mNeon were excited with 488/30 nm filters and fluorescence were collected via 531/40-nm filters by a 120-W Mercury vapor short arc lamp (X-Cite 120PC, Exfo). Images were taken using an ORCA Flash4.0 V2 C11440-22CA CMOS camera (Hamamatsu) with Micro-manager software. Exposure time was 1 s per frame, with frames collected as 2048×2048 16-bit images. (21)
1-P photobleaching in hek293-kir2.1 cells
Illumination was provided with a blue LED light source (peak at 453 nm, UHP-F3-455 with LLG-3 light guide, Prizmatix). HEK293-Kir2.1 cells plated on poly-D-lysine coated 12-mm diameter coverslips (0.13–0.17 mm thickness; Carolina Biological) were transiently transfected using Lipofectamine 3000 (Life Technologies) at 60-80% cell confluency by using plasmids with a CMV promoter (200–300 ng DNA, 0.8 μL P3000, and 0.8 μL Lipofectamine 3000). The transfected cells were then imaged 1–3 days post-transfection. During imaging, cells were bathed in Hank’s Balanced Salt Solution (HBSS) with 10 mM HEPES, which was pumped with a Masterflex HV-77122-24 Variable-Speed pump. Light was filtered with a U-N41017 EN GFP filter cube (Chroma) through a 40× water immersion objective (Olympus LUMPlanFL), before being imaged with an Orca Flash 4.0LT camera being controlled by HCImage Live (Hammamatsu).
2-P photobleaching in HEK293-Kir2.1 cells
Cultured cells were the same as those listed under 1-P photobleaching in HEK293-Kir2.1 cells above. A custom-built 2-P microscope system using a tunable 2-P laser (InSight X3, Spectra-Physics, Santa Clara, CA) was modulated with a Pockel’s cell (350-80, Conoptics, Danbury, CT). The laser was directed with a 12.0-kHz resonant scanner (39) and focused through a 40×, 0.8-NA objective (Nikon, Japan). Data were collected through a PMT (H10770PA-40, Hamamatsu, Japan), after being filtered for green light (ET525/50M, Chroma Technology).
2-P in vivo imaging of Drosophila
Flies were mounted, dissected to expose the brain, perfused with a saline-sugar solution, and imaged for up to 1h, as previously described (13, 40). Neurons were excited at 920 nm with 5–15 mW of total power, and photons were collected with a 525/50-nm filter. Data was collected at an 82.4 Hz frame rate with 200×20-pixel frames using a 15X digital zoom, using bidirectional scanning. We used a Leica TCS SP5 II two-photon microscope with a Leica HCX APO 20×/1.0-NA water immersion objective (Leica) and a pre-compensated Chameleon Vision II femtosecond laser (Coherent, Inc.).
Visual stimulation
Visual stimuli were generated with custom-written software using MATLAB (MathWorks) and presented using the blue LED of a DLP Lightcrafter 4500 (Texas Instruments) projector in Pattern Sequence mode. The stimulus was refreshed at 300 Hz and utilized 6 bits/pixel, allowing for 64 distinct luminance values. The stimulus was projected onto a 9×9-cm rear-projection screen positioned approximately 8 cm anterior to the fly that spanned approximately 70° of the fly’s visual field horizontally and 40° vertically. A small square was also simultaneously projected onto a photodiode (Thorlabs, SM05PD1A) configured in a reversed-biased circuit. The stimulus was filtered with a 482/18-nm bandpass filter so that it could not be detected by the microscope PMTs. The radiance at 482 nm was approximately 78 mW sr−1 m−2.
The imaging and the visual stimulus presentation were synchronized using triggering functions provided by the LAS AF Live Data Mode software (Leica) as well as the signal from the photodiode directly capturing projector output. A Data Acquisition Device (NI DAQ USB-6211, National Instruments) connected to the computer used for stimulus generation was used to acquire the photodiode signal, generate a trigger signal at the beginning of stimulus presentation, and acquire the trigger produced by the LAS software at the start of each imaging frame. This allowed the imaging and the stimulus presentation to initialize in a coordinated manner and ensured that stimulus presentation details were saved together with imaging frame timings (in MATLAB .mat files) to be used in subsequent processing. Data was acquired on the DAQ at 5000 Hz.
The visual stimuli used were 300-ms search stimuli: alternating full contrast light and dark flashes, each 300 ms in duration, were presented at the center of the otherwise dark screen. The stimulus was such that from the perspective of the fly, the flashing region was 8° from each edge of the screen. In subsequent analysis, the responses to this stimulus were used to select ROIs with receptive fields located at the center of the screen instead of at the edges. This stimulus was presented for 5000 imaging frames (61 s) per field of view. Single 20-ms light and dark flashes, with 500-ms of gray between the flashes, were presented over the entire screen. The light and dark flashes were randomly chosen at each presentation. The Weber contrast of the flashes relative to the gray was 1. This stimulus was presented for 10,000 imaging frames (122 s) per field of view.
In vivo imaging data analysis
The acquired time series were saved as .lif files and read into MATLAB using Bio-Formats (Open Microscopy Environment). Each time series was aligned in x and y coordinates by maximizing the cross-correlation in Fourier space of each image with a reference image (the average of the first 30 images in the time series). For each time series, ROIs around individual arbors were selected by thresholding the series-averaged image with a value that generates appropriate ROIs, and then splitting any thresholded ROIs consisting of merged cells and/or adding ROIs that were missed by the thresholding.
The ΔF/F for each time series was calculated after subtracting the background intensity and correcting for bleaching as previously described (13, 40). Time series with uncorrected movement, which was apparent as irregular spikes or steps in the ΔF/F traces that were coordinated across ROIs, were discarded. The stimulus-locked average response was computed for each ROI by reassigning the timing of each imaging frame to be relative to the stimulus transitions (gray to light or gray to dark) and then computing a simple moving average. The averaging window was 8.33 ms and the shift was 8.33 ms, which effectively resampled our data from 82.4 Hz to 120 Hz.
As the screen on which the stimulus was presented did not span the fly’s entire visual field, only a subset of imaged ROIs experienced the stimulus across approximately the entire extent of their spatial receptive fields. These ROIs were identified based on having a response of the appropriate sign to the 300-ms search stimulus. ROIs lacking a response to these stimuli or having one of the opposite sign were not considered further. The peak response to each flash (peak ΔF/F) was the ΔF/F value farthest from zero in the expected direction of the initial response (depolarization or hyperpolarization). The time to peak (tpeak) was the time at which this peak response occurred, relative to the start of the light or dark flash. Pairwise Student’s t-tests were performed.
Acute slice brightness comparisons
Viruses were diluted with PBS until the following titers were reached: 3.45×1011 for AAV8-EF1α-FLex-ASAP3/4.4/4.5 and 5.6 ×109 AAV9-CamkII-cre, which was obtained from the UPenn viral core, and is plasmid #105558 on Addgene. Mice were injected between p40 and p56. Each mouse was injected with 950-1000 nL at a flow rate of 200nL/min. Acute slices were obtained 28-36 days post injection. Injections were performed at the following coordinates relative to Bregma: AP: +1.2mm; ML: −2mm; DV: −3.2 to −2mm, placing them into the dorsal striatum. Light was delivered to and received from the samples via a U-N41017 EN GFP filter cube (Chroma), through a 40x water immersion objective (Olympus LUMPlanFL 40x). To control for fluctuations in illumination intensity, videos of 50 frames were recorded at 33hz with a 30ms exposure time, and the average taken. Imaging was done with an orca-Flash4.0 LT. ROIs for the cells were drawn in ImageJ (National Institute of Health), taking the mean pixel value within the ROI. Background was determined as the tissue near the cell without any cell debris present, and the mean was taken and subtracted out to give the final brightness value for a cell.
Simultaneous 1-P imaging and electrophysiology in hippocampal slice
Mice aged 20–40 days received injections with AAV virus carrying ASAP3-Kv or ASAP4b-Kv. 4-7 days post injection, animals were anesthetized with 5% isoflurane and acute coronal slices were prepared as previously described (41). After achieving whole-cell recording configuration, action potentials were evoked in current clamp mode using 1 ms injections of 1 pA. Images were simultaneously recorded at ~1000 frames per second using a coolLED-pe300 light source (coolLED LTD, Andover UK) and a photometrics prime-95B camera (Teledyne Photometrics, Tuscon AZ) with an Olympus LUMPLFLN 40×W, 0.8 NA.
Simultaneous 2-P imaging and electrophysiology in hippocampal slice
Mice between p28 and p60 were injected with a mixture of AAV8-syn-ASAP3/b-Kv.WPRE and AAV1-syn-jRGECO1b-WPRE totalling 1 uL in volume. Injections were performed unilaterally into the right hemisphere under either ketamine/xylazine or isofluorane anesthesia. AAV8-syn-ASAP3/4b-Kv was injected at a titer between 1.21×1012 and 5×1012. AAV1-syn-jRGECO1b was injected at a titer between 1.3×1012 and 5×1012. The mixture was injected at 100nL/min at the following coordinates from bregma: AP: −1.5mm. ML: −1.5mm. DV: −1.5 to −1.3mm through a glass micropipette (VWR) pulled with a long narrow tip (size ~10–20 μm) using a micropipette puller (Sutter Instrument). The pipette was gently withdrawn 5 min after the end of infusion and the scalp was sutured. Mice were sliced 4–8 weeks after AAV injection. Coronal brain slices (300 μm) containing the dorsal striatum were obtained using standard techniques (42). Briefly, animals were anesthetized with isoflurane and decapitated. The brain was exposed and chilled with ice-cold artificial cerebrospinal fluid (ACSF) containing 125 mM NaCl, 2.5 mM KCl, 2 mM CaCl2, 1.25 mM NaH2PO4, 1 mM MgCl2, 25 mM NaHCO3, and 15 mM D-glucose (300–305 mOsm). Brain slices were prepared with a vibrating microtome (Leica VT1200 S, Germany) and left to recover in ACSF at 34 °C for 30 min followed by room temperature (20–22 °C) incubation for at least additional 30 min before transfer to a recording chamber. The slices were recorded within 5 hours after recovery. All solutions were saturated with 95% O2 and 5% CO2 (Carbogen) in ACSF, which was pumped out of the recording chamber using a Masterflex HV-77122-24 pump. Hippocampal CA1 layer pyramidal neurons were visualized with infrared differential interference contrast (DIC) illumination and ASAP3/4b-Kv-expressing neurons were identified with epifluorescence illumination on a BX-51 microscope equipped with a 60× 1.0-NA water-immersion objective and DIC optics (Olympus) and a Lambda XL arc lamp (Sutter Instrument). Whole-cell current-clamp recording was performed with borosilicate glass microelectrodes (3–5 MΩ) filled with a K+ based internal solution (135 mM KCH3SO3, 8.1 mM KCl, 10 mM HEPES, 8 mM Na2-phosphocreatine, 0.3 mM Na2GTP, 4 mM MgATP, 0.1 mM CaCl2, 1 mM EGTA, pH 7.2–7.3, 285–290 mOsm). Access resistance was compensated by applying bridge balance. To induce firing, 1 ms pulses of 2-nA current were injected to induce spiking at different frequencies (10, 20 or 50, Hz). Recordings were obtained with a Multiclamp 700B amplifier (Molecular Devices) using the WinWCP software (University of Strathclyde, UK). Signals were filtered with a Bessel filter at 2 kHz to eliminate high frequency noise, digitized at 10 kHz (NI PCIe-6259, National Instruments). Two-photon imaging was performed with a custom built two-photon laser-scanning microscope as described previously (43), equipped with a mode-locked tunable (690–1040 nm) Mai Tai eHP DS Ti:sapphire laser (Spectra-Physics) tuned to 940 nm. The jRGECO signal in the red channel was ultimately not included because this setup was not able to obtain jRGECO signals at 940nm, and did not have enough power at higher wavelengths to obtain a good signal in the red channel.
ASAP signals were acquired by a 1-kHz line scan across the membrane region of a cell. Signals recorded along each line were integrated to produce a fluorescence trace over time, and a region of the line scan corresponding to the background beyond the cell membrane was chosen as the background value, and subtracted from the integrated membrane region. All traces were then normalized to 1 by either dividing by a monoexponential, or dividing by the first 0.5 s of data where no activity was present, if there was no photobleaching present and the exponential fit was not working well.
For the current steps, cells were patch clamped in current clamp mode, and taken through steps starting at 100 pA, and increasing by 50–100 pA until spiking was elicited, and then continued until spikes began to attenuate due to the depolarization blockade. Spikes were included in the SNR comparisons and average waveforms if the corresponding electrophysiological waveform crossed 20 mV in height at its peak. This excluded attenuated spikes from the analysis. Once detected in the data, spikes were aligned by taking the derivative of the waveform, and aligning the individual spikes by the peak of the derivative during the onset (where the onset of the voltage waveform is the steepest).
For the SNR calculation, the formula (ΔF/F0)/STD(F0) was used. F0 was determined by using the value of the monoexponential or linear fit right before the spike occurred in the raw data. For taking the standard deviation, the 50 points immediately preceding the detected spike peak in the raw data were used. ΔF is the maximum value attained by each spike after the trace was normalized to 1 by dividing by a monoexponential fit to the trace. The data points ± 2 ms of the peak of the average fluorescence waveform were searched to find the peak of single spikes, in order to account for timing jitter in the recordings.
In vivo 2-P imaging of ASAP4e and jRGECO1a in the visual cortex
A wild-type (Jackson Laboratories, Black 6, stock no. 000664) mouse was used for simultaneous calcium and voltage imaging. The cranial window implantation procedure used has been described previously (44). In brief, the 3-month-old mouse was anesthetized with 1–2% isoflurane in O2 combined with the analgesic buprenorphine and head-fixed in a stereotax. A craniotomy was made over left V1, followed by pipet injection of 200 nL of viral solution (3:1 ratio of AAV8-Syn-ASAP4e-Kv, 6.21×1011 vg/mL and AAV1-Syn-NES-jRGECO1a, ≥ 1×1011 vg/mL, Addgene #100854) at 300 μm below the exposed brain surface. A glass window was embedded and sealed in the craniotomy. A stainless-steel head-bar was firmly attached to the skull with dental acrylic. The implanted mouse was provided with the post-operative analgesic Meloxicam for 2 days and allowed to recover for 2 weeks prior to imaging experiments.
Imaging was performed while the mouse was head-fixed and awake. A modified, commercially available two-photon microscope was used (26). A titanium-sapphire laser (Chameleon Ultra II, Coherent Inc.) was used as the two-photon excitation source, and a wavelength of 1000 nm was chosen to excite both ASAP4e-Kv and jRGECO1a fluorescent proteins. Post-objective powers of 18–31mW were used for imaging of depths 140–185 μm below brain surface. Fields of view from 32×32 μm to 240×240 μm were imaged at a pixel size of 0.25×0.25 μm/pixel, resulting in frame rates varying from 15-99Hz. Images from two fluorescence emission channels (green: ASAP4e-Kv, red: jRGECO1a) were collected simultaneously. Image time stacks were first registered with rigid motion correction (NoRMCorre, MATLAB), then single neuron time traces were extracted by averaging the signal within hand-drawn ROIs using Fiji (ImageJ).
In vivo 1-P imaging of hippocampus during running
Adult (11–23 weeks old) SST-IRES-Cre mice (2 male, 5 female) were injected with 500 nL of either AAV8-EF1α-DiO-ASAP3-Kv (2 mice) at a titer of 2.35×1012, AAV8-ef1α-DiO-ASAP4b-Kv (2 mice) at a titer of 2.36×1012, or AAV8-EF1α-DiO-ASAP4e-Kv (4 mice) at a titer of 3.45×1011, in the right dorsal CA1 area at 60 nL/min. 455-nm light was used as it has been shown to increase photostability over 470 nm in ASAP family GEVIs (45). We kept maximum LED power at 5 mW total and 25 0mW/mm2 or less, as we found, and it has been previously shown, that sustained power levels above this resulted in tissue damage (46). Data was acquired at 1000 Hz while the mice ran on a wheel, in 11-sbehavioral intervals. In between each 11 second recording bout was an 8.1-s pause. All surgical procedures, injection site, postoperative and training protocols are the same as those described in (47).
Animals were imaged using a custom-built, high speed single-photon epi-fluorescent microscope. Photoexcitation was provided via a fiber-coupled LED (Thorlabs, M455F3) with a center wavelength of 455nm (45). Excitation light is collimated after a 2-m long, 400-μm core multi-mode fiber optic patch cord (Thorlabs, M28L02) and expanded using a Keplerian telescope. The expanded beam is passed through a spectral excitation filter (Thorlabs, MF455-45), and reflected off of a long-pass dichroic mirror (Thorlabs, MD480) before teaching a 16×/0.8NA water-immersion objective (Nikon, CFI75 LWD 16X W). The expander is used to generate a localized excitatory spot ~165 μm in diameter, at the focal plane. Emitted fluorescence is collected and transmitted through the dichroic mirror and an emission filter (Thorlabs, MF530-43) before reaching a 100-mm tube lens (Thorlabs, AC300-100-A) to form an image on a fast scientific CMOS camera (Hamamatsu Photonics, ORCA-Lightning C12120-20P) capable of kHz framerates. The spatial sampling rate of the microscope was calculated as 5.5μm/8× = ~688nm and experimentally confirmed using a calibration test target. Excitatory power (mW) was measured on a power meter (Thorlabs PM100D, S130C sensor) before each experiment and converted to irradiance (mW/mm2) within the excitatory spot area for direct comparisons between datasets.
Time series data was extracted by first motion correcting the videos using NoRMCorre (MATLAB). ROIs were then drawn by hand in Fiji (ImageJ), and an ROI representing the background subtracted from the time series. The background subtracted time series data was then corrected for photobleaching and normalized to 1 by dividing it by a lowpass filtered version of itself using a 0.5- to 2-Hz lowpass second-order butterworth filter. This had the desired effect of capturing small changes due to movement and eliminating them, something a monoexponential fit did not do well. The data was then put through our spike detection algorithm, choosing a minimum of 10 spike templates per cell. To obtain the theta phase, we bandpass filtered the fluorescence traces between 6 and 11 Hz using a first order butterworth filter, giving us the theta frequency band. We then applied the Hilbert transform, giving us the instantaneous amplitude and phase of the bandpass filtered signal. We were able to detect a very consistent relationship between theta phase and spiking across all mice and all indicators, with spike likelihood peaking at 0 radians (Fig. 4E). Note that the ASAP3-Kv plot had to be flipped, since it is a downward going indicator and reports all electrical activity in the opposite direction as ASAP4b-Kv and ASAP4e-Kv, meaning it “peaks” in theta pi radians off from the upward indicators unless the response is flipped.
In vivo 2-P imaging of hippocampus during spatial navigation task
Prior to surgery, imaging cannula implants were prepared using similar methods to those previously published (48). Imaging cannulae consisted of a 1.3-mm-long stainless steel cannula (3 mm outer diameter, McMaster) glued to a circular cover glass (Warner Instruments, #0 cover glass 3mm diameter; Norland Optics #81 adhesive). Excess glass overhanging the edge of the cannula was shaved off using a diamond tip file. C57B6/J mice (Jackson Laboratory stock #000664) were first anaesthetized by an intra-peritoneal injection of a ketamine/xylazine mixture. Before the start of the surgery, animals were also subcutaneously administered 0.08 mg Dexamethasone, 0.2 mg Carprofen, and 0.2 mg Mannitol. After one hour, animals were maintained under anesthesia via inhalation of a mixture of oxygen and 0.5–1% isoflurane. Then, a mixture of adeno-associated viruses containing ASAP4b-Kv and jRGECO1b constructs (n = 3 mice; AAV8-syn-ASAP4b-Kv-WPRE, titer=1.17×1012 vg/mL; AAV1-syn-NES-jRGECO1b-WPRE-SV40, titer = 1.3×1013, AddGene 100857) was injected into the left hippocampus (500 nL injected at −1.8 mm anterior/posterior [AP], −1.1 mm medial/lateral [ML], 1.4 mm from the dorsal surface [DV]) using a 36-gauge Hamilton syringe (World Precisions Instruments). The needle was left in place for 15 minutes to allow for virus diffusion. The needle was then retracted and the imaging cannula implant was performed.
A 3-mm-diameter craniotomy was performed over the left posterior cortex (centered at −2 mm AP, −1.8 mm ML). The dura was then gently removed and the overlying cortex was aspirated using a blunt aspiration needle under constant irrigation with sterile artificial cerebrospinal fluid (ACSF). Excessive bleeding was controlled using gel foam that had been torn into small pieces and soaked in sterile ACSF. Aspiration ceased when the fibers of the external capsule were clearly visible. Once bleeding had stopped, the imaging cannula was lowered into the craniotomy until the cover glass made light contact with the fibers of the external capsule. In order to make maximal contact with the hippocampus while minimizing distortion of the structure, the cannula was placed at approximately a 10 degree roll angle relative to the animal’s skull. The cannula was then held in place with cyanoacrylate adhesive. A thin layer of adhesive was also applied to the exposed skull. A number 11 scalpel was used to score the surface of the skull prior to the craniotomy so that the adhesive had a rougher surface on which to bind. A headplate with a left-offset 7-mm diameter beveled window was placed over the secured imaging cannula at a matching 10-degree angle, and cemented in place with Met-a-bond dental acrylic that had been dyed black using India ink to prevent VR light from coming into the objective.
At the end of the procedure, animals were administered 1 mL of saline and 0.2 mg of Baytril and placed on a warming blanket to recover. Animals were typically active within 20 minutes and were allowed to recover for several hours before being placed back in their home cage. Mice were monitored for the next several days and given additional Carprofen and Baytril if they showed signs of discomfort or infection. Mice were allowed to recover for at least 10 days before beginning water restriction and VR training.
All virtual reality environments were designed and implemented using the Unity game engine (https://unity.com/). Virtual environments were displayed on three 24-inch LCD monitors that surrounded the mouse and were placed at 90 degree angles relative to each other. A dedicated PC was used to control the virtual environments and behavioral data was synchronized with calcium imaging acquisition using transistor-transistor logic (TTL) pulses sent to the scanning computer on every VR frame. Mice ran on a fixed axis foam cylinder, r and running activity was monitored using a high precision rotary encoder (Yumo). Separate Arduino Unos were used to monitor the rotary encoder and control the reward delivery system.
In order to incentivize mice to run, the animals’ water intake was restricted. Water restriction was not implemented until 10–14 days after the imaging cannula implant procedure. Animals were given 0.8–1 mL of 5% sugar water each day until they reached ~85% of their baseline weight and given enough water to maintain this weight.
Mice were handled for 3 days during initial water restriction and watered through a syringe by hand to acclimate them to the experimenter. On the fourth day, we began acclimating animals to head fixation (day 4: ~30 minutes, day 5: ~1 hour). After mice showed signs of being comfortable on the treadmill (walking forward and pausing to groom), we began to teach them to receive water from a “lickport”. The lickport consisted of a feeding tube (Kent Scientific) connected to a gravity fed water line with an in-line solenoid valve (Cole Palmer). The solenoid valve was controlled using a transistor circuit and an Arduino Uno. A wire was soldered to the feeding tube and capacitance of the feeding tube was sensed using an RC circuit and the Arduino capacitive sensing library. The metal headplate holder was grounded to the same capacitive-sensing circuit to improve signal-to-noise, and the capacitive sensor was calibrated to detect single licks. The water delivery system was calibrated to deliver ~4 uL of liquid per drop.
After mice were comfortable on the ball, we trained them to progressively run further distances on a VR training track in order to receive sugar water rewards. The training track was 450 cm long with black and white checkered walls. A pair of movable towers indicated the next reward location. At the beginning of training, this set of towers were placed 30 cm from the start of the track. If the mouse licked within 25 cm of the towers, it would receive a liquid reward. If the animal passed by the towers without licking, it would receive an automatic reward. After the reward was dispensed the towers would move forward. If the mouse covered the distance from the start of the track (or the previous reward) to the current reward in under 20 seconds, the inter-reward distance would increase by 10 cm. If it took the animal longer than 30 seconds to cover the distance from the previous reward, the inter-reward distance would decrease by 10 cm. The minimum reward distance was set to 30 cm and the maximal reward distance was 450 cm. Once animals consistently ran 450 cm to get a reward within 20 seconds, the automatic reward was removed and mice had to lick within 25 cm of the reward towers in order to receive the reward. After the animals consistently requested rewards with licking, we began training on tracks used for imaging.
Two visually distinct VR tracks were used for imaging. Each track was 200 cm in length with a 50 cm hidden reward zone. In the first VR track, the 50-cm reward zone was the last 50 cm of the track, and in the second VR track, the 50-cm reward zone began 75 cm down the VR track so that it was in the middle of the track. Mice had to lick within the reward zone in order to receive liquid rewards. At the end of each trial, the animal was teleported to a dark hallway for a randomly determined timeout period of 5–10 s, chosen with equal probability for each possible timout length. During this timeout period, the laser power was reduced to 0 mW in order to reduce excessive photobleaching. After the timeout period finished, the laser power was increased and the mouse self initiated the beginning of the next trial by running forward. Data from both VR tracks was included in all analyses.
To image the calcium and voltage activity of populations of neurons in CA1, we used a resonant-galvo scanning two photon microscope (Neurolabware). All data was collected using a Leica HC IRAPO L 25×/1.0-NA objective (2.6 mm WD). Neurolabware microscope firmware was modified to allow continuous bidirectional scanning at 989 Hz without digitizer buffer overload (16×796 pixels, 0.02×0.64 mm FOV). 940-nm light (Coherent Discovery laser) was used for excitation of both jRGECO1b and ASAP4b-Kv in all cases. Laser power was controlled using a pockels cell (Conoptics). Laser power was set on each session to allow good SNR with the least amount of power possible. For ASAP4b-Kv imaging, the power ranged from 366 to 645 mW/mm2. Light was collected using a Hamamatsu H10770B-40 (green channel) and Hamamatsu H11706-40 MOD (red channel) photomultiplier tubes.
Data was motion corrected using the motion correction pipeline from the Suite2P software package (https://github.com/MouseLand/suite2p). Putative CA1 cell membrane segments were circled by hand using the motion corrected average ASAP4b-Kv image from each session in ImageJ (imagej.nih.gov). Given the dense labeling of cells as well as the dense cell packing of the CA1 pyramidal cell layer, some of the membrane segments likely contain signals mixed from several cells. Based on the numerical aperture of the objective and our approximate axial resolution, we estimate that each ROI contains signal from (~1–3) cells. Pixel-averaged timeseries were extracted from both the red and green channels for each ROI.
For each ROI, we calculated ΔF/F independently for the green and red channels. Since laser power was set to 0 mW between each trial, signal baseline was calculated independently on each trial as well. Due to the small FOV and the fact that animals were running at high speeds (~40 cm/s) some frames were not able to be accurately motion corrected. We attempted to remove the effect of these high-motion frames from our analyses by using Suite2P’s motion estimates to calculate which frames were corrupted by motion. Any frame within 20 frames of one of these high motion frames was replaced with a “NaN” value. Motion estimates from Suite2P rigid motion correction were then used as nuisance regressors for the remaining timepoints, with the following design matrix: X = [x(t), y(t), x2 (t), y2(t), x(t)x(t)]. The residual timeseries from this regression were used for the remaining analyses. For baseline calculation, NaNs were linearly interpolated from the surrounding frames. These motion-imputed timeseries were then low pass filtered to calculate a baseline timeseries (green channel: 0.5 Hz 8th order Butterworth low pass filter, red channel: 0.25 Hz 8th order Butterworth low pass filter). Residual ROI timeseries (NaNs included) were divided by this baseline to get ΔF/F. For place cell identification and visualization, ΔF/F was convolved with a 5-frame Gaussian.
Place cells were identified using a previously published spatial information (SI) metric (31) where λj is the average activity rate of a cell in position bin j, λ is the position-averaged activity rate of the cell, and pj is the fractional occupancy of bin j. The track was divided into 10 cm bins, giving a total of 20 bins.
To determine the significance of the SI value for a given cell, we created a null distribution for each cell independently using a shuffling procedure. On each shuffling iteration, we circularly permuted the cell’s time series relative to the position trace within each trial and recalculated the SI for the shuffled data. Shuffling was performed 100 times for each cell, and only cells that exceeded all 95% of permutations were determined to be significant “place cells”.
To further ensure the reliability of the place cells, we implemented split-halves cross-validation. Taking only the odd-numbered trials, we computed the average firing rate map to identify the position of peak activity. Each cell’s activity was “z-scored” based on the mean and standard deviation across spatial bins on odd-numbered trials. Cells were sorted by this position and then the average activity on even-numbered trials was plotted. This gives a visual impression of the reliability of the place cells. For visualization, single trial activity rate maps were smoothed with a 20-cm (2 spatial bins) Gaussian kernel.
Gaussian log likelihood probability signal detection technique
The spike detection framework we used builds on the log likelihood ratio based framework created in Wilt. et. al. 2013. To implement the equations developed in Wilt et. al. 2013 on real world, empirical data however, some changes were required. The first was to the underlying assumptions about the noise, where we changed them from theoretical shot-noise limited Poisson assumptions to empirically determined gaussian ones. We found this to be necessary because additional noise is added to the photon-shot noise when the data is collected, and comes from the camera, electric noise in the cables, and many other possible sources. This caused the Poisson assumptions from Wilt et. al. 2013 to often underestimate the actual noise levels in most of our datasets.
Spike templates were chosen for each imaging session, and were chosen to be the largest spiking events from the beginning of the session, with a minimum of 10 chosen each time. Naturally, as photobleaching occurred across trials and spikes become noisier, fewer were detected since the template spikes were taken from the initial imaging period and were thus much larger. While taking only the largest events to use as the template results in very conservative detection, with smaller, noisier events remaining undetected, we wanted to be confident in the events we did detect, and felt that this was a safer approach. The red line represents the significance threshold, which was chosen such that after breaking the data vector into pieces with lengths equal to the length of the spike template, there was a 1/(20×number of pieces) chance of getting a false positive in any given piece of data. This was done to correct for multiple comparisons.
Once the event templates were chosen, the equations and procedures described below allow the data to be converted into a probability vector. The probability vector quantifies the probability that the data came from the distribution defined by the templates. N is the length of the templates in samples (time bins), and the data is taken in N samples at a time and compared to it. The background also has a template of length N, but since our data was normalized to 1, we set the background to a vector of ones of length N. See the section below on Background Noise Estimation for how we estimated the standard deviation of the background template. Our new gaussian equations for calculating the log likelihood probability that the observed data came from the distribution defined by the template events are as follows:
For time bins where the k’th mean template value is less than the k’th value of the background, where k only counts the time bins where this condition is true. U is the total number of time bins where the mean of the templates are less than the mean of the background. fk is the k’th sample of the new data being analyzed. is the mean of the mean of the background template at the k’th data point. For our purposes this was the number 1 for all k since we normalized the data, but it does not have to be. is the standard deviation of the background at the k’th point. See the section Background Noise Estimation for how this was estimated. is the mean of the templates the user selected at the k’th point. Note that this allows for the shape of the event to be taken into account when calculating probabilities. is the standard deviation of the k’th time bin for the templates chosen. This means that each time bin of the event template has its own mean and standard deviation, creating N gaussian distributions, which are needed to take the gaussian integrals at each time bin. N is the length of the templates in time bins.
Below, for time bins when the j’th mean template value is greater than the j’th value of the background, where j only counts the time bins where this condition is true. O is the total number of time bins where the mean of the templates are greater than the mean of the background. fj is the j’th sample of the new data being analyzed.
This is the same as above, only for time bins where , so the limits of integration change.
This is the same as above, only for time bins where , so the limits of integration change.
These probabilities are multiplied together, the log of the ratio of them obtained, and ultimately a single number for the i’th sample of the data vector is returned, where i runs from 1 to the length of the data vector.
Note that since N is the length of the template in samples, N = U + O.
This is repeated, each time shifting over by a single time bin in the data, until the entire data vector has been analyzed and converted into a probability vector. The very end of the data vector is chopped as we did not find an objective way to pad the end of data vector such that it would not impact the probabilities calculated for when the template distribution reaches the end. Fortunately, our templates were typically very short in length, so this resulted in a very negligible loss of data at the very end of each data set (a few tens of milliseconds). While taking the log of the ratio here is not strictly necessary for the purposes of signal detection, it helped to keep the ratio from becoming too positive or too negative to visualize effectively when making plots.
We next find all of the events that cross the probability threshold we set. Every segment above threshold is considered a single template matching event, for as long as it stays above threshold in the log likelihood probability vector. Since it does this, it is important to set the filter parameters such that you pull out the events you care about. For example, if the user wanted to detect single spikes riding on top of depolarizing calcium waves, as well as the depolarizing waves themselves, you would first set a very low frequency lowpass filter as the baseline calculation, and choose the entire duration of the burst as a template. Once you have the detected bursts pulled out, you would then set the passband of the lowpass filtered calculation of the baseline higher than what was used previously to pull out the entire burst, in order to flatten out the calcium portion of the event, while maintaining the faster spikes for detection. This enables the user to sequentially detect bursts, followed by spikes within bursts.
For onset timing, the time point where the log likelihood ratio first crosses the threshold is considered the start of the event. For the event detection performed on the 1-P in vivo imaging dataset of somatostatin-positive (SST+) interneurons, we first highpass filtered both the spike templates and raw data with a 20-Hz second-order Butterworth filter.
Background noise estimation
The standard deviation of the background template in this case is assumed to be constant across the background template. It is recalculated for each new batch of data that is fed into the program, and involves 3 successive attempts, if the previous attempt fails.
First attempt
The program fits a gaussian mixed model (GMM) to the entire data vector, with the assumption that there are two gaussians present. One is the signal, one is the noise. This tends to work well for traces where lots of activity is present, giving the histogram of the data vector a tail to one side; otherwise it tends to only find a single gaussian. The standard deviation of the noise is set to be the std. of the gaussian on the left if the indicator is upward going, or the gaussian on the right if it is downward going, which the program detects from the peak of the average templates. This prevents overestimating the noise, which would result in more false negatives than desired (but fewer false positives as well).
Second attempt
If the standard deviation of the GMM fit is greater than the standard deviation of the whole data vector, then something bad happened with the fit because that doesn’t make any sense. The program then reverts to what we decided to call the “asymmetric distribution technique”.
Asymmetric distribution technique
If the data contains signals, the distribution of the data will be skewed to one side. To the right if the indicator is upward going, and to the left if it is downward going. The side of the distribution away from the direction the indicator moves in must be pure noise, with no contamination from the signal we are looking for. That half of the distribution is then flipped about the mean to replace the half that is a mix of noise and signals, giving a good estimation of how the distribution of the data would look if there were no signals present in it. The standard deviation of this “flipped” distribution is then taken to be the standard deviation of the noise.
Third attempt
Occasionally, attempt 2 also fails, possibly due to movement or lots of hyperpolarizing activity, and the standard deviation of the flipped distribution is greater than the standard deviation of the data itself, which again does not make sense. This happens very rarely, but in this case the standard deviation of the background is simply assigned the value of the standard deviation of the entire data vector. This will have the effect of giving too many false negatives, but it has the advantage of giving fewer false positives as well, so represents a conservative estimate of spike probability.
Note that how the background noise is chosen will effect the numbers in the log likelihood vector. Smaller background noise values will result in larger log likelihood values, and vice versa. This is because that as the noise distribution gets narrower via a smaller standard deviation, the probability that the same data point came from the noise distribution shrinks.
The code was written such that if there are more than 9 templates, the standard deviation of the templates themselves are taken, as described previously, to be the standard deviation of the templates at each time bin in the template vector. If there are less than 10 templates, the std of the templates is assumed to be the same as the noise, and only the mean changes (the mean template trace is still taken, each time bin just has the same std which is the same as the noise).
Author Contributions
Library design, construction, and screening were done by L.P., M.C., D.S., and S.W.E. with supervision by M.Z.L. Patch-clamping of cultured cells was done by M.C., D.S., D.J., and G.Z. with supervision by M.Z.L. Molecular modeling was done by S.C.VK., and C.-M.S. with supervision by R.O.D. Brightness measurements of cultured cells was done by D.S. with supervision by G.B. and M.Z.L. The in vitro photobleaching was done by S.L. and S.W.E. with supervision by M.Z.L. The in vivo hippocampal voltage waveforms were obtained by A.N. with supervision by A.L. Fly experiments were performed by M.M.P. and S.S. with supervision by T.R.C. Some AAV packaging was performed by Y.S. with supervision by S.W. Striatal acute slice brightness measurements were done by S.W.E. with supervision by M.Z.L. and J.D. Hippocampal acute slice electrophysiology and imaging was done by F.J.H. and S.W.E. with supervision by J.D., and by A.R. with supervision by C.D.M. The in vivo 1-P hippocampal interneuron imaging was done by B.M. and J.T. with supervision by P.G. The spike detection method was developed by S.W.E. The in vivo 2-P cortical neuron imaging and analysis was done by J.L.F. with supervision by N.J. The in vivo 2-P hippocampal place cell imaging was done by M.P. with supervision by L.M.G. The spike detection protocol was developed by S.W.E. Additional data analyses and manuscript preparation was done by S.W.E. and M.Z.L. All authors reviewed the manuscript.
Funding Sources
NIH grants 1R01MH124047, 1R01MH124867, 1U19NS104590, and 1U01NS115530 (A.L. and A.N.); NIH grant UF1NS107696 (N.J. and J.L.F.); NIH grant R00NS104215 (C.D.M.); NIH grant R01NS116589 (P.G); Office of Naval Research grant N00141812690, Simons Foundation grant SCGB 542987SPI, and the James S McDonnell Foundation (M.H.P. and L.M.G.); the Vallee Foundation (L.M.G.); NDSEG Fellowship Program (M.M.P.); NIH grant R01EY022638 (M.M.P., S.S., and T.R.C.); Post-9/11 GI Bill and NIH grant 5T32MH020016 (S.W.E.); Human Frontier Science Program Long-term Fellowship LT000916/2018-L (C.-M.S.); Stanford University Wu Tsai Neurosciences Institute Seed Grant 133808 (R.D. and M.Z.L.); and NIH grants 5U01NS10346403 (M.Z.L.) and 1RF1MH11410501 (T.R.C., J.D., and M.Z.L.).
Competing interests
M.Z.L. is an inventor on a patent for the ASAP1 voltage indicator. Other authors declare that they have no competing interests.
Acknowledgements
We thank Dario Ringach (Neurolabware) for help with firmware changes to the 2-P microscope used for in vivo hippocampal imaging in the Giocomo lab. We thank Helen Yang and Marjorie Xie for the stimulus generation and data analysis code used in the Clandinin lab. We thank Celina Yang and Max Melin for mouse surgical preparations for 1-P hippocampal imaging in the Golshani Lab. We also thank the Stanford viral vector core for AAV packaging.