Intensiometric biosensors visualize the activity of multiple small GTPases in vivo

Ras and Rho small GTPases are critical for numerous cellular processes including cell division, migration, and intercellular communication. Despite extensive efforts to visualize the spatiotemporal activity of these proteins, achieving the sensitivity and dynamic range necessary for in vivo application has been challenging. Here, we present highly sensitive intensiometric small GTPase biosensors visualizing the activity of multiple small GTPases in single cells in vivo. Red-shifted sensors combined with blue light-controllable optogenetic modules achieved simultaneous monitoring and manipulation of protein activities in a highly spatiotemporal manner. Our biosensors revealed spatial dynamics of Cdc42 and Ras activities upon structural plasticity of single dendritic spines, as well as a broad range of subcellular Ras activities in the brains of freely behaving mice. Thus, these intensiometric small GTPase sensors enable the spatiotemporal dissection of complex protein signaling networks in live animals. FRET sensors hardly achieve visualization of spatiotemporal dynamics of protein activity in vivo. Here the authors present intensiometric small GTPase biosensors based on dimerization-dependent fluorescent proteins that enable monitoring of activity of small GTPases in the brains of behaving mice at a single spine resolution.

W orking as a molecular switch, Ras and Rho small GTPases cycle between a GTP-and GDP-bound state to turn downstream signaling cascades on and off, respectively 1,2 . Accumulating evidence indicates that small GTPases have distinct activity profiles in space and time and are finely coordinated to determine proper cell fates in response to extracellular cues [3][4][5] . To understand the dynamic nature of small GTPase activity at a high spatiotemporal resolution, researchers have developed small GTPase biosensors, such as Förster resonance energy transfer (FRET) sensors 6 . FRET sensors have largely prospered in studies of small GTPases in diverse biological systems; however, several challenges remain for broad application of FRET sensors. First, the low sensitivity and efficiency of FRET sensors hamper in vivo application, especially for the visualization of protein activity at a micron scale. Although two-photon fluorescence lifetime imaging microscopy (2p-FLIM) 7 has been adopted to monitor active small GTPases at a subcellular level in complex multicellular environments such as organotypic brain slices, 2p-FLIM has not been directly applied to intact animal tissue. Second, as the FRET sensor innately requires donor and acceptor fluorescence, it practically limits the number of target signaling events that can be simultaneously analyzed in a single cell. Recently developed computational multiplexing approaches have compensated for this problem to some degree 8 , but few references (e.g., cell membrane dynamics) for spatiotemporal alignments and correlative analyses of multiple signals collected from a number of samples restricts their widespread use. Third, considering the dramatic increase in the number of recently developed optogenetic techniques exploiting photoreceptors 9,10 , it seems obvious that combinatorial uses of optogenetic manipulators and reporters will provide powerful means to dissect complex signaling networks with high spatiotemporal precision. However, the spectral overlap of cyan-yellow-paired FRET sensors with blue light-controllable optogenetic modules does not permit transient and local perturbation of target molecules under continuous monitoring of reporter activities 11 .
To address these issues, here we present an intensiometric small GTPase biosensor that utilizes the dimerization-dependent fluorescent protein (ddFP). Green and red hues of our biosensors enabled multiplexed imaging of activity of multiple small GTPases in single cells. In addition, we demonstrated that redshifted sensors are highly compatible with blue light-controllable optogenetic modules, thereby achieving spatiotemporal dissection of target activity under dynamic control of cellular functions. Applying to the mouse brain, we identified spatially distinctive activity profiles of Ras and Cdc42 in single dendritic spines and proved feasibility and effectiveness of our sensors for real-time monitoring of Ras activity in the brains of freely behaving mice at micron scale precision.

Results
Design of intensiometric Ras small GTPase biosensors. The ddFP combines two quenched fluorescent protein-derived monomers: copy A and B. The copy A chromophore produces bright fluorescence when heterodimerized with copy B. Copy A can be spectrally diversified into green (GA) or red (RA) hue by mutations on multiple amino acids 12,13 , copy B variants can bind to both GA and RA with similar or distinct affinities (K d = 34 0 mM), implying possible production of multi-colored sensors 14 . Based on these properties, we designed intensiometric small GTPase sensors with a ddFP copy on both the small GTPase and effector domains. We hypothesized that activity-dependent binding of a small GTPase and effector would allow ddFP heterodimerization, thereby generating fluorescence (Fig. 1a). We initially examined basal fluorescence generated by inherent dimerization of ddFPs. We measured fluorescence intensity in cells expressing GA with or without copy B. We used two variants of copy B, B1, and B3, which have different binding affinities to copy A (K d = 3 μM, 40 μM for GA-B1, GA-B3, respectively) 14 . Compared with GA expression alone, co-expression of GA and each copy B increased basal fluorescence; the GA-B1 pair elicited a higher intensity than GA-B3. As both copies A and B were localized in the cytosol in this experiment, we examined whether spatial separation of GA and copy B could reduce fluorescence. Indeed, when GA was located in the plasma membrane and copy B in the cytosol, we observed significantly reduced fluorescence ( Supplementary Fig. 1a, b). Thus, from the comparative analysis on the basal fluorescence, we decided to use GA-B3 pair rather than GA-B1 pair to minimize artificial signal and maximize dynamic range of sensor. Next, to examine whether we could utilize ddFP heterodimerization to represent small GTPase activity, we generated expression plasmids encoding the KRas mutant (the GTP-or GDP-bound form) and the Ras-binding domain of Raf (RBD Raf1 ), labeled with GA, and B3 (hereafter called 'B') at their N-termini, respectively. RBD Raf1 specifically binds to active Ras and their binding has been typically employed to generate various Ras biosensors 15,16 . We also tagged GA-KRas with iRFP682, a far-red fluorescence protein 17 , to estimate the overall cell shape and relative expression levels of KRas in individual cells. When co-expressed with B-RBD Raf1 in HeLa cells, iRFP-GA-KRas GTP showed much brighter green fluorescence than iRFP-GA-KRas GDP ( Supplementary Fig. 2a), indicating that activity-dependent Ras-RBD interactions sufficiently induce ddFP heterodimerization and increased fluorescence. We evaluated the optimal configuration of fusion proteins by changing the relative positions or copy numbers of ddFP to Ras and RBD. Among the six combinations tested, N-terminal conjugations of GA and B to Ras and RBD, respectively, elicited the highest mean fold induction (~24.6-fold) of fluorescence ( Supplementary Fig. 2b, c).
To monitor wild-type Ras activity, we designed a bicistronic vector encoding B-labeled RBD Raf1 and GA-labeled KRas (B-RBD Raf1 -2A-GA-KRas) linked via a 2A peptide sequence 18 , G-KRas (Fig. 1b). After expressing G-KRas in HeLa cells, we treated the cells with 50 ng ml −1 epidermal growth factor (EGF) and observed a rapid increase (~2.8-fold) in G-KRas fluorescence intensity that saturated within three minutes, consistent with previous studies 15 . Treatment with a pharmacological inhibitor of the EGF receptor (gefitinib; 400 nM) reduced the augmented intensity, demonstrating that the Ras sensor fluorescence was specific to EGF signaling (Fig. 1b, c and Supplementary Movie 1). This reversible change implies that the sensor activity was mainly governed by the Ras-RBD interaction, which has three orders of magnitude higher affinity (K d =~20 nM) 19 than that between ddFP copies (Fig. 1d). Notably, G-KRas sensitively responded to even a pg ml −1 concentration of EGF (Fig. 1e). To measure the detection limit of sensor, we performed signal-to-noise ratio (SNR) analysis for G-HRas in comparison with RaichuEV-HRas FRET sensor upon treatment of various EGF concentrations. As a result, we found that the detection limit for EGF by ddFP or FRET sensor was 0.011 ng ml −1 or 24.946 ng ml −1 , respectively ( Supplementary Fig. 3, and see Methods for SNR analysis in detail).
Given the structural similarity among Ras family members, we applied the same strategy to other small GTPases, such as HRas and NRas. G-HRas and G-NRas responded to EGF at a similar fold induction as that of G-KRas. In contrast, without either Ras or RBD Raf1 , the change in fluorescence was negligible (Fig. 1f). Given that copy B has a similar binding affinity to RA 14 , we designed a red-colored KRas sensor (R-KRas) by replacing GA with RA in G-KRas. This sensor showed similar amplitude and fluorescence kinetics under EGF stimulation, suggesting the potential for simultaneous use of GA and RA ( Fig. 1g and Supplementary Movie 2).

Expansion of intensiometric biosensors to Rho small GTPases.
To expand the versatility of our platform, we next designed bicistronic expression vectors encoding red sensors of Rac1 and Cdc42 by employing CRIB Pak1 as an effector domain, which is the most widely adopted module for generation of previous FRET sensors by its property of specific interaction with active Rac1 or Cdc42 (ref. 4,15 ). To verify their functionality and specificity, we selectively activated small GTPases using rapamycin-induced FKBP-FRB dimerization system for recruitment of catalytic domains of regulators to the plasma membrane 20 ( Supplementary  Fig. 4a). Upon translocation of the activators to the plasma membrane, R-HRas, R-Rac1, and R-Cdc42 showed a rapid and substantial increase in fluorescence; recruiting only FKBP did not affect fluorescence (Supplementary Fig. 4b). In addition, each sensor coupled with specific upstream activators (i.e., HRas-Sos1, Rac1-Tiam1, and Cdc42-Fgd1) ( Supplementary Fig. 4c). We also confirmed that iSH2 (activator of endogenous PI3K) could increase fluorescence signals of all three sensors of R-HRas, R-Rac1, and R-Cdc42. Altogether, these results demonstrate   the sensitivity, specificity, and versatility of our sensors for visualizing Ras and Rho GTPase activities.
Comparison of ddFP-based and FRET-based small GTPase biosensors. In comparison with RaichuEV-HRas, the most widely used Ras FRET sensor 15 , G-HRas exhibited a higher fold induction (~2.5-fold) of fluorescence upon EGF treatment. In addition, G-HRas showed significantly faster activation and deactivation dynamics than the RaichuEV sensor (T 1/2 on G-HRas: 80.59 ± 2.45 s, T 1/2 on RaichuEV-HRas: 260.64 ± 4.80 s, T 1/2 off G-HRas: 386.79 ± 8.46 s, T 1/2 off RaichuEV-HRas: 745.80 ± 22.23 s) ( Supplementary  Fig. 5a, b). We speculated that the different kinetics might be attributed to distinct intra-and intermolecular interactions of Ras and the effector domain in RaichuEV-Ras and G-Ras sensors, respectively. Thus, we tested an intermolecular Ras FRET sensor that consists of CyPet-HRas and YPet-RBD Raf1. This sensor showed similar activation and deactivation kinetics as the ddFPbased sensor under EGF treatment ( Supplementary Fig. 5c, d). This result could be explained by variations between the sensors in the accessibility of Ras to its regulators 21 . Next, as it is known that the local activity of small GTPase is important for various cell functions 4 , we examined if the ddFP-based sensor correctly represents spatial distribution of protein activity by using the FRET sensor as a positive control. Analysis of signal distribution revealed that the localized activity pattern of R-HRas and G-Rac1 showed no significant difference in comparison with RaichuEV-HRas and RaichuEV-Rac1 respectively ( Supplementary Fig. 6), indicating that replacement of reporter module from CFP-YFP pair to ddFPs does not cause any change or loss of spatial information of protein activity.
Expression of ddFP-based sensor does not perturb Erk signaling. We next examined whether expression of a ddFP-based Ras affected downstream ERK signaling. To analyze endogenous ERK activity in a single cell expressing the Ras sensor, we employed an ERK kinase translocation reporter (KTR) 21 . Quantification of the nucleocytoplasmic ratio of the ERK KTR sensor indicated that cells with or without Ras sensor showed little difference in basal ERK or EGF-stimulated activity (Supplementary Fig. 7). Therefore, the expression of the ddFP-based sensor does not perturb endogenous signaling under our experimental conditions.
Visualization of multiple small GTPase activities in a single cell. With the goal of directly measuring the activity of multiple small GTPases in a single cell, we developed ddFP-based sensors with spectrally separated hues. We co-expressed R-HRas, G-Rac1, and Lyn-miRFP in MDA-MB-231 cells. We used Lyn-miRFP as a membrane marker for normalizing the local fluorescence change caused by membrane fluctuations. Under random cell migration, we found that HRas and Rac1 were highly activated in the leading edge. Their activity profiles were positively correlated but showed slightly different spatial patterns under microscale comparison (Fig. 1h, i and Supplementary Movie 3). A previous study indicated that copy B can interchangeably bind to GA and RA under a certain proximity level 14 , raising the possibility that copy B-fused effector might interact with a copy A-labeled non-target small GTPase. To examine this, we co-expressed MDA-MB-231 cells with R-HRas and GA-Rac1-IRES-Lyn-iRFP682 and monitored RA and GA signals over time. We observed a remarkable increase of RA signal from R-HRas sensor near the protruded area but no noticeable elevation of GA signal, indicating that binding of B-RBD Raf1 to RA-HRas did not affect GA-Rac1 signal ( Supplementary  Fig. 8a). Similarly, when cells were expressed with G-Rac1 with RA-HRas-IRES-Lyn-iRFP682, there was clear enrichment of GA signal at the area of leading edge but no detectable RA signal, further supporting the specificity of our sensors ( Supplementary  Fig. 8b). These results demonstrate the feasibility of using multiple ddFP sensors in the same intracellular environment without cross-reaction.
High compatibility of red-shifted sensors with optogenetic modules. A recently developed series of optogenetic tools utilizing photoreceptors provide fine-control of intracellular signaling in space and time 9,10 . However, owing to spectral overlap, blue light-excitable photoreceptors are not compatible with a cyan-yellow pair of FRET sensors 11 . We hypothesized that our red-shifted sensors could overcome these challenges. To examine this, we co-expressed R-HRas sensor with OptoFGFR1, an optogenetic module for activation of FGFR1 signaling 22  Next, we monitored HRas activity in cultured rat hippocampal neurons under light-mediated activation of TrkB signaling using OptoTrkB 23 (Fig. 2a). We co-expressed OptoTrkB and R-HRas in hippocampal neurons (DIV-9−12). Again, under global and transient activation of OptoTrkB, fluorescence intensity of R-HRas was augmented~1.5-fold and saturated within five minutes (Fig. 2b, c). Light illumination on a small dendritic region induced reversible HRas activation specifically in stimulated dendrites (Fig. 2d, e Supplementary Fig. 10 and Supplementary Movie 5). Also, under local and persistent delivery of light on the peripheral of cell body, we could observe substantial increase of Ras activity near the illumination site accompanied by membrane protrusion (Supplementary Fig. 11a). Interestingly, we found that proximal dendrites showed growth of filopodialike structures where Ras activity was selectively detected at the base rather than within the filopodia ( Supplementary Fig. 11b, c), indicating spatially confined regulation of Ras activity by TrkB during this process of morphological change.
Next, we tried to locally activate OptoTrkB at distal parts of neurites of cultured hippocampal neurons at early stage of differentiation (DIV-2) in which neurites have not been specified as axons or dendrites yet. Under illumination of light on a distal part of neurite, we found spatially restricted activation of Ras and efficient elongation of the neurite. In contrast, non-illuminated neurites did not show any extension or increased Ras activity; rather, they were retracted along with attenuation of Ras activity ( Supplementary Fig. 12a). When the stimulation site was changed to other neurites, we observed the same effects of shifted balance of Ras activity and selective elongation of neurites. In addition, when we illuminated light on cell body, the previously extended neurite dramatically shrank. Thus, these results indicate that during the process of selective neurite outgrowth, subcellular regions undergo a competition to achieve neuronal polarization probably through utility of limited pools of key molecules such as Ras or actin 24,25 .
As the previous study reported that local activation of Ras has an important role in axon formation 24 , we analyzed kinetic correlations between Ras activity and growth cone extension under local stimulation of OptoTrkB. As a result, we found that activation of Ras was detected before initial response of neurite extension (Supplementary Figure 12b, c, d) and temporal crosscorrelation analysis revealed that Ras activation preceded neurite extension by 0.534 min during the light stimulation (2-30 min) ( Supplementary Fig. 12e). Altogether, we proved high compatibility of our red-shifted sensors with blue light-based optogenetic modules that allows us to achieve multiplexed analysis and investigate spatiotemporal roles of protein activity under lightdriven perturbation on a certain biological process.
Visualization of small GTPase activities in single spines under sLTP. To test whether our small GTPase sensors are sensitive enough to visualize local signaling in complex multicellular environments, we examined individual dendritic spines in organotypic brain slices. We transfected G-Cdc42 or G-HRas together with tdTomato to visualize GTPase activity and neuronal morphology, respectively (Fig. 2f). Repetitive two-photon photolysis of glutamate (*HFU; high-frequency uncaging stimulus) on single dendritic spines increased dendritic spine volume without causing structural changes to neighboring dendritic spines (Supplementary Fig. 13a, b). Furthermore, G-Cdc42 fluorescence significantly increased at the target spines for 20 min (Fig. 2g, h and Supplementary Fig. 13c). These elevated signals were confined to the target spine head, with no fluorescence changes observed at a nearby dendritic region (2.5 μm away). Unlike Cdc42, increased Ras activity at the stimulated spine diffused to a nearby dendritic region, suggesting a broader spatial scale of Ras compared to Cdc42 activity 26 .

Monitoring Ras activity in the brains of freely behaving mice.
To test whether the G-HRas sensor effectively detects Ras activity in vivo, we injected adeno-associated viruses expressing G-HRas and tdTomato (to visualize cell morphology) into the primary motor cortex (M1) of mice (Fig. 3a). Individual neurons exhibited different levels of fluorescence intensities, expressed by a log-normal distribution curve when plotted by a G/R ratio (Fig. 3b, c). The coefficient of variation of G-HRas expression was significantly higher than that of tdTomato expression, suggesting that highly variable Ras activity in vivo did not originate from differential expression levels (Fig. 3d). A line scan measure on a neuronal cell body expressing G-HRas also confirmed a typical expression pattern of plasma membrane (Fig. 3e, f).
To examine whether G-HRas can monitor real-time changes of Ras activity in vivo, we applied brain-derived neurotrophic factor (BDNF) through a small cranial window. Time-lapse imaging of the same neuronal population showed a gradual increase in the average Ras activity upon BDNF (2 μg ml −1 ) application (Fig. 3g, h) that became significantly enhanced compared with the control 16 (Fig. 3i). In contrast, the overall Ras activity was significantly reduced in an anesthetized state (Fig. 3j, k). Because neuronal activity in M1 decreases significantly in the anesthetized condition 27 , we examined a putative correlation between Ras and neuronal activity. We injected R-HRas, a red Ras activity sensor, and a genetically encoded calcium indicator, GCaMP6s, into M1. We conducted in vivo two-photon imaging while head-fixed mice ran on a spherical treadmill (Fig. 3l, m). Post hoc analysis of time-lapse measures revealed a positive correlation between the average changes of GCaMP6s and R-HRas signals, suggesting that neurons with high activity tend to show high Ras activity (Fig. 3n, o).
Visualization of individual Ras activity at single spine resolution. To probe whether the sensor can report Ras activity at a single-synapse resolution in vivo, we imaged dendrites under high magnification (Fig. 4a). We found that signals of Ras activity were distributed as discrete puncta throughout dendrites and~20% of puncta showed high G-Ras intensity (>2.5-fold) (Fig. 4b). We monitored real-time changes of Ras activity while mice were behaving on the treadmill and found that individual punctum showed variable initial levels and changes of Ras activity (Fig. 4c,  d), possibly owing to dynamic synaptic inputs with different strengths. To further characterize the dynamics of Ras activity, we categorized puncta based on their changes in Ras activity (same, > 80% and < 120%; up, ≥ 120%; down ≤ 80%) over 30 min. We found a significant increase in the puncta population in the "up" category, a substantial decrease in the "down" category, and no difference in the "same" category in the awake versus anesthetized state (Fig. 4e). Interestingly, puncta showing high versus low fluorescence intensity were more stable; a similar tendency did not exist in the anesthetized state (Fig. 4f). Next, we performed the same experiments using G-Rac1 and G-Cdc42 sensors. Even though overall fluorescence of G-Rac1 and G-Cdc42 was dimmer than G-HRas, we obtained consistent result in which puncta population of upregulation of small GTPase increased and puncta population of downregulation of small GTPase decreased while mice were running on the treadmill (Supplementary Fig. 14). These results demonstrate that our small GTPase sensors can visualize cellular signaling at a micron scale in awake-behaving animals.

Discussion
In this study, we describe intensiometric biosensors that can visualize Ras and Rho small GTPase activities with a high spatiotemporal resolution. Using spectrally separated ddFP modules (GA and RA), we achieved simultaneous monitoring and direct comparison of multiple small GTPase activities in the same subcellular environment. Although a previous study showed that copy B could interchangeably interact with both GA and RA owing to their intrinsic binding properties 14 , we could not detect noticeable signal cross-reactivity between Ras and Rho sensors, likely owing to the overwhelming binding affinity of small GTPases and effector proteins. Therefore, our experimental multiplexing approach will be valuable for reliable assessment of spatiotemporal coordination of multiple small GTPases in a given cellular context. Moreover, our results revealed a correlation between Ras function and neuronal activity represented by Ca 2+ concentration (Fig. 3n, o); thus, our sensors could be readily combined with other conventional biosensors to provide an integrative strategy for analyzing many signaling events related to small GTPases. We also demonstrated that red-shifted sensors are highly compatible with blue light-controllable optogenetic modules. This combination will enable the investigation of dynamic changes in protein activities under space-and time-resolved signaling perturbation. In parallel, red or near infrared lightbased modulating systems 9,28,29 would be essentially compatible with both RA and GA sensors, allowing multiplexed visualization under optogenetic manipulation. Notably, our work demonstrated that the high sensitivity and signal-to-noise ratio of ddFPbased sensors enables small GTPase activity to be visualized in the intact brain of freely behaving animals at a micron scale. This suggests potential value of our sensor to uncover specific roles of small GTPases in various brain functions such as learning and memory under physiological conditions. Beyond studies in the brain, our sensors will be generally applicable to in vivo imaging of other tissues in normal and disease states. The development of sensors for other GTPase members and the expansion of the ddFP palette 30 , accompanied by computational multiplexing 8 , will greatly increase our ability to analyze complex signaling networks in diverse biological systems.
Cell culture and transfection. HeLa and MDA-MB-231 (ATCC) cells were maintained in Dulbecco's modified Eagle's medium (PAA Laboratories GmbH) supplemented with 10% fetal bovine serum (FBS; Invitrogen) at 37°C and 10% CO 2 . We have not recently authenticated these cell lines, but we have confirmed that they are free from mycoplasma contamination (tested with e-MycoTM Mycoplasma PCR detection kit (ver. Live-cell imaging and electronics. For imaging Live-cell imaging was performed using a Nikon A1R confocal microscopy (Nikon Instruments) mounted onto a Nikon Eclipse Ti body equipped with CFI Plan Apochromat VC objectives (×60, 1.4 numerical aperture; Nikon) along with digital zooming of Nikon imaging software (NIS-elements AR 64-bit version 3.21, Laboratory Imaging). Chamlide TC system placed in a microscope stage was used to maintain environmental condition at 37°C and 10% CO 2 (Live Cell Instrument, Inc.). For treatment of the chemical stimulus, HeLa cells were serum starved 3 h prior to imaging, and the medium was replaced with DPBS (Invitrogen) just before the imaging.
Blue light-excitation of optogenetics modules. Whole-cell photoexcitation to induce optoFGFR1 and optoTrkB was delivered using a photostimulation module in Nikon imaging software (NIS-elements) that provided three loops of 0.5 s stimuli. A laser power of 221 μW mm −2 (measured with an optical power meter from ADCMT) was used for photoexcitation. In case of local photoexcitation, three pulses in 0.189 s with 315 mW mm −2 was delivered for optoFGFR1 activation. Repeated illumination (53 mW mm −2 , three pulses in 0.189 s at 1 min intervals) was applied to the peripheral region of an MDA-MB-231 cell for directed migration. Two pulses in 0.126 s with 412 mW mm −2 was delivered for local optoTrkB activation in hippocampal culture neuron.
Image processing and analysis. Images were analyzed with Nikon imaging software (NIS-elements AR 64-bit version 3.21, Laboratory Imaging) and Meta-Morph software (version 7.8.12, MDS Analytical Technologies). For quantification of dynamic range the sensors, fluorescence intensity (500~2500 arbitrary units) at designated regions of interest were measured using the "Annotations and Measurements" tool in Nikon imaging software. For cell area analysis, the "Automated Measurements" tool and "ROI Statistics" tool in Nikon imaging software were used. In order to quantitatively analyze the changes of fluorescent intensities during activation of each sensors, the "Time Measurement" tool in Nikon imaging software was used. Images were denoised in "2D Current Plane" and "2D + time" using Safir software (version 1.0.3, Roper Scientific) 32 , and running into Meta-Morph software. A "Kymograph" tool in MetaMorph software was used to draw kymographs. For protrusion and retraction analysis, fluorescence images of Lyn-iRFP682 were converted into binary images based on intensity thresholding with MetaMorph Software. Using the "Arithmetic" tool, images of retraction were obtained by subtracting the binary images of before and after light stimulation. Regions of protrusions were conversely isolated. Areas that overlapped right before stimulation were obtained by operating "Logical AND" with the two binary images. Isolated regions were combined with the "Color Combine" tool. Statistical significance was evaluated by Student's two-tailed t test.
Preparation and transfection of organotypic cortical slice cultures. Organotypic slice cultures from mouse somatosensory cortex were prepared from C57BL/6 wild-type mice (Charles River Laboratory) at postnatal day 2 (P2)-P3, as described previously 33 , in accordance with the Institutional Animal Care and Use of Max Planck Florida Institute for Neuroscience and National Institutes of Health guidelines. Slices were transfected 7-10 days prior to imaging using biolistic gene transfer 34 . A total of 10 μg of tdTomato 33  For each neuron, image stacks (512 × 512 pixels; 0.035 μm/ pixel) with 1 μm z-steps were collected from one segment of secondary or tertiary apical dendrites at 2 or 5 min intervals using a two-photon microscope (Bruker, Inc) with a pulsed Ti::sapphire laser (MaiTai HP DeepSee, Spectra-Physics) tuned to 920 nm (3-4 mW at the sample). All images shown are maximum projections of 3D image stacks after applying a median filter (2 × 2) to the raw image data. Uncaging of MNI-glutamate was achieved as described 33 . In brief, LTP-inducing HFU consisted of 30 pulses (720 nm; 15-18 mW at the sample) of 5 ms duration delivered at 1 Hz in the presence of 2.5 mM MNI-glutamate by parking the beam at a point ∼ 0.5 μm from the center of the spine head with a pulsed Ti::sapphire laser (MaiTai HP, Spectra-Physics). The mock stimulus was identical in parameters to the HFU stimulus, except carried out in the absence of MNI-glutamate. No more than two LTP trials were performed from the same neuron.
Image analysis and quantification of glutamate uncaging. Estimated spine volume and G-Cdc42 or G-HRas enrichment on dendritic spines were measured in fluorescence images from red (tdTomato) and green (Cdc42 or HRas) channels using ImageJ (NIH). Integrated fluorescence intensities were calculated from background-subtracted and bleed-through-corrected red and green fluorescence using the integrated pixel intensity of a boxed region surrounding the spine head, as described previously 34 . G-Cdc42 or G-HRas fluorescence intensities in dendritic shafts were calculated from background-subtracted and bleed-through-corrected green fluorescence intensities (as described above) by examining two regions of interest (~0.5-1 μm 2 ) on dendrites located < 2.5 μm from the nearby HFUstimulated spines.
SNR analysis. Having multiple standard points, we used following equation to determine qualitative detection limit 35 : Where y D is signal at detection limit concentration x D , y 0 is estimate of response signal for a blank, s is estimate of residual variance. P and Q are defined as: Where t 1−α , t 1−β are the Student's t corresponding to N-2 degrees of freedom for (1−α) and (1−β) or evading error of the first kind and second kind, respectively, 36 N is the number of standards, and n is the number of measurements. Q holds if content of standard fall in the neighborhood of detection limit.
For R and λ, Where x i is the concentration of the element of the interest in the i th standard and λ i is the mean of λ i 's. As we calculated change in the intensity of fluorescence NATURE COMMUNICATIONS | https://doi.org/10.1038/s41467-018-08217-3 ARTICLE NATURE COMMUNICATIONS | (2019) 10:211 | https://doi.org/10.1038/s41467-018-08217-3 | www.nature.com/naturecommunications by subtracting basal signals, thus y 0 is 0. Background variance σ can replace the residual variance s if sample is large. Therefore, we can conclude that y D is expressed in the multiples of s, which is the SNR ratio 37 : Thus, equation (1) is now As equation (1) assumes that standards have straight line, we introduced a log concentration X i ¼ 3 þ log 10 ð2 x i Þto calculate detection limit with SNR ratio from standards, which have an exponential correlation. With our standard condition, P and Q only depends on relative ratio λ therefore changes in constants of X i does not affect the value of P and Q. Also, given that σ stays similar between experiments and thereby considered as constant, we can use the value of P+Q as threshold of detection limit in SNR ratio value, which is multiplies of s for regression. Now the equation (6) can be rewritten in SNR ratio, as follows: As log of 0 cannot be calculated, we excluded result of 0 and used 0.005 to 100, which corresponds to 1 and 5.301 in X i . With given standard condition, R is 4.301, λ is 0.554, N is 6 and the number of measurements is 10 at least. When α = β = 0.02 and the degree of freedom is 4, t = 2.999. Thus the value of P+Q is 4.446.
The standard result is calculated with a regression curve; When α = β = 0.02, the threshold SNR value is 4.446, the detection limit x D for our ddFP biosensor is 0.011 ng ml −1 and 24.946 ng ml −1 for FRET sensor (see Supplementary Fig. 5) Animal surgery and stereotactic viral injection. C57BL/6 wild-type mice (4-9 weeks, either gender, Jackson laboratory, Bar Harbor, ME, USA) were used for in vivo experiments. in accordance with protocols approved by the Max Planck Florida Institute for Neuroscience Institutional Animal Care and Use Committee and National Institutes of Health guidelines. Surgeries were performed on 4-6week-old mice. Mice were anaesthetized with an intraperitoneal injection of an anesthetic cocktail containing ketamine (80 mg/kg) and xylazine (12.5 mg/kg) (Sigma-Aldrich). Hair on a surgical area was removed with a hair remover lotion (Nair, Church & Dwight Co, Inc; Princeton, NJ, USA) and ophthalmic ointment (Puralube Vet Ophthalmic Ointment) was applied to prevent eyes from drying. Next, the animal was placed in a stereotaxic device (Kopf, Model 900 Small Animal Stereotaxic Instrument). The surgical area was scrubbed by 10% betadine solution (Purdue product LP, Stamford, CT, USA) and cleaned. Body temperature (37-38°C ) was maintained by a thermostatically controlled heating pad (Harvard Apparatus, Holliston, MA, USA). Small incision was made on the scalp. Small craniotomy (~0.5 mm in diameter) was made above the injection site (the right motor cortex, A/P: +1.5 mm, M/L: +1.2 mm from the bregma, D/V: −0.25 mm from the brain surface). A mixture of a mixture of AAV1.DJ/8.CAG.G-HRas (600 nl), AAV1.CaMKII0.4.Cre.SV40 (200 nl), and AAV1.CAG.Flex.tdTomato.WPRE.bGH (200 nl) for population imaging, or a mixture of AAV1.hSyn.GCaMP6s.WPRE. SV40 (200 nl, Penn Vector Core) and AAV1.DJ/8.CAG.R-HRas (400 nl) for calcium imaging, or a mixture of AAV1.DJ/8.CAG.G-HRas (400 nl) and AAV1.CAG. tdtomato.WPRE.SV40 (200 nl, 1:100 diluted) for dendrite imaging were used for virus injection. The viral constructs were injected via a bevelled glass micropipette (tip size 10-20 μm diameter, Braubrand) backfilled with mineral oil. Flow rate (100 nl/min) was regulated by a syringe pump (World Precision Instruments). Following virus injection, skin adhesive (3M vetbond) was applied to close the incision site. General analgesia (Buprenorphine SR, 0.05 mg/kg) was injected subcutaneously and mice were monitored until they recovered from anesthesia. After around four weeks later, mice were anesthetized and hair was removed. A scalp was removed in a circular shape, and the surface of skull was cleaned. Cranial window (3 mm diameter) was implemented on the virus injection site and a custom-made headplate was attached to the exposed skull with the dental adhesive (C&B Metabond, Parkell inc, Edgewood, NY, USA).
In vivo two-photon imaging. Mice were head-restrained on the air-supported spherical treadmill. For mice with the cranial window, imaging was conducted through the cranial window with a two-photon microscope (Bruker) with excitation at wavelengths of 920 nm (MaiTai HP DeepSee, Newport Spectra-Physics) and 1045 nm (HighQ-2, Newport Spectra-Physics) while they were freely moving on the treadmill. For mice with BDNF treatment and control groups, imaging was conducted through a small open-skull window (3 mm diameter). For the anesthetized group, mice were anaesthetized with an intraperitoneal injection of an anesthetic cocktail containing ketamine (80 mg/kg) and xylazine (12.5 mg/kg) (Sigma-Aldrich) 10 min prior to imaging. Layer 2/3 (100~300 μm deep from the surface) of motor cortex was imaged. Imaging data set was motion-corrected using a custom-written MATLAB code based on full-frame cross-correlation image alignment algorithm. Regions of interests (ROIs) were semi-manually drawn based on fluorescence intensity, size, and shape by visually inspecting movies. For calcium imaging data set, all pixels within each ROI were averaged to create a fluorescence time series, F. The time-varying baseline (F0) of a fluorescence trace was estimated by the following procedure. Preliminary baseline Fluorescence time series, Pre F0, were loess smoothed with 120 frames. Preliminary ΔF, Pre ΔF, was obtained by subtracting Pre F0 from F. Noise of Pre ΔF was estimated by subtracting loess smoothed Pre ΔF from the standard deviation of Pre ΔF. Offset of ΔF was determined by the mean of the distribution of Pre ΔF that does not exceed two times of noise. Baseline fluorescence trace, F0, was estimated by adding offset to Pre F0. ΔF/F for neuronal ROIs was obtained by subtracting F0 from F and dividing it with F0.
BDNF treatment. Human recombinant BDNF was purchased from Tocris. After 4 weeks from the virus injection, mice were anesthetized with isoflurane. A scalp was removed and the surface of skull was cleaned. A small craniotomy (3 mm diameter) was made on the virus injection site and a custom-made headplate was attached to the skull with the dental adhesive (C&B Metabond). Once they recovered from anesthesia, mice were put on the air-floating spherical treadmill and in vivo two-photon imaging was conducted with ACSF containing (in mM): 124 NaCl, 26 NaHCO 3 , 10 glucose, 3 KCl, 1.25 NaH 2 PO 4 , 2.5 CaCl 2 , and 1.3 MgSO 4 . For time-lapse two-photon imaging with BDNF application, normal ACSF was replaced with ACSF containing BDNF (2 μg ml −1 ).
Reporting summary. Further information on experimental design is available in the Nature Research Reporting Summary linked to this article.

Data availability
Supporting data of this study are available from the corresponding author on reasonable request.