Strange IndiaStrange India


All surgical and experimental procedures were conducted in accordance with protocols approved by the Institutional Animal Care and Use Committee (IACUC) and Institutional Biosafety Committee (IBC) of Janelia Research Campus (all work but the cerebellum), and of the IACUC and IBC at Princeton University (cerebellum work).

Sensor design

We surveyed the Protein Data Bank (PDB) for unique structures of CaM in complex with a single peptide. Twenty-nine peptides were sufficiently different from the RS20 peptide sequence used in previous GCaMPs to warrant testing (Extended Data Table 1). The structures of these complexes were superimposed on the GCaMP2 structure (PDB ID: 3EK4) in PyMOL, and amino acids were added or removed to bring all peptides to a length estimated to work well in the GCaMP topology. Synthetic DNA encoding each of the 29 peptides replaced the RS20 peptide in the bacterial expression vector pRSET-A-GCaMP6s. Of the initial sensors, 20 of the 29 sensed calcium. All 20 had lower saturating fluorescence change than GCaMP6s, all but three had weaker Ca2+ affinity (apparent Kd) than GCaMP6s, all but one had lower cooperativity (Hill coefficient (n)), and many were dimmer (Extended Data Table 1). Several sensor variants showed much faster Ca2+ decay kinetics, as determined by stopped-flow fluorescence on purified protein (Extended Data Table 3). On the basis of fast kinetics, saturating fluorescence change, apparent Kd, Hill coefficient and apparent brightness, we prioritized variants based on the peptides from endothelial nitric oxide synthase (PDB ID: 1NIW; peptide ‘ENOSP’) and death-associated protein kinase 1 (PDB ID: 1YR5; peptide ‘DAPKP’) for optimization (Extended Data Table 3).

Sensor optimization

These two sensor scaffolds were optimized in protein purified from Escherichia coli expression. Libraries were constructed to mutate the linker (linker 1) connecting the peptide to circularly permuted GFP (cpGFP)4,44 and screened for high signal change and retained fast kinetics. The linker connecting cpGFP and CaM (linker 2) was similarly mutated on top of variants from the optimization of linker 1. Out of 4,000 ENOSP-based variants and 1,600 DAPKP-based variants, 23 and 10, respectively, had fast kinetics and high saturating fluorescence change in purified protein (data not shown).

Guided by the structure of jGCaMP8.410.80, we targeted 16 interface positions for site-saturation mutagenesis: 7 in ENOSP, 4 on cpGFP and 5 on CaM (Extended Data Fig. 1). Sensor variants were tested in cultured neurons for higher sensitivity in detecting neural activity while maintaining fast kinetics. Several single mutations improved properties (Supplementary Table 1), particularly residues near the ENOSP C terminus and the cpGFP–CaM interface. Beneficial point mutations were combined in subsequent rounds of screening. Ten additional CaM positions (Extended Data Fig. 1) surrounding ENOSP were next subjected to site-saturation mutagenesis. Finally, mutations (Extended Data Fig. 1) from the FGCaMP sensor (developed using CaM and RS20-like peptide sequences from the fungus Aspergillus niger and the yeast Komagataella pastoris)45,46 were introduced to improve biorthogonality and/or kinetics.

Sensor screen and characterization in solution

Cloning, expression and purification of sensor variants in E. coli, calcium titrations, pH titrations, kinetic assay and photophysical analysis were performed as previously described4,47.

In this study, the RSET tag (His6 tag-Xpress epitope-enterokinase cleavage site), which had been carried over from the pRSET-A cloning vector in earlier work3,4,5,48, was removed from all sensors; constructs instead encode a hexa-histidine affinity tag, Met-His6 tag–peptide–linker 1–cpGFP–linker 2–CaM. For the screen of linkers replacing RS20 (sometimes referred to as ‘M13’), libraries of sensors in the pRSET-A bacterial expression vector were generated using primers containing degenerate codons (NNS) with Q5 site-directed mutagenesis (New England BioLabs) and transformed into T7 Express-competent cells (New England BioLabs). A sequence encoding six repeats of the Gly-Gly-Ser tripeptide was designed as a highly flexible, presumably non-CaM-binding negative control. We expressed the new variants, as well as the presumptive Gly-Gly-Ser negative control and GCaMP6s as a positive control, in E. coli T7 Express. Single colonies were picked and grown in 800 µl ZYM-5052 autoinduction medium containing 100 µg ml−1 ampicillin in 96-deep-well blocks for 48 h at 30 °C. Cells were collected by centrifugation, frozen, thawed and lysed. Clarified lysate was used to estimate the dynamic range by measuring fluorescence in the presence of 1 mM Ca2+ or 1 mM EGTA.

For protein purification, T7 Express cells containing sensors were grown at 30 °C for 48 h in ZYM-5052 autoinduction medium with 100 µg ml−1 ampicillin. Collected cells were lysed in 1/50 volume of B-PER (Thermo Fisher) with 1 mg ml−1 lysozyme and 20 U ml−1 Pierce Universal Nuclease (Thermo Fisher) and subsequently centrifuged. Supernatants were applied to HisPur Cobalt Resin (Thermo Fisher). The resin was washed with 20 column volumes of 20 mM Tris, pH 8.0, 300 mM NaCl and 1 mM imidazole, followed by 10 column volumes of 20 mM Tris, pH 8.0, 500 mM NaCl and 5 mM imidazole. Proteins were eluted into 20 mM Tris, pH 8.0, 100 mM NaCl and 100 mM imidazole.

For calcium titrations, sensors were diluted 1:100 in duplicate into 30 mM MOPS, pH 7.2, 100 mM KCl containing either 10 mM CaEGTA (39 µM free calcium) or 10 mM EGTA (0 µM free calcium). As before, these two solutions were mixed in different amounts to give 11 different free calcium concentrations. GCaMP fluorescence (485-nm excitation, 5-nm bandpass; 510-nm emission, 5-nm bandpass) was measured in a Tecan Safire2 plate reader (Tecan). The data were fit with a sigmoidal function using KaleidaGraph (Synergy Software) to extract the apparent Kd for Ca2+, the Hill coefficient and the saturating fluorescence change.

The half-decay time of fluorescence after calcium removal (t1/2,decay) was determined at room temperature using a stopped-flow device coupled to a fluorimeter (Applied Photophysics). Each sensor variant in 1 µM Ca2+ in 30 mM MOPS, pH 7.2, and 100 mM KCl was rapidly mixed with 10 mM EGTA in 30 mM MOPS, pH 7.2, and 100 mM KCl. Fluorescence decay data were fit with a single or double exponential decay function.

For pH titrations, purified proteins were diluted into pH buffers containing 50 mM citrate, 50 mM Tris, 50 mM glycine, 100 mM NaCl and either 2 mM CaCl2 or 2 mM EGTA, which were pre-adjusted to 24 different pH values between 4.5 and 10.5 with NaOH. A sigmoidal function was used to fit fluorescence versus pH, and the pKa value was determined from the midpoint.

Sequence and structural analysis of variants

Linker1 encodes Leu-Glu in GCaMP6s- and indeed, in all previous RS20-based GCaMP sensors. This linker was extensively mutated in the GCaMP5 screen4 but the best variant, GCaMP5G, retained Leu-Glu; we first mutated Leu-Glu to fully degenerate 2-amino acid (aa) sequences and screened for variants with both high signal change and retained fast kinetics. Following selection of the best 2-aa linkers, these variants were expanded to libraries of 3-aa linkers by addition of fully degenerate codons. After optimization of linker 1, linker 2 was mutated from Leu-Pro, to which it had been selected in GCaMP5G28, the parent of GCaMP6 and GCaMP7. Mutagenesis of linker 2 was similar to that for linker 1, but alternative linker 2 sequences either slowed kinetics or decreased ΔF/F0, and linker 2 was thus retained as Leu-Pro.

In addition to jGCaMP8f, jGCaMP8m and jGCaMP8s, several other variants may be of interest, including 455, 543, 640, 707 and 712 (Supplementary Table 1). All promising variants contain, in addition to the Leu-Lys-Ile linker 1, additional mutations to the ENOSP peptide: Asn19Thr and Ser24Ile appear in every variant except 712, Ser26Arg appears in every variant but jGCaMP8s (with Ser26Met), jGCaMP8m has Ala25Gly, and 712 has Met28Ser. Every variant contains the Gln88Glu mutation at the CaM–GFP interface. Further mutations include Phe286Tyr (jGCaMP8s, jGCaMP8m and 707); Glu288Gln (707); Gln315Leu (jGCaMP8f), Gln315His (jGCaMP8s and 707), Gln315Lys (455); Met346Gln (543); and Met419Ser (640). Of these, Phe286Tyr comes from the FGCaMP sensor; all others are unique to this work. GCaMP6s data from both purified protein and cultured neurons are essentially identical between this work (lacking the RSET tag) and previous work (with the RSET tag) (data not shown), implying that the RSET tag does not noticeably modulate GCaMP function in protein and neuronal culture and that observed jGCaMP8 improvements stem from the peptide substitution and other mutations.

Photophysical measurements

All measurements were performed in 39 μM free calcium (+Ca) buffer (30 mM MOPS, 10 mM CaEGTA in 100 mM KCl, pH 7.2) or 0 μM free calcium (−Ca) buffer (30 mM MOPS, 10 mM EGTA in 100 mM KCl, pH 7.2). Absorbance measurements were performed using a UV–Vis spectrometer (Cary 100, Agilent technologies), and fluorescence excitation–emission spectra were measured using a spectrofluorometer (Cary Eclipse, Varian). ΔF/F0 was calculated from the fluorescence emission spectra of the proteins in +Ca and −Ca buffer. Quantum yield for +Ca solutions was measured using a spectrometer with an integrating sphere (Quantaurus, Hamamatsu); for −Ca, a relative method was applied using jGCaMP7f (quantum yield of 0.60) as a reference. Extinction coefficients were determined via the alkali denaturation method, using the extinction coefficient of denatured eGFP as a reference (ε = 44,000 M−1 cm−1 at 447 nm).

Photobleaching measurements

Solutions of 2–4 μM protein were prepared in 30 mM MOPS, pH 7.2 (+Ca and –Ca buffer) with 0.1% BSA added. A sample of these solutions was added to 1-octanol in a 1:9 ratio, and this mixture was vortexed briefly. The resulting emulsion was placed on a pre-silanized glass microscopy slide and fitted with a coverslip. Fluorophore bleaching was accomplished by illuminating a microdroplet using an upright microscope (Zeiss Axio Observer Z2) and a ×20, NA 0.8 objective. Light illumination was obtained using a 488-nm (Sapphire 488, Coherent) laser excitation at 11.45-mW power (intensity = 14.0 W cm2), and the emission was collected using a 525BP50 filter. Fluorescence was detected by a fibre-coupled avalanche photodiode (SPQM-AQRH14, Pacer). Obtained bleaching profiles were fit using a double-exponential fitting function in MATLAB to calculate their respective time constants (τbleach).

For quantitative comparison of photobleaching for fluorophores, the bleaching probability (Pb) needs to be computed as referenced in ref. 49. To quantify Pb for each fluorophore, their respective excitation rate (W) was obtained. The excitation rate W for a laser source can be calculated as a product of extinction coefficient (ε (λ) in M−1 cm−1) and intensity (I (λ) in W cm2) for the discrete excitation wavelength (λ, in nm) as shown in the equation (1):

$$W=0\,.\,0192\phantom{\rule{ 0.25em}{0ex}}\varepsilon \,I\,\lambda $$

(1)

Photobleaching is further characterized by the number of photons (Np) emitted before photobleaching, which is the product of fluorescence quantum yield (ϕf), excitation rate (W) and photobleaching time constant (τbleach) as shown in the equation (2):

$${N}_{p}={\varphi }_{f}\,W\,{\tau }_{{\rm{bleach}}}$$

(2)

In a rate equation model for bleaching proceeding from singlet or triplet states, the photobleaching probability Pb is inversely related to the total number of fluorescent photons emitted by \({N}_{p}={\varphi }_{f}/{P}_{b}\). Using equation (2), this can be expressed as:

$${P}_{b}=1/W\,{\tau }_{{\rm{bleach}}}$$

(3)

The photobleaching probability Pb is the most rigorous, as it is independent of the fluorescence quantum yield. The calculated Pb values for the proteins are presented in Extended Data Table 3.

Two-photon spectroscopy

The two-photon excitation spectra were performed as previously described1. Protein solutions of 1–5 μM concentration in +Ca or −Ca buffer were prepared and measured using an inverted microscope (IX81, Olympus) equipped with a ×60, 1.2 NA water immersion objective (Olympus). Two-photon excitation was obtained using an 80 MHz Ti-Sapphire laser (Chameleon Ultra II, Coherent) with sufficient power from 710 nm to 1,080 nm. Fluorescence collected by the objective was passed through a short-pass filter (720SP, Semrock) and a bandpass filter (550BP200, Semrock) and detected by a fibre-coupled avalanche photodiode (SPCM_AQRH-14, Perkin Elmer). The obtained two-photon excitation spectra were normalized to 1 μM concentration and subsequently used to obtain the action cross-section spectra with fluorescein as a reference (average action cross-section spectra from refs. 50,51).

Fluorescence correlation spectroscopy was used to obtain the two-photon molecular brightness of the protein molecule. The peak molecular brightness was defined by the rate of fluorescence obtained per total number of emitting molecules. Protein solutions (50–100 nM) were prepared in +Ca buffer and excited with 930-nm light at powers ranging from 2 mW to 30 mW for 200 s. The obtained fluorescence emission was collected by an avalanche photodiode and fed to an autocorrelator (Flex03LQ, Correlator.com). The obtained autocorrelation curve was fit to a diffusion model through a built-in MATLAB function52 to determine the number of molecules <n> present in the focal volume. The two-photon molecular brightness (ε) at each laser power was calculated as the average rate of fluorescence <F> per emitting molecule <n>, defined as ε = <F>/<n> in kilocounts per second per molecule. As a function of laser power, the molecular brightness initially increases with increasing laser power, then levels off and decreases due to photobleaching or saturation of the protein chromophore in the excitation volume. The maximum or peak brightness achieved, <εmax>, represents a proxy for the photostability of a fluorophore.

Screening in neuronal cell culture

GCaMP variants were cloned into an hSyn1-GCaMP-NLS-mCherry-WPRE expression vector, and XCaMP variants (XCaMP-G, XCaMP-Gf and XCaMP-Gf0) were cloned into the same expression vector with the nuclear export sequence that was attached to the XCaMP sensors in the original publication8. As this excludes the XCaMP sensors from the nucleus, where Ca2+ signals are slower53, whereas the variants developed here were not explicitly excluded (although GCaMPs without an explicit nuclear export sequence are nevertheless fairly nuclearly excluded), this will make the XCaMPs appear faster than they really are than the GCaMP indicators.

The primary rat culture procedure was performed as previously described6. In brief, neonatal rat pups (Charles River Laboratory) were euthanized, and neocortices were dissociated and processed to form a cell pellet. Cells were resuspended and transfected by combining 5 × 105 viable cells with 400 ng plasmid DNA and nucleofection solution in a 25-µl electroporation cuvette (Lonza). Electroporation of GCaMP mutants was performed according to the manufacturer’s protocol.

Neurons were plated onto poly-d-lysine (PDL)-coated, 96-well, glass-bottom plates (MatTek) at approximately 1 × 105 cells per well in 100 µl of a 4:1 mixture of NbActiv4 (BrainBits) and plating medium (28 mM glucose, 2.4 mM NaHCO3, 100 µg ml−1 transferrin, 25 µg ml−1 insulin, 2 mM l-glutamine, 100 U ml−1 penicillin, 10 µg ml−1 streptomycin and 10% FBS in MEM). Typically, each plate included GCaMP6s (eight wells), GCaMP6f (eight wells) and jGCaMP7f (eight wells). Other wells were electroporated with mutated variants (four wells per variant), for a total of 80 wells (the first and last columns in the plate were not used to reduce edge effects). Plates were left in the incubator at 37 °C and 5% CO2. The next day, 190 μl of NbActiv4 medium was added to each well.

On 12–15 days in vitro (DIV), neurons were rinsed three times with imaging buffer containing 140 mM NaCl, 0.2 mM KCl, 10 mM HEPES and 30 mM glucose (pH 7.3–7.4) and left in a solution containing imaging buffer with added receptor blockers (10 μM CNQX, 10 μM (R)-CPP, 10 μM gabazine and 1 mM (S)-MCPG; Tocris) to reduce spontaneous activity; neurons then underwent field stimulation and imaging6,24. Fluorescence timelapse images (200 Hz; total of 7 s) were collected on an Olympus IX81 microscope using a ×10, 0.4 NA objective (UPlanSApo, Olympus) and an ET-GFP filter cube (#49002, Chroma). A 470-nm LED (Cairn Research) was used for excitation (intensity at the image plane of 0.34 mW mm2). Images were collected using an EMCCD camera (Ixon Ultra DU897, Andor) with 4 × 4 binning, corresponding to a 0.8 mm × 0.8 mm FOV. Reference images (100-ms exposure) were used to perform segmentation. Red illumination for variants co-expressing mCherry was performed with a 590-nm LED (Cairn Research) through an ET-mCherry filter cube (#49008, Chroma) with an intensity of 0.03 mW mm2. Trains of 1, 3, 10 and 160 field stimuli were delivered with a custom stimulation electrode. For sensor linearity measurements, 1, 2, 3, 5, 10 and 40 field stimuli were delivered. All measurements were performed at room temperature, which contributed to slower kinetics than that reported in vivo (34 °C).

The responses of individual variants were analysed as previously described5,6. The Ilastik toolkit54 was used to segment cell bodies in the reference images. Wells with fewer than five detected neurons, and wells with poor neuronal proliferation, were discarded (labelled as ‘failed segmentation’ in Supplementary Table 1). Plates with more than four failed control (GCaMP6s) wells were discarded and re-screened.

When calculating ΔF/F0 (defined as (Fpeak – F0)/F0), Fpeak was taken from the single frame with the highest fluorescence intensity post-stimulus, and F0 was the average intensity of ten frames preceding the stimulus. d′ was calculated as follows:

$${d}^{{\prime} }=\frac{{\bar{F}}_{{\rm{top}}}-{\bar{F}}_{{\rm{bottom}}}}{\sqrt{\frac{1}{2}({\sigma }^{2}({F}_{{\rm{top}}})+{\sigma }^{2}({F}_{{\rm{bottom}}}))}}$$

where Ftop and Fbottom are peak and baseline fluorescence traces, respectively, six frames in duration.

As the fluorescent signal was sampled at 200 Hz, fast rise times (less than 10 ms) could not be reliably computed for single trials. Thus, to compute half-rise time (t1/2,rise), we found the two frames having fluorescence intensities below and above Fpeak/2, linearly interpolated the trace between them, and computed the timepoint at which the fluorescence would have crossed the Fpeak/2 threshold. Using this technique and averaging across hundreds of neurons for each variant allowed us to approximate (t1/2,rise) with higher resolution than the sampling interval.

Median values from each well were reported to quantify performance. Each observation was normalized to the median GCaMP6s value from the same experimental batch. Baseline brightness for constructs co-expressing mCherry was calculated by dividing the GFP cellular fluorescence in the beginning of the 3AP stimulation epoch by the mCherry cellular fluorescence (for a ratiometric measurement). For comparison with XCaMP variants (Extended Data Fig. 4a), no mCherry normalization was performed, but all baseline brightness values were still normalized to GCaMP6s in the same transfection week. To determine significant differences in observations between constructs, a two-tailed Mann–Whitney U-test was performed between constructs and controls (GCaMP6s or jGCaMP7f). A median ΔF/F0 trace was computed across all detected cell bodies in a well for each stimulus. Photobleaching was corrected in the 1AP recordings by fitting a double exponential to the beginning and end segments of the fluorescence trace.

Finally, data were filtered according to three criteria to remove variants without detectable response to 1AP. We filtered out variants (1) with t1/2,rise < 0.1× or > 4× of GCaMP6s, (2) with time-to-peak >3× of GCaMP6s, and (3) with t1/2,decay < 0.01× of GCaMP6s, as these represented inaccurate fits to non-responsive fluorescence traces (labelled as ‘no detectable response’ in Supplementary Table 1).

To evaluate the baseline fluorescence of the jGCaMP8 series compared with jGCaMP7f and the XCaMP series, all constructs were transfected side-by-side (2 consecutive transfection weeks, five 96-well plates). To minimize possible plate-to-plate variability within each transfected batch, the baseline fluorescence of each construct was normalized to in-plate GCaMP6s.

We have implemented several improvements to the neuronal culture screening rig over the years (Supplementary Table 4). These improvements to the rig result in slight changes in values of ΔF/F0 and other parameters for our control GECIs (for example, GCaMP6 and jGCaMP7) compared with in our original publications. Note that at all times, we compared variants to reference sensors in an apples-to-apples comparison, using data obtained from in-plate controls.

All of the parameters measured in our screen can be examined as an interactive scatterplot in a Binder notebook (https://mybinder.org/v2/gh/ilyakolb/jGCaMP8-neuron-culture-screen/HEAD?labpath=interactive-multiparameter-screening-plot.ipynb). The data are also collated in Microsoft Excel in Supplementary Table 1.

Fluorescence recovery after photobleaching

Fluorescence recovery after photobleaching experiments were carried out on a Nikon Ti-E inverted microscope outfitted with a Yokogowa CSU-X1 spinning disk and an Andor DU-897 EMCCD camera. Fluorescence excitation was carried out using a solid-state laser line at 488 nm, and emission was collected with a ×100 1.49 NA objective (Nikon Instruments) through a standard GFP filter set. Photobleaching was performed using a Bruker Mini-Scanner by focusing a 405-nm laser to a single, diffraction-limited spot for 100 ms. Cultured neurons plated in 35-mm glass-bottom dishes (MatTek) were immersed in regular imaging buffer with the addition of synaptic blockers (same as used for neuronal culture field stimulation) and 1 µM TTX to block AP generation. In a subset of experiments, the buffer was supplemented with 5 µM ionomycin. Bleaching spots were chosen to be on the soma of the neuron but distant from the nucleus. A spot was photobleached ten times (0.1 Hz) as the cell was concurrently imaged at 25 or 50 frames per second.

For analysis, pixels within a 1.5-µm radius around the bleach spot were averaged in each frame. The resulting fluorescence trace was normalized to the mean fluorescence of an identically sized spot on the opposite side of the soma, outside the nucleus. The trace was then split into ten epochs (each corresponding to a bleaching event) and the fluorescence fi (t) of each epoch i was normalized by dividing by the fluorescence value immediately preceding the bleaching pulse (\({f}_{i}\left({t}_{{\rm{pre}}}\right)\)) as follows:

$${\bar{f}}_{i}(t)=\frac{{f}_{i}(t)}{{f}_{i}({t}_{{\rm{pre}}})}$$

The resistant fraction (RF) was calculated as follows:

$${\rm{R}}{\rm{F}}\,({\rm{ \% }})=100\left(1-{\bar{f}}_{1}({t}_{\text{fin}})-\frac{1}{9}\mathop{\sum }\limits_{i=2}^{10}(1-{\bar{f}}_{i}({t}_{\text{fin}}))\right)$$

where \({\bar{f}}_{i}({t}_{\text{fin}})\) is the final fluorescence value at the end of epoch i, and the final term in the equation is the averaged fluorescence loss of all epochs after the first. This term is subtracted to account for the overall fluorescence loss with each bleaching pulse.

Crystal structure determination

All GCaMP samples for crystallization were kept in 20 mM Tris, 150 mM NaCl, pH 8.0, and 2 mM CaCl2. All crystallization trials were carried out at 22 °C with the hanging-drop vapour diffusion method. Commercial sparse-matrix screening solutions (Hampton Research) were used in initial screens. Of the protein solution, 1 µl was mixed with 1 µl of reservoir solution and equilibrated against 250 µl of reservoir solution. Diffraction data were collected at beamline 8.2.1 at the Berkeley Center for Structural Biology and processed with XDS55. The phase was determined by molecular replacement using MOLREP, and the structure of GCaMP2 (PDB ID: 3EK4)56 without the RS20 peptide as the starting model. Refinement was performed using REFMAC57 followed by manual remodelling with Coot58. Details of the crystallographic analysis and statistics are presented in Extended Data Table 2. The crystal structure has been released on the PDB website (rcsb.org), entry 7ST4. wwPDB validation scores are excellent (https://files.rcsb.org/pub/pdb/validation_reports/st/7st4/7st4_full_validation.pdf).

Adult Drosophila L2 assay

GECIs were tested by crossing males carrying the variant to a w+;53G02-Gal4AD (in attP40);29G11-Gal4DBD (in attP2) females59. Heterozygous flies were used in our experiments. Sensor cDNAs were codon-optimized for Drosophila. Flies were raised at 21 °C on standard cornmeal molasses medium.

Three to five days after eclosure, females were anaesthetized on ice. After transferring to a thermoelectric plate (4 °C), legs were removed, and then facing down, the head was glued into a custom-made pyramid using UV-cured glue. The proboscis was pressed in and fixed using UV-cured glue. After adding saline (103 mM NaCl, 3 mM KCl, 1 mM NaH2PO4, 5 mM TES, 26 mM NaHCO3, 4 mM MgCl2, 2.5 mM CaCl2, 10 mM trehalose and 10 mM glucose, pH 7.4, 270–275 mOsm) to the posterior side of the head, the cuticle was cut away above the right side, creating a window above the target neurons. Tracheae and fat were removed, and muscles M1 and M6 were cut to minimize head movement.

Two-photon imaging took place under a ×40 0.8 NA water-immersion objective (Olympus) on a laser-scanning microscope (BrukerNano) with GaAsP photomultiplier tubes. Laser power at 920 nm was kept constant at 8 mW using a Pockels cell. No bleaching was evident at this laser intensity. The emission dichroic was 580 nm and emission filters 511/20–25 nm. Images were 32 × 128 pixels with a frame rate at 372 Hz.

A MATLAB script drove the visual stimulation via a digital micromirror device (DMD, LightCrafter) at 0.125 Hz onto a screen covering the visual field in front of the right eye. A blue LED (M470L3, Thorlabs) emitting through a 474/23–25-nm bandpass filter (to keep blue light from contaminating the green imaging channel) provided illumination.

Light dimming produced a stereotypical calcium increase in L2 neurons27. Intensity measurements were taken in medulla layer 2 (Fig. 2a). A target region image was chosen by testing each focal layer with 0.5-Hz full-field visual stimulation until a layer with maximum ΔF/F0 was identified. Then, 2–3 columns producing a maximum response were identified within this layer. In addition to the region of interest (ROI) containing these L2 columns, a background ROI was selected where no fluorescence was evident. The mean background intensity was subtracted from the mean L2 ROI. Imaging then targeted this region over a protocol involving multiple tests, as shown in Supplementary Table 3.

Image analysis was performed using custom Python scripts. In the ΔF/F0 calculation, baseline F0 included the last 20% of images taken at the end of the light period. Stimulus onset is the light-to-dark transition. Change in fluorescence ΔF is the intensity minus baseline. ΔF/F0 is ΔF divided by baseline. The final signal is processed through a Gaussian filter (σ = 3). Discriminability index (d′) values were calculated the same as in mouse imaging (see below).

Imaging in the Drosophila larval neuromuscular junction

We made 20XUAS-IVS-Syn21-op1-GECI-p10 in VK00005 transgenic flies60 and crossed them with 10XUAS-IVS-myr::tdTomato in su(Hw)attP8 × R57C10-Gal4 at VK00020; R57C10-Gal4 at VK00040 double-insertion pan-neuronal driver line. Heterozygous flies were used in our experiments. Sensor cDNAs were codon-optimized for Drosophila. The neuromuscular junction (NMJ) assay is as in our previous study10. In brief, female third instar larvae were dissected in chilled (4 °C) Schneider’s insect medium (Sigma) to fully expose the body wall muscles. Segment nerves were severed in proximity to the ventral nerve cord. Dissection medium was then replaced with room temperature HL-6 saline in which 2 mM CaCl2 and 7 mM l-glutamate were added to induce tetany, freezing the muscles in place. A mercury lamp (X-CITE exacte) light source was used for excitation, and out-of-objective power was kept less than 5 mW to reduce bleaching. Type Ib boutons on muscle 13 from segment A3–A5 were imaged while the corresponding hemi-segment nerve was stimulated with square voltage pulses (4 V, pulse width of 0.3 ms, duration of 2 s and frequency of 1–160 Hz) through a suction electrode driven by a customized stimulator. Bath temperature and pH were continuously monitored with a thermometer and pH metre, respectively, and recorded throughout the experiment. The filters for imaging were as follows: excitation of centre wavelength (CWL) = 472 nm and bandwidth (BW) = 30 nm, dichroic of 495 nm, and emission of CWL = 520 nm and BW = 35 nm. Images were captured with an EMCCD (Andor iXon 897) at 128.5 frames per second and acquired with Metamorph software. ROIs around boutons were manually drawn, and data were analysed with a custom Python script. Discriminability index values were calculated the same as in mouse imaging.

NMJ immunofluorescence

Variants were crossed to a pan-neuronal driver line, also containing tdTomato (pJFRC22-10XUAS-IVS-myr::tdTomato in su(Hw)attP8;; R57C10 at VK00020, R57C10 at VK00040). Third instar larvae were filleted and fixed following standard techniques61. Primary chicken anti-GFP (1:1,000; A10262, Thermo Fisher) and secondary goat anti-chicken AlexaFluor Plus 488 (1:800; A32931, Thermo Fisher) were used to stain GECIs. Primary rabbit anti-RFP (1:1,000; 632496, Clontech) and secondary goat anti-rabbit Cy3 (1:1,000; 111-165-144, Jackson) labelled tdTomato.

MBON-γ2α′1 immunofluorescence

Variants were co-expressed with membrane-localized myr::tdTomato using the MB077B driver. Adults 3–6 days old were harvested, brains dissected and fixed using standard techniques. GCaMP variants were directly labelled with rabbit anti-GFP (1:500; AlexaFluor 488; A-21311, Molecular Probes). Primary rat anti-RFP (1:500; mAb 5F8, Chromotek) and secondary goat anti-rat Cy3 (1:1,000; 112-165-167, Jackson) labelled tdTomato.

Immunofluorescence quantification

ROIs were drawn on targeted regions using custom Python scripts. Within each ROI, otsu-thresholding was used to identify regions expressing myr::tdTomato. Intensity measurements were then taken for both the variant and tdTomato within these regions. The ratio is the intensity from the green channel (variant staining) divided by the intensity from the red channel (myr::tdTomato staining).

Western blot

Protein was extracted from female brains with the same genotype used in the NMJ immunostaining. Western blots were performed following standard techniques. Each variant was stained using primary rabbit anti-GFP (PC408, Millipore Sigma) and secondary goat anti-rabbit IgG conjugated to horseradish peroxidase (HRP; 31460, Thermo Fisher/Invitrogen). Actin was stained using mouse IgM anti-α-actin (1:5,000; MA1-744, Thermo Fisher/Invitrogen) and goat anti-mouse IgG and IgM-HRP (1:5,000; 31430 and 62-6820, respectively, Thermo Fisher/Invitrogen). Signal was formed using SuperSignal West Dura luminescence and was imaged on a Bio-Rad Gel imager. Band intensity was measured using Fiji62. Band intensity from the variant was divided by band intensity from the actin band to determine the ratio.

Mouse work

All mice were cared for in compliance with the Guide for the Care and Use of Laboratory Animals. All experiments at Janelia were approved by the Janelia Research Campus IACUC and IBC committees. Janelia is an AAALAC-accredited institution. Mice were maintained under specific pathogen-free conditions. Mice were housed on a free-standing, individually ventilated (approximately 60 air changes hourly) rack (Allentown). The holding room was ventilated with 100% outside filtered air with 15–20 air changes hourly. Each ventilated cage (Allentown) was provided with corncob bedding (Shepard Specialty Papers), at least 8 g of nesting material (Bed-r’Nest, The Andersons) and red Mouse Tunnel (Bio-Serv). Mice were maintained on a 12:12-h light:dark cycle. The holding room temperature was maintained at 68–72 °F with a relative humidity of 30–70%. Irradiated rodent laboratory chow (LabDiet 5053) was provided ad libitum.

At Princeton, experimental procedures were approved by the Princeton University IACUC (protocol 3080-16) and performed in accordance with the animal welfare guidelines of the US National Institutes of Health. All mice were housed under a 12:12-h regular light cycle for breeding and transferred to reverse light-cycle conditions with 12:12-h reverse light:dark cycle facility, and experiments were performed during the dark cycle. At least 1 week before the experimental days, mice were housed in darkness in an enrichment box containing bedding, houses and wheels (Bio-Serv Fast-Trac K3250/K3251). At other times, mice were housed in cages in the animal facility in groups of 2–4 mice per cage. Mice were maintained at 68–72 °F with a relative humidity of 30–70%.

Mouse surgeries for cortical imaging

Young adult (postnatal day 50–214) male C57BL/6J (Jackson Labs) mice were anaesthetized using isoflurane (2.5% for induction and 1.5% during surgery). A circular craniotomy (diameter of 3 mm) was made above V1 (centred 2.5 mm left and 0.5 mm anterior to the Lambda suture). Viral suspension (30 nl) was injected in 4–5 locations on a 500-μm grid, 300–400 μm deep. Constructs included: AAV2/1-hSynapsin-1-jGCaMP8 constructs (pGP-AAV-syn1-jGCaMP8f-WPRE, Addgene plasmid #162376, 4 × 1012 GC per millilitre titre; pGP-AAV-syn1-jGCaMP8m-WPRE, Addgene plasmid #162375, 2.2 × 1012 GC per millilitre titre; pGP-AAV-syn1-jGCaMP8s-WPRE, Addgene plasmid #162374, 2.1 × 1012 GC per millilitre titre). A 3-mm diameter circular coverslip glued to a donut-shaped 3.5-mm diameter coverslip (no. 1 thickness, Warner Instruments) was cemented to the craniotomy using black dental cement (Contemporary Ortho-Jet). A custom titanium head post was cemented to the skull. An additional surgery was performed for loose-seal recordings. Eighteen to eighty days after the virus injection, the mouse was anaesthetized with a mixture of ketamine–xylazine (0.1 mg ketamine and 0.008 mg xylazine per gram body weight), and we surgically removed the cranial window and performed durotomy63. The craniotomy was filled with 10–15 μl of 1.5% agarose, then a D-shaped coverslip was secured on top to suppress brain motion and leave access to the brain on the lateral side of the craniotomy.

Two-photon imaging in mouse cortex

Mice were kept on a warm blanket (37 °C) and anaesthetized using 0.5% isoflurane and sedated with chlorprothixene (20–30 μl at 0.33 mg ml−1, intramuscular). Imaging was performed with a custom-built two-photon microscope with a resonant scanner. The light source was an Insight femtosecond-pulse laser (Spectra-Physics) running at 940 nm. The objective was a ×16 water immersion lens with 0.8 numerical aperture (Nikon). The detection path consisted of a custom filter set (525/50 nm (functional channel), 600/60 nm (cell-targeting channel) and a 565-nm dichroic mirror) ending in a pair of GaAsP photomultiplier tubes (Hamamatsu). Images were acquired using ScanImage (vidriotechnologies.com)64. Functional images (512 × 512 pixels, 215 × 215 μm2; or 512 × 128 pixels, 215 × 55 μm2) of L2/3 cells (50–250 μm under the pia mater) were collected at 30 Hz or 122 Hz. Laser power was up to 50 mW at the front aperture of the objective unless stated otherwise for the XCaMP-Gf experiments.

Loose-seal recordings in mouse cortex

Micropipettes (3–9 MΩ) were filled with sterile saline containing 20 μM AlexaFluor 594. Somatic cell attached recordings were obtained from upper L2 neurons (50–200 μm depth from brain surface) visualized with the shadow patching technique65. Spikes were recorded either in current clamp or voltage clamp mode. Signals were filtered at 20 kHz (Multiclamp 700B, Axon Instruments) and digitized at 50 kHz using Wavesurfer (wavesurfer.janelia.org/). The frame trigger pulses of ScanImage were also recorded and used offline to synchronize individual frames to electrophysiological recordings. After establishment of a low-resistance seal (15–50 MΩ), randomized visual stimulation was delivered to increase the activity of the cells in the FOV. In a small subset of recordings, we microstimulated the recorded neuron in voltage clamp recording mode by applying DC current to increase its firing probability66.

Visual stimulation

Visual stimuli were moving gratings generated using the Psychophysics Toolbox in MATLAB (Mathworks), presented using an LCD monitor (30 × 40 cm2), placed 25 cm in front of the centre of the right eye of the mouse. Each stimulus trial consisted of a 2-s blank period (uniform grey display at mean luminance) followed by a 2-s drifting sinusoidal grating (0.05 cycles per degree, temporal frequency of 1 Hz, eight randomized different directions). The stimuli were synchronized to individual image frames using frame-start pulses provided by ScanImage.

Post hoc anatomy of the mouse cortex

After the loose-seal recording sessions, mice were anaesthetized with a mixture of ketamine–xylazine (0.1 mg ketamine and 0.008 mg xylazine per gram body weight) and were transcardially perfused with 4% PFA in 1X Dulbecco’s PBS (DPBS). The brains were extracted and post-fixed overnight in the perfusing solution. The brains were sectioned at 50-μm thickness, blocked with 2% BSA + 0.4 Triton X-100 (in PBS) for 1 h at room temperature, incubated with primary antibody (Rb-anti-GFP, 1:500; G10362, Invitrogen) for 2 days at 4 °C, and secondary antibody (AlexaFluor 594 conjugated goat anti-Rb, 1:500; A-11012, Invitrogen) overnight at 4 °C. The sections were mounted on microscope slides in Vectashield hard-set antifade mounting medium with DAPI (H-1500, Vector). Samples were imaged using a TissueFAXS 200 slide scanner (TissueGnostics) comprising an X-Light V2 spinning disk confocal imaging system (CrestOptics) built on an Axio Imager.Z2 microscope (Carl Zeiss Microscopy) equipped with a Plan-Apochromat ×20/0.8 M27 objective lens.

Analysis of two-photon imaging of the mouse cortex

The acquired data were analysed using MATLAB (population imaging) or Python (imaging during loose-seal recordings). In the MATLAB pipeline, for every recorded FOV, we selected ROIs covering all identifiable cell bodies using a semi-automated algorithm, and the fluorescence time course was measured by averaging all pixels within individual ROIs, after correction for neuropil contamination (r = 0.7), as previously described in detail5. We used one-way ANOVA tests (P < 0.01) for identifying cells with significant increase in their fluorescence signal during the stimulus presentation (responsive cells). We calculated ΔF/F0 = (FF0)/F0, where F is the instantaneous fluorescence signal and F0 is the average fluorescence in the interval 0.7 s before the start of the visual stimulus. For each responsive cell, we defined the preferred stimulus as the stimulus that evoked the maximal ΔF/F0 amplitude (peak values during the 2 s of stimulus presentation). The half-decay time was calculated as follows: for each responsive cell, we averaged its ΔF/F0 response to the preferred stimulus over five trials. We also calculated the standard deviation of the averaged baseline signal over the 0.7 s before the start of the stimulus. Only cells for which the maximal ΔF/F0 amplitude was higher than four standard deviations above the baseline signal were included in the analysis. The time required for each trace to reach half of its peak value (baseline fluorescence subtracted) was calculated by linear interpolation. The fraction of cells detected as responsive was calculated as the number of significantly responsive cells over all the cells analysed. The cumulative distribution of peak ΔF/F0 responses included the maximal response amplitude from all analysed cells, calculated as described above for the preferred stimulus of each cell. The OSI was calculated as before5,6 by fitting the fluorescence response from individual cells to the eight drifting grating stimuli with two Gaussians, centred at the preferred response angle (Rpref) and the opposite angle (Ropp). The OSI was calculated as:

$${\rm{OSI}}=\frac{{R}_{{\rm{pref}}}-{R}_{{\rm{orth}}}}{{R}_{{\rm{pref}}}+{R}_{{\rm{orth}}}}$$

where Rorth is the orthogonal angle to the preferred angle.

The movies recorded during loose-seal recordings were motion-corrected and segmented with the Python implementation of Suite2p (github.com/MouseLand/suite2p)67. The ROI corresponding to the loose-seal-recorded cell was then manually selected from the automatically segmented ROIs. For this dataset, we could calculate the neuropil contamination for most of the movies and got a distribution with a median of r_neu ~ 0.8 (Extended Data Fig. 14g–j), so we used this value uniformly for neuropil correction. Calcium events were defined by grouping APs with a 20-ms inclusion window. Then, we calculated ΔF/F0 = (FF0)/F0, where F is the instantaneous fluorescence signal and F0 was defined separately for all calcium events as the mean fluorescence value of the last 200 ms before the first AP in the group. Peak amplitudes were measured as the difference between the fluorescence intensity of the cell in the frame right before the first AP in the group, and the fluorescence intensity of the cell in the frame after the 0–95% rise time of the calcium sensor relative to the last AP in the group (30 ms (jGCaMP7f), 30 ms (XCaMP-Gf), 5 ms (jGCaMP8f), 5 ms (jGCaMP8m) and 10 ms (jGCaMP8s)). The sensitivity index (d′) was calculated as:

$${d}^{{\prime} }=\frac{\bar{{A}}}{\sqrt{\frac{1}{2}{\sigma }^{2}\left(A\right)}}$$

where A is the amplitudes of isolated calcium transients induced by a single AP. We also calculated a global ΔF/F0 trace (ΔF/F0)global, in which we used the 20th percentile of the fluorescence trace in a 60-s long running window as the F0,global. In the analyses, we only included calcium events in which this (ΔF/F0)global value was less than 0.5 right before the AP, to include only events starting near baseline fluorescence values, to exclude non-linear summation and saturation. Traces in Fig. 4 were filtered with a Gaussian kernel (σ = 5 ms).

Mouse surgeries for the cerebellum

Young adult (postnatal day 42–98) male C57BL/6J (Jackson Labs) mice were anaesthetized using isoflurane (2.5% for induction and 1.5% during surgery). A circular craniotomy (diameter of 3 mm) above medial crus I (2 mm left and 1 mm posterior to the midline junction of the interparietal and occipital bones). Viral suspension (200 nl) was injected in two locations near the centre point at a depth of 300–400 μm. Constructs injected included: AAV2/1-CAG-FLEx-jGCaMP8 constructs (pGP-AAV-CAG-FLEx-jGCaMP8f-WPRE, Addgene plasmid #162382; pGP-AAV-CAG-FLEx-jGCaMP8m-WPRE, Addgene plasmid #162381; pGP-AAV-CAG-FLEx-jGCaMP8s-WPRE, Addgene plasmid #162380; pGP-AAV-CAG-FLEx-jGCaMP7f-WPRE, Addgene plasmid #104496; and pGP-AAV-CAG-FLEx-jGCaMP6f-WPRE, Addgene plasmid #100835; all viruses were diluted to 4 × 1012 GC per millilitre titre).

Purkinje cell-specific expression was induced by co-injection of virus expressing Cre under control of a promoter fragment from the Purkinje cell protein 2 (Pcp2; also known as L7) gene (AAV2/1-sL7-Cre, 5.3 × 1010 GC per millilitre titre)68. A 3-mm diameter circular coverslip glued to a donut-shaped 3.5-mm diameter coverslip (no. 1 thickness, Warner Instruments) was cemented to the craniotomy using dental cement (C&B Metabond, Parkell). A custom titanium head post was cemented to the skull.

Two-photon imaging of the cerebellum

Head-restrained mice were allowed to freely locomote on a wheel. Imaging was performed with a custom-built two-photon microscope with a resonant scanner. The light source was a Mai Tai Sapphire laser (Spectra Physics) running at 920 nm. The objective was a ×16 CFI LWD Plan fluorite objective water immersion lens with 0.8 NA (Nikon). The detection path consisted of a bandpass filter (525/50 nm) and a 565-nm dichroic mirror directed towards a photomultiplier tube (Hamamatsu). Images were acquired using ScanImage (vidriotechnologies.com)64. Functional images (512 × 32 pixels, 215 × 27 μm2) of Purkinje cell dendrites (50–250 μm below the pia mater) were collected at 283 Hz. Laser power was up to 50 mW at the front aperture of the objective.

Analysis of two-photon imaging in the cerebellum

Purkinje cell dendrite movies were captured during free locomotion without applied stimulation. Movies were motion-corrected and converted to ΔF/F0 traces using the Python implementation of CaImAn69. Individual events within the traces were identified by finding adjacent local maxima in ΔF/F0 variance that had one local maximum in the ΔF/F0 trace between them. Statistics for individual events were calculated by fitting the equation:

$$F(t)=({F}_{\max }{(1-{e}^{-(t-{t}_{0})/{\tau }_{{\rm{rise}}}})}^{a}+{F}_{{\rm{start}}}/({F}_{1}+{F}_{2}))({F}_{1}{e}^{-(t-{t}_{0})/{\tau }_{1}}+{F}_{2}{e}^{-(t-{t}_{0})/{\tau }_{2}})$$

where t0 is the start of the peak, τrise is the rise time constant shaped by α; τ1 and τ2 are the decay time constants, Fmax is the maximum amplitude of the trace above the starting point Fstart, and F1 and F2 are component amplitudes.

Spike fluorescence models

We used a phenomenological model that converts spike times to a synthetic fluorescence time series33. This S2F model consists of two steps. First, spikes at times {tk} are converted to a latent variable, c(t), by convolution with two double-exponential kernels:

$$c(t)={\sum }_{t > {t}_{k}}\left[r\bullet \exp (\,-\,\frac{t-{t}_{k}}{{\tau }_{d1}})+\exp (\,-\,\frac{t-{t}_{k}}{{\tau }_{d2}})\right]\bullet \left[1-\exp (\,-\,\frac{t-{t}_{k}}{{\tau }_{r}})\right]+{n}_{i}(t)$$

τr, and τd1 and τd2 are the rise time and decay times, respectively. In our model, we required τd1 < τd2 (that is, fast and slow components), with r representing the ratio of the weight for the fast component to that of the slow one. \({n}_{i}\left(t\right) \sim N\left(0,{\sigma }_{i}^{2}\right)\) is the Gaussian-distributed noise. c(t) was truncated at zero if noise drove it to negative values. We tested the performance of models with various choices of rise and decay times: (1) one rise and one decay time, (2) one rise and two decay times, and (3) two rise and two decay times. Using cross-validation, we found that the models for one rise and two decay times fit pyramidal cells (as described above), whereas interneurons were fit well by one rise and a single decay time (as described above with r = 0). Subsequently, c(t) was converted to a synthetic fluorescence signal through a sigmoidal function:

$$\Delta F\,/\,{F}_{{\rm{Synth}}}(t)=\frac{{F}_{m}}{1+\exp [-k(c(t)-{c}_{1/2})]}+{n}_{e}(t)$$

where k is a non-linearity sharpness parameter, c1/2 is a half-activation parameter and Fm is the maximum possible fluorescence change. \({n}_{e}\left(t\right) \sim N(0,{\sigma }_{e}^{2})\) is the Gaussian-distributed external noise. For comparison, we also generated a S2F linear model with \(\,\Delta F/\,{F}_{{\rm{Synth}}}(t)=\) \({F}_{\max }c\left(t\right)+{F}_{0}\), where Fmax is a scaling parameter (we kept the naming as max to clarify the relationship to other models); F0 is the baseline.

We applied the linear33 (Fig. 5d–h) and non-linear70 (Extended Data Fig. 19a–e) inference models using their default parameters. The linear model provided an estimate of the number of spikes per imaging frame (Fig. 5d, middle panel), in which we considered that a spiking event occurred if the estimated spike count was above 0.6. The non-linear model provided an estimate of spike times (inferred spikes). Both models provide reconstructions of fluorescent dynamics ∆F/FSynth, based on inferred spikes and estimated model parameters from spikes to fluorescence. We computed spiking dynamics based on spike counts in a frame convolved with a Gaussian filter with standard deviation of 100 ms for both ground-truth (Fig. 5d, bottom, black line, r(t)) and inferred spikes (Fig. 5d, bottom, red line, \(\hat{r}(t)\)).

We measured the inference performance using (1) variance explained of fluorescence dynamics as \(1-\frac{{ < {(\Delta F/F(t)-\Delta F/{F}_{{\rm{Synth}}}(t))}^{2} > }_{t}}{{ < {(\Delta F/F(t)-{ < \Delta F/F(t) > }_{t})}^{2} > }_{t}}\) (Fig. 5e); (2) variance explained of spiking dynamics as \(1-\frac{{ < {({\rm{r}}(t)-\hat{{\rm{r}}}(t))}^{2} > }_{t}}{{ < {({\rm{r}}(t)-{ < {\rm{r}}(t) > }_{t})}^{2} > }_{t}}\) (Fig. 5f); (3) spike detectability \({F}_{{score}}=\frac{2\times \#\{{true\; in\; ferred\; spikes}\}}{\#\{{true\; spikes}\}+\#\{{in\; ferred\; spikes}\}}\), where an inferred spike falling into a 40-ms time window of a true spike (that is, \({| t}_{{\rm{true}}}-{t}_{{\rm{inferred}}}| < 40\,{\rm{ms}}\)) was considered as a true inferred spike (true positive) (Fig. 5g); and (4) for true inferred spikes, we measured spike timing error as \(\sqrt{ < {\left({t}_{{\rm{true}}}-{t}_{{\rm{inferred}}}\right)}^{2}\, > }\) (Fig. 5h).

Variance explained

Variance explained measures the goodness-of-fit of an S2F model, as \(1-\frac{{(\Delta F/{F}_{{\rm{raw}}}(t)-\Delta F/{F}_{{\rm{Synth}}}(t))}^{2}}{{(\Delta F/{F}_{{\rm{raw}}}(t)-{ < \Delta F/{F}_{{\rm{raw}}}(t) > }_{t})}^{2}}\). Here we used only the time t with a spike rate of more than 0 Hz after spikes in the calculation, in which the instantaneous spike rate at time t is estimated by a boxcar-rolling average over a 600-ms time window.

Experimental design

Sample size

For the cultured neuron assay, we used n consistent with our power analysis from an earlier study24; prioritized variants received many more replicates (11, 24 and 64 for the three jGCaMP8 indicators). We found the purified protein experiments to be extremely reproducible, with n of 3–5 routinely providing very small error bars. Many individuals were used for each in vivo experiment, with multiple trials per FOV per individual; values of n ranged into the hundreds for these experiments. All multiple-comparison experiments were verified to provide sufficient power with the Kruskal–Wallis multiple-comparison test before proceeding to pairwise comparison tests.

Randomization

There were no experimental groups, thus no need for randomization.

Blinding

There were no experimental groups, thus no need for blinding.

Statistics

Exact statistical tests used for each comparison, as well as n, are listed in the main text and figure legends. Box-and-whisker plots throughout the paper indicate the median and 25–75th percentile range; whiskers indicate the shorter of 1.5 times the interquartile range or the extreme data point71.

For Fig. 3e, full statistics are: jGCaMP7f (min, Q1, Q2, Q3 and max) = 0.013, 0.041, 0.11, 0.22 and 1.16, n = 320 cells from 3 mice; XCaMP-Gf (min, Q1, Q2, Q3 and max) = 0.016, 0.048, 0.091, 0.16 and 0.38, n = 124 cells from 3 mice; jGCaMP8f (min, Q1, Q2, Q3 and max) = 0.010, 0.033, 0.084, 0.15 and 0.44, n = 317 cells from 5 mice; jGCaMP8m (min, Q1, Q2, Q3 and max) = 0.011, 0.032, 0.084, 0.16 and 0.56, n = 365 cells from 3 mice; jGCaMP8s (min, Q1, Q2, Q3 and max) = 0.013, 0.059, 0.14, 0.24 and 0.67, n = 655 cells from 6 mice. Kruskal–Wallis multiple-comparison test, P = 3.1 × 10−15. jGCaMP7f versus XCaMP-Gf: P = 1.0; jGCaMP7f versus jGCaMP8f: P = 0.013; jGCaMP7f versus jGCaMP8m: P = 0.029; jGCaMP7f versus jGCaMP8m: P = 0.010; jGCaMP7f versus jGCaMP8s: P = 0.010; XCaMP-Gf versus jGCaMP8f: P = 1.0; XCaMP-Gf versus jGCaMP8m: P = 1.0; XCaMP-Gf versus jGCaMP8s: P = 0.0027; jGCaMP8f versus jGCaMP8m: P = 1.0; jGCaMP8f versus jGCaMP8s: P = 2.4 × 10−11; and jGCaMP8m versus jGCaMP8s: P = 4.49 × 10−11. For Dunn’s comparison test shown: *P < 0.05, ***P < 0.001 and not significant. For Fig. 3f, data passed Shapiro–Wilk normality test (α = 0.05 level). For Fig. 3f, full statistics are: jGCaMP8f (min, Q1, Q2, Q3 and max) = 0.12, 0.22,0.375, 0.52 and 0.72, n = 19 FOVs from 5 mice; jGCaMP8m (min, Q1, Q2, Q3 and max) = 0.32, 0.55, 0.66, 0.79 and 0.85, n = 14 FOVs from 3 mice; jGCaMP8s (min, Q1, Q2, Q3 and max) = 0.33, 0.71, 0.79, 0.89 and 1.00, n = 26 FOVs from 6 mice; and jGCaMP7f (min, Q1, Q2, Q3 and max) = 0.21, 0.32, 0.45, 0.59 and 0.73, n = 12 FOVs from 3 mice. For Tukey’s multiple comparison test: jGCaMP7f versus jGCaMP8f: P = 0.83; jGCaMP7f versus jGCaMP8m: P = 0.0184; jGCaMP7f versus jGCaMP8s: P = 4.52 × 10−5; jGCaMP8f versus jGCaMP8m: P = 0.00098; and jGCaMP8m versus jGCaMP8s: P = 0.23. For one-way ANOVA test: *P < 0.05, ***P < 0.001 and not significant. For Fig. 3g, full statistics are: jGCaMP7f versus jGCaMP8f: P = 8.7 × 10−103; jGCaMP7f versus jGCaMP8m: P = 1.0; jGCaMP7f versus jGCaMP8s: P = 5.5 × 1085; jGCaMP8f versus jGCaMP8m: P = 9.3 × 1096; and jGCaMP8m versus jGCaMP8s: P = 1.1 × 1072 (Kruskal–Wallis test with Dunn’s multiple comparison test was used to compare the magnitude of response across groups).

For Extended Data Fig. 8e, at a duration of 4 ms, Kruskal–Wallis test found P = 2.3 × 10−3 and pairwise Dunn’s multiple comparison test to jGCaMP7f as follows: jGCaMP8f P = 0.03, jGCaMP8m P = 2.0 × 10−4 and jGCaMP8s P = 0.24. At a duration of 8 ms, Kruskal–Wallis test found P = 3.5 × 10−5 and pairwise Dunn’s multiple comparison test to jGCaMP7f as follows: jGCaMP8f P = 3.5 × 10−3, jGCaMP8m P = 2.8 × 10−5 and jGCaMP8s P = 0.73. At a duration of 25 ms, Kruskal–Wallis test found P = 3.4 × 10−5 and pairwise Dunn’s multiple comparison test to jGCaMP7f as follows: jGCaMP8f P = 0.074, jGCaMP8m P = 1.6 × 10−3 and jGCaMP8s P = 0.11. Numbers tested are the same as Extended Data Fig. 8c.

Reagent availability

DNA constructs and AAV particles of jGCaMP8s, jGCaMP8m and jGCaMP8f (pCMV, pAAV-synapsin-1, pAAV-synapsin-1-FLEX and pAAV-CAG-FLEX) have been deposited at Addgene (#162371–162382). Sequences have been deposited in GenBank (#OK646318–OK646320). The crystal structure of jGCaMP8.410.80 has been deposited in the PDB (PDB ID: 7ST4). Drosophila stocks were deposited at the Bloomington Drosophila Stock Center (http://flystocks.bio.indiana.edu) – #92587–92595; Drosophila UAS and lexAOp plasmids have been deposited at Addgene (#162383–162388). Email GENIEreagents@janelia.hhmi.org for additional requests.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.



Source link

By AUTHOR

Leave a Reply

Your email address will not be published. Required fields are marked *