A red light–responsive photoswitch for deep tissue optogenetics

Red light penetrates deep into mammalian tissues and has low phototoxicity, but few optogenetic tools that use red light have been developed. Here we present MagRed, a red light–activatable photoswitch that consists of a red light–absorbing bacterial phytochrome incorporating a mammalian endogenous chromophore, biliverdin and a photo-state-specific binder that we developed using Affibody library selection. Red light illumination triggers the binding of the two components of MagRed and the assembly of split-proteins fused to them. Using MagRed, we developed a red light–activatable Cre recombinase, which enables light-activatable DNA recombination deep in mammalian tissues. We also created red light–inducible transcriptional regulators based on CRISPR–Cas9 that enable an up to 378-fold activation (average, 135-fold induction) of multiple endogenous target genes. MagRed will facilitate optogenetic applications deep in mammalian organisms in a variety of biological research areas. A photoswitch based on a bacterial phytochrome enables optogenetic manipulations using red light.

B lue light-activatable photoswitches, such as CRY2-CIB1 (ref. 1 ), iLID-sspB 2 and the Magnet system 3 , have emerged as a powerful core technology to directly manipulate protein activity using blue light with high spatiotemporal resolution in mammalian cells 4,5 . For example, using these photoswitches to recruit functional domains to the plasma membrane or the promoter region of a gene of interest, cellular functions, such as cellular dynamics 2 , signal transduction 6 and gene expression 7,8 , can be manipulated by blue light. Beyond domain recruitment, a more robust strategy based on reassembling split-protein fragments using blue light-activatable photoswitches has been developed and widely applied in various protein classes, including nucleases 9,10 , recombinases 11,12 , proteases 13 , polymerases 14 , antibodies 15 and neurotoxins 16 . Using blue lightactivatable photoswitches to reassemble split-proteins has greatly expanded the range of optogenetically controllable molecular processes in the cell, allowing researchers to address otherwise intractable biological questions. However, blue light is easily scattered and absorbed in mammalian tissues, greatly impairing the applicability of blue light-activatable photoswitches in deep tissues 17 .
Compared to blue light, red light through the near-infrared (NIR) transparency window (650~900 nm) 18 is advantageous for optogenetic use in mammalian deep tissues due to its high tissue transparency, low invasiveness and low light scattering. Several red light-activatable photoswitches have been developed using Arabidopsis thaliana phytochrome B (PhyB) and cyanobacterial phytochrome (Cph1) and tested for optogenetic manipulation in living cells [19][20][21] . Recently, a small and highly sensitive red lightactivatable photoswitch was developed based on an engineered A. thaliana phytochrome A (ΔPhyA) 22 . However, the plant/cyanobacterial phytochrome-based photoswitches require the addition of exogenous chromophores, such as phytochromobilin and phycocyanobilin, to absorb red light and function 23 , which limits their use in mammalian systems. In contrast, bacterial phytochromes can function without exogenous chromophores by incorporating a mammalian endogenous chromophore, biliverdin (BV). One of the bacterial phytochromes, BphS, is activated by red light to convert guanylate triphosphate into cyclic diguanylate monophosphate (c-di-GMP). BphS allows for red light-inducible transcription of a target gene by using it together with additional modules, such as the c-di-GMP-responsive hybrid transactivator p65-VP64-NLS-BldD, the chimeric promoter P FRLx and YhjH phosphodiesterase 24,25 . However, the BphS-based system requiring many components is complicated, does not enable direct manipulation of protein activity and could cause adverse effects on mammalian cells from endogenous targets of c-di-GMP. Recently, a red light photoswitch based on a bacterial phytochrome from Rhodopseudomonas palustris (RpBphP1) and its binding partner has been developed 26,27 . RpBphP1 shows reversible photoconversion between a far-red light-absorbing (Pfr) dark-state and a red light-absorbing (Pr) photo-state. Upon red light illumination, RpBphP1 is converted to the Pr photo-state and forms a heterodimer with its binding partner PpsR2 or its downsized variant QPAS1, thereby being applicable to simply and directly manipulate protein activity.
Here we demonstrate that RpBphP1-PpsR2/QPAS1 has two serious weaknesses. First, although RpBphP1-PpsR2/QPAS1 is suitable for domain recruitment, these systems do not work well for split-protein reassembly, substantially limiting their use in optogenetic applications. Second, PpsR2 binds not only to the holo-protein of RpBphP1 upon red light illumination but also to its apo-protein irrespective of red light illumination. The light-independent binding of PpsR2 with the apo-protein of RpBphP1 causes spontaneous activation of the optogenetic tools in the dark condition and, thereby, greatly hampers their regulatability. These benchmarking studies show that a versatile, regulatable technology that enables optogenetic manipulation using red light remains to be developed.
To address these concerns, we present a red light-activatable, semi-synthetic photoswitch, named MagRed. MagRed is composed of a red light-absorbing, BV-binding bacterial phytochrome derived from Deinococcus radiodurans (DrBphP) and its photo-state-specific de novo synthetic binder. Compared to RpBphP1-PpsR2/QPAS1, MagRed enables split-protein reassembly with red light illumination. Using MagRed and split-Cre fragments, we developed a red light-activatable Cre recombinase, which enables DNA recombination upon red light illumination in mammalian deep tissues. Additionally, we applied MagRed to the domain recruitment strategy to develop a red light-activatable, highly efficient optogenetic gene expression system based on the CRISPR-Cas9 system, enabling high induction (up to 378-fold) of multiple user-defined endogenous gene targets. The MagRed-based optogenetic tools have robust and precise regulatability and exhibit minimal leak activity in the dark regardless of BV concentration in the cell, thereby overcoming the limitation of RpBphP1-PpsR2, which is hampered by leak activation in the dark. We also show that MagRed has reliable regulatability in terms of mutually independent ON/OFF switching using two-colored light illuminations and sustainable ON-switching even with pulsed illumination.

Development of MagRed.
To develop a red light photoswitch, we applied synthetic biological approaches to generate a photo-state-specific de novo binding partner of DrBphP, a bacterial phytochrome derived from D. radiodurans (Fig. 1a). DrBphP incorporates BV as a mammalian endogenous chromophore and reversibly photoconverts between a Pr dark-state (λ max = 701 nm) and a Pfr photo-state (λ max = 752 nm) with two-wavelength light illuminations ( Supplementary Fig. 1a). In addition to chromophore availability in mammalian cells and controllability using two-colored light illuminations, previous studies have revealed that the photosensory core module of DrBphP, hereafter referred to as DrBphP-PSM, undergoes a light-induced large conformational change between the Pr dark-state and the Pfr photo-state 28 (Supplementary Fig. 1b). The large conformational change of DrBphP is an advantage for developing its de novo synthetic binder that selectively binds to the Pfr photo-state but not to the Pr dark-state. Importantly, previous studies reported that DrBphP exhibits bi-exponential slow dark reversion kinetics with decay amplitude of 24% for 7 minutes and 76% for the following 1,291 minutes 29,30 , which is much slower than that of RpBphP1 (t 1/2 = 2.83 minutes 26 ) ( Supplementary Fig. 2). The slow dark reversion kinetics of DrBphP is beneficial for keeping it associated with the photo-state-specific binder even after turning off red light illumination, thereby sustaining the activation of optogenetic tools even by single or pulsed illumination. In contrast, RpBphP1 does not have such a sustainability due to its fast dark reversion kinetics, which diminishes the effectiveness of single/pulsed illumination protocols 26 .
To generate a binding partner of DrBphP, we applied Affibody, the Z domain of immunoglobulin-binding staphylococcal protein A. Thirteen residues in the first and second helices of Affibody were randomized to generate its ribosome-displayed library 31 (Fig. 1b). We purified the DrBphP-PSM protein and immobilized it on magnetic beads and then performed in vitro selections using the Affibody library to obtain binders for DrBphP-PSM under the 660-nm and the 760-nm light illumination conditions, respectively. After six rounds of the selections, we sequenced the cDNA library and eliminated Affibody clones detected under both the 660-nm and the 760-nm light illumination conditions. Finally, we prioritized Affibody clones with high read counts detected only under the 660-nm condition (Supplementary Table 1).
We assessed whether the top ten candidates of the prioritized Affibody clones could interact with DrBphP-PSM in mammalian cells using the tetR-tetO-based bioluminescent reporter gene (fluc/SEAP) expression system with VP16, a transcription activation domain (Fig. 1c). Of the tested clones, one Affibody clone named Aff6 displayed a high bioluminescence intensity upon red light illumination at 660 nm, which was similar to that induced by a direct fusion of tetR and VP16 (Fig. 1d,e and Supplementary Fig. 3). This result indicates that Aff6 binds to the Pfr photo-state of DrBphP-PSM with a high affinity. However, because it also showed a substantially high leakiness in the dark, its Light/Dark contrast was relatively low (1.2-fold induction). We found that the dark leak was significantly decreased by using the full-length DrBphP instead of DrBphP-PSM (Fig. 1e). However, the full-length DrBphP, hereafter referred to as just DrBphP, also produced decreased bioluminescence intensity upon red light illumination, resulting in low Light/Dark contrast (1.6-fold induction). We, thus, focused on a directed evolution of Aff6 to improve its interaction with DrBphP. First, we introduced individual alanine substitutions into the randomizable 12 residues of Aff6. V18A substitution of Aff6 did not significantly alter the bioluminescence intensity compared to the wild-type, whereas the other substitutions remarkably decreased bioluminescence intensity ( Supplementary Fig. 4). We conducted saturation mutagenesis at the V18 residue in Aff6 and found that V18F, V18W and V18H mutations significantly improved the Light/Dark contrast compared to the original Aff6 (Fig. 1d,e and Supplementary Fig.  5). Truncation of the N-terminal unstructured three residues from Aff6_V18F further enhanced the Light/Dark contrast (8.3-fold induction with 67% activity of tetR-VP16) (Fig. 1d,e), even though no significant change in the expression level was observed from the N-terminal truncation ( Supplementary Fig. 6). We named the pair of DrBphP and Aff6_V18FΔN 'MagRed' .
Photoswitching property of MagRed. To investigate the photoswitching property of MagRed, the dissociation constants (K D ) of MagRed under 660-nm illumination and dark conditions were biochemically determined using a quartz crystal microbalance with dissipation monitoring (QCM-D). We found that the K D under the 660-nm and dark conditions were 3.1 × 10 -7 M and 1.5 × 10 -5 M, respectively (Supplementary Fig. 7 and Supplementary Table 2). In addition, we also found that the rate constants of association (k on ) and dissociation (k off ) of MagRed under the 660-nm illumination conditions were 4.9-fold faster and 12-fold slower than those under the dark condition, respectively (Supplementary Table 2). To further characterize MagRed in mammalian cells, we performed a bioluminescence assay using a split-firefly luciferase (split-fluc) 32 (Fig. 2a,b). In HEK293T cells expressing MagRed-fused split-fluc, repeated association and dissociation of MagRed was feasible using the 660-nm and the 800-nm pulsed illuminations (Fig. 2c). We also confirmed that the bioluminescence activity of full-length fluc as a control was almost unchanged by the 660-nm and 800-nm illuminations ( Supplementary Fig. 8). These results demonstrate that the two-colored pulsed illuminations can independently and repeatedly control the association (switch-ON) and the dissociation (switch-OFF) of MagRed. Next, we measured the dissociation kinetics of MagRed in living cells. After the 660-nm illumination was turned off, MagRed-fused split-fluc maintained its bioluminescence with approximately 70% of the maximum intensity, after 21% decrease for the first 10 minutes (Fig. 2d). We also found that the biphasic slow decrease in the bioluminescence signal of MagRed-fused split-fluc is correlated with the bi-exponential slow dark reversion kinetics of DrBphP ( Supplementary Fig. 9), showing that the slow dark reversion kinetics of DrBphP is an essential factor for developing MagRed with a highly stable controllability. Using full-length fluc as a control, we also confirmed that the consumption of d-luciferin can be ignored for the bioluminescence measurement ( Supplementary Fig. 10).
Red light-activatable transcription system. To investigate the suitability of MagRed to domain recruitment applications, we applied MagRed to the CRISPR-Cas9-based photoactivatable transcription system (CPTS) 7,8 . In this system, MagRed plays a role in the red light-dependent recruitment of transcription activation domains, p65 and HSF1, to target loci, harboring inactive Cas9 (dCas9), single-guide RNA (sgRNA)-bearing MS2 RNA aptamer and MS2 coat protein (Fig. 3a). We designed all configurations for the CPTS and examined their transcription activities using a luciferase reporter in HEK293T cells (Fig. 3b). In addition, we also tested the existing red light photoswitches RpBphP1-PpsR2/QPAS1 in the CPTS as benchmark experiments to compare with MagRed. Most of the configurations for CPTS using MagRed showed significantly high Light/Dark contrasts, which were up to 70-fold induction ( Fig. 3b-d and Supplementary Fig. 11a). On the other hand, all the configurations for CPTS using RpBphP1-PpsR2/QPAS1 showed much lower Light/Dark contrasts, maximizing at a 4.4-fold induction ( Fig. 3b-d and Supplementary Fig. 11b,c). We found that the low Light/Dark contrasts of RpBphP1-PpsR2/QPAS1-based CPTS were attributable to their high leak activities in the dark ( Supplementary Fig. 11b,c). These results demonstrate that MagRed can control domain recruitment more precisely and dynamically than RpBphP1-PpsR2/QPAS1 in CPTS.
To examine why RpBphP1-PpsR2/QPAS1-based CPTS shows high leak activity in the dark, we assessed the effect of BV concentration on its transcription activity. We found that the addition of excess BV decreased the dark leak activity of CPTS based on RpBphP1-PpsR2/QPAS1 (P = 0.00781; Extended Data Fig. 1a,b). Following this result, we hypothesized that the apo-protein of RpBphP1, which is not yet incorporated with BV, could cause the high leak activation of RpBphP1-PpsR2/QPAS1-based CPTS in the dark. To examine the effect of the apo-protein of RpBphP1 on the transcription activity, we generated mutants of RpBphP1, in which the cysteine residues covalently bound to BV were substituted to alanine (C20A) and serine (C20S), respectively. These mutants that mimic the apo-protein of RpBphP1 exhibited high transcription activities regardless of red light illumination (Fig. 3e). The results indicate that PpsR2 binds not only to the holo-protein of RpBphP1 upon red light illumination but also to its apo-protein irrespective of red light illumination, thereby causing the leak activation of RpBphP1-PpsR2/QPAS1-based CPTS in the dark. In contrast, MagRed-based CPTS exhibited little leak activity in the dark even without additional BV supplementation (P = 0.250; Extended Data Fig. 1c). Additionally, analogous mutations into DrBphP (C24A and C24S) completely eliminated the red light-dependent transcription activity of MagRed-based CPTS, even though these mutants are expressed at a similar level to the wild-type DrBphP ( Fig. 3f and Supplementary Fig. 12). The results demonstrate that Aff6_V18FΔN does not bind to the apo-protein of DrBphP, leading to the minimal leak activation of MagRed-based optogenetic tools in the dark.
Of the tested configurations for MagRed-based CPTS (Fig. 3c), we focused on configurations 1 and 3. Additionally, taking advantage of the small size of Aff6_V18FΔN (6.2 kDa), we designed tandem fusions of Aff6_V18FΔN to enhance its apparent affinity with DrBphP. The tandem dimer of Aff6_V18FΔN substantially enhanced the transcription activity of CPTS upon red light illumination without increasing the leak activity in the dark in both configurations 1 and 3 (Fig. 4a  . c, Schematic diagram of the tetR-tetO-based gene expression system using DrBphP and its Pfr photo-state-specific binding partner. Upon 660-nm light illumination, a binding partner candidate fused with VP16 and NLS binds to the photoproduct of tetR-DrBphP anchored on the tetO element, thus activating transcription of the reporter fluc (NLS, nuclear localization signal; fluc, firefly luciferase; SEAP, secreted alkaline phosphatase; P min , minimal cytomegalovirus promoter). d, Alignment of N-terminal amino acid sequence from Aff6 variants. The 13 residues diversified in the initial library are highlighted with red color, and the residues altered from Aff6 are marked in cyan color. e, Bioluminescence intensity in HeLa cells transfected with different transcription activators and a bioluminescence reporter plasmid. PSM, DrBphP-PSM; Full length, full-length DrBphP; V18F; Aff6_V18F, V18FΔN; Aff6_V18FΔN. P values are indicated above the bars. (NS, not significant P > 0.05; *P < 0.05; **P < 0.01; ****P < 0.0001; dark versus light using two-tailed unpaired t-test, from three biologically independent samples, mean ± s.d.). a.u., arbitrary units.
in an especially enhanced Light/Dark contrast (619-fold induction). Although we also tested configuration 3 with the tandem trimer and tetramer of Aff6_V18FΔN, the trimer and tetramer constructs did not exhibit further enhancement of transcription activity (Fig. 4a). Therefore, we concluded that configuration 3, with the tandem dimer of Aff6_V18FΔN, was the best version of MagRed-based CPTS, called 'Red-CPTS' . We confirmed that Red-CPTS works robustly in various mammalian cell lines ( Supplementary Fig. 13). The time course of red light-dependent reporter gene expression shows that the transcription by Red-CPTS reaches its maximum 24 hours after the initiation of red light illumination and that only 1 hour of red light illumination can efficiently activate the reporter gene (~9.3-fold induction) using Red-CPTS ( Supplementary Fig. 14).
Next, we applied Red-CPTS to multiple endogenous genes by simultaneously delivering four sgRNAs separately targeting human gene promoters, as exemplified for ASCL1, HBG1, IL1R2 and MYOD1. Upon red light illumination, Red-CPTS significantly increased all the targeted gene transcriptions up to 378-fold with high Light/Dark contrasts (Fig. 4b). Notably, in all the targeted endogenous genes, each mRNA level of Red-CPTS-transfected cells in the dark was similar to those of mock-transfected cells (Fig. 4b), demonstrating that Red-CPTS has no obvious leak activity in the dark and, thereby, enables for robust regulation of multiplexed user-defined endogenous gene activation using red light illumination. Additionally, we also tested whether the 800-nm deactivation control could be applied to Red-CPTS using sgRNA targeting the human ASCL1 promoter. After the pre-activation of Red-CPTS by the 660-nm illumination for 12 hours, the cells were illuminated at 800 nm. We found that the ASCL1 mRNA level was decreased by the 800-nm illumination, which is significantly faster than the decrease in the dark conditions, and reached a minimum level in 1.5 hours (Extended Data Fig. 2). This result indicates that 800-nm light illumination can be used to actively switch Red-CPTS back from the activated state to the inactivated state. We also confirmed that the 800-nm light illumination has only minimal effect on the Red-CPTS activation ( Supplementary Fig. 15), showing that the 800-nm deactivation light illumination can independently be used with the 660-nm activation light illumination.
Next, we investigated the relationship between the photoswitching efficiency of MagRed and various illumination conditions using Red-CPTS and found that the transcription activity of Red-CPTS reached a plateau at 1.0 W m −2 of red light illumination (Extended Data Fig. 3a,d). We also found that the transcription activity of Red-CPTS can be finely tuned by changing the duration of red light illumination ON time (Extended Data Fig. 4) and OFF time (Extended Data Fig. 5). The illumination cycle consisting of 1 minute of 660-nm light, followed by 4 minutes in dark, maximumly increased reporter gene expression with a 1,283-fold Light/Dark contrast (Extended Data Fig. 4a,d). Furthermore, transcription activity of Red-CPTS reached a plateau using the illumination cycle consisting of 1 minute of 660-nm light, followed by 9 minutes in dark (Extended Data Fig. 5a,d). As the comparison with Red-CPTS, we also tested the RpBphP1-PpsR2/QPAS1-based CPTS under various illumination conditions, because the illumination conditions under which the contrast between light and dark is maximized are likely to be different between DrBphP and RpBphP1 due to their different rates of dark reversion kinetics ( Supplementary Fig. 2). However, due to the significantly high dark leakiness, the Light/Dark contrasts of RpBphP1-PpsR2/QPAS1-based CPTS were not improved in any of the tested light illumination conditions (Extended Data Figs. [3][4][5]. Red light-activatable DNA recombination system. In addition to the domain recruitment strategy applied to CPTS, next we examined whether MagRed can be applied to the split-protein reassembly with red light illumination. Of the existing optogenetic tools based on the split-protein reassembly system with blue light-activatable photoswitches, site-specific DNA recombinase is one of the most attractive targets 11,12,[33][34][35] . Principally, Cre recombinase is the most widely used DNA recombinase in biology, biotechnology and biomedical studies [36][37][38][39] . We fused MagRed to split-Cre fragments to develop a red light-activatable Cre recombinase applicable in mammalian systems (Fig. 5a). To test all configurations, we fused either DrBphP or Aff6_V18FΔN to the newly created N-and C-terminal ends of split-Cre fragments (CreN and CreC) as well as the original N-terminal end of CreN (Fig. 5b). We also tested two split positions (CreN59/CreC60 and CreN104/CreC106) for the split-Cre fragments. DNA recombination activities were examined using a Floxed-STOP fluc reporter in HEK293T cells ( Supplementary  Fig. 16a). Most of the configurations using MagRed and split-Cre exhibited red light-dependent DNA recombination with significant Light/Dark contrasts (Fig. 5b-d and Supplementary Fig. 17a). Of the tested configurations, NLS-CreN104-Aff6_V18FΔN and NLS-DrBphP-CreC106 (configuration 1) gave the highest Light/ Dark contrast (31-fold induction). This MagRed-based red lightactivatable Cre recombinase was named 'RedPA-Cre' . We confirmed that additional BV supplementation did not have significant effect on the DNA recombination activity of RedPA-Cre ( Supplementary  Fig. 18), revealing that RedPA-Cre works robustly at the endogenous BV concentration of living mammalian cells as Red-CPTS does.
We also tested RpBphP1-PpsR2/QPAS1 for the split-protein reassembly strategy with split-Cre and compared their DNA recombination activities with the MagRed version. Compared to MagRed, RpBphP1-PpsR2/QPAS1 displayed much lower Light/Dark contrasts in all the tested configurations fused with split-Cre despite additional BV supplementation for eliminating the apo-protein of RpBphP1 (Fig. 5b-d and Supplementary Fig. 17b,c). During RedPA-Cre development, new red light-inducible dimerization systems, composed of DrBphP-PSM and its nanobody-based binding partner LDB-3 or LDB-14, named nanoReD system (nanoReD1 and nanoReD2, respectively), were reported 40 . We also examined whether nanoReD systems could be applied to the split-protein reassembly with split-Cre. We found that nanoReD systems also showed much lower Light/Dark contrasts in bioluminescence intensity under any configurations with split-Cre as RpBphP1-PpsR2/QPAS1 did (Fig. 5b-d and Supplementary Fig. 17d,e). The results reveal that MagRed enables split-protein reassembly with split-Cre for the development of a red light-activatable Cre recombinase, which is not achieved by RpBphP1-PpsR2/QPAS1 and nanoReD systems. As a benchmark study, we also compared RedPA-Cre with existing red light-responsive Cre recombinases, CreLite 41 and L-SCRaMbLE (Light-Cre1 and Light-Cre2) 42 , which are based on PhyB, and the FISC system 24 , which is based on BV-binding BphS, and found that RedPA-Cre outperformed these previously reported red light-dependent DNA recombination systems as well (Extended Data Fig. 6). We tested various illumination conditions for the activation of RedPA-Cre using a Floxed-STOP fluc reporter. We found that all the tested different durations of red light illumination evoked significant bioluminescence induced by the DNA recombination (Extended Data Fig. 7). Red light illumination for only 30 seconds could induce DNA recombination with 38% efficiency of that induced by continuous red light illumination for 24 hours, indicating that RedPA-Cre can be efficiently activated by red light illumination for even short periods of illumination time. This appears to be due to the characteristic of RedPA-Cre, which maintains its DNA recombination activity even after turning off red light illumination because of the slow dark reversion kinetics of DrBphP in MagRed. To compare the DNA recombination activity of RedPA-Cre with that of full-length Cre (iCre), we labeled the NLS-CreN104-Aff6_V18FΔN fragment of RedPA-Cre with the fluorescent protein Venus and then assessed its red light-inducible activity using a Floxed-STOP mCherry reporter (Supplementary Fig. 16b). Upon red light illumination for 24 hours, RedPA-Cre induced mCherry fluorescence with 55% efficiency of that induced by iCre (Fig. 5e).
Next, we examined whether RedPA-Cre could be applied to bicistronic designs. RedPA-Cre was able to be concatenated via an internal ribosome entry site (IRES) without compromising the red light-dependent DNA recombination and the low leak activity in the dark (Supplementary Fig. 19). As well as the case of Red-CPTS, the bicistronic RedPA-Cre had little responsiveness to the 800-nm light illumination (Extended Data Fig. 8). The bicistronic RedPA-Cre was further validated in vivo in living mice through intrahepatic gene delivery along with a Floxed-STOP fluc reporter. We found that the exposure of the mice to red light illumination at 660 nm from the ventral side induced marked bioluminescence signals by the DNA recombination reaction in their livers (P = 0.011 from n = 3 mice per group; Fig. 5f, Extended Data Fig. 9 and Supplementary Fig. 20). As observed in cultured cells in vitro, RedPA-Cre did not need additional BV supplementation to function in the liver of living mice. We also observed that the mice with RedPA-Cre exhibited little DNA recombination activity when kept in the dark. These results demonstrate that RedPA-Cre can efficiently induce DNA recombination in an internal organ in living mice even using external and non-invasive red light illumination. Additionally, we also revealed that Red-CPTS can be used to induce a red light-dependent gene transcription activation in vivo in living mice without additional BV supplementation (Extended Data Fig. 10 and Supplementary Fig.  20). Collectively, we confirm that MagRed-based optogenetic tools are functional and exhibit precise regulatability in vivo.

Discussion
After demonstration of optogenetic control of neurons with microbial opsins 43 , blue light-activatable photoswitches emerged as a core technology to control various protein activities and have facilitated biological applications in a variety of research fields beyond neuroscience. In the next generation of optogenetics, several red light-activatable photoswitches were developed as a core technology to optogenetically manipulate protein activities through the NIR transparency window. However, such a core technology with high versatility and regulatability for enabling the optogenetic manipulation using red light remains elusive, as demonstrated in this study. The lack of a powerful and useful technology is a major bottleneck hindering the development of red light optogenetic tools. To establish a better red light optogenetic technology, we applied synthetic biological approaches to develop a red light photoswitch named MagRed. MagRed can directly manipulate protein activity using red light with high spatiotemporal resolution, having two major advantages among the existing red light photoswitches in terms of versatility and regulatability.
Compared to RpBphP1-PpsR2/QPAS1 and nanoReD systems, MagRed has high versatility that enables for the split-protein reassembly with red light illumination. Based on MagRed and split-Cre, we developed RedPA-Cre, a red light-activatable Cre recombinase, allowing us to induce DNA recombination upon red light illumination in mammalian deep tissues, such as livers. In addition to split-Cre, we also applied MagRed to optical control of firefly luciferase based on split-fluc reassembly, demonstrating that MagRed is generally applicable to split-protein reassembly regardless of protein functions, sizes and structures. Split-proteins can be designed for every class of proteins in principle, and this has gained increased interest recently as computational approaches continue to identify new split positions in a diverse array of proteins 44,45 . These computational approaches to designing split-proteins and the present MagRed technology synergistically work to expand the range of optogenetic applications in mammalian deep tissues. In addition to its versatility, MagRed has high regulatability and shows only minimal leak activation in the dark, as opposed to RpBphP1-PpsR2/QPAS1. For an optogenetic tool, the leakage of protein activity in the dark is the most serious and unacceptable shortcoming because it causes unintentional protein function before light stimulation, which impairs the accuracy of optogenetic control and leads to misinterpretation 35 . MagRed offers tight regulatability, thereby enabling more precise optogenetic manipulation of protein activities. In addition, MagRed also has useful regulatability that can repeatedly control its association and dissociation by the 660-nm and 800-nm pulsed illuminations and can maintain the association form for a long period even after turning off the red light illumination. This regulatability of MagRed, derived from preferable switching properties of DrBphP, enables mutually independent ON/ OFF switching with two-colored light illuminations and sustainable ON-switching even with pulsed illumination. Taking advantage of the useful regulatability of MagRed, we can manipulate protein activity more flexibly than with other existing tools. For example, we can terminate optogenetic manipulation at any time we intend. Additionally, we can reduce phototoxicity on biological samples using pulsed red light illuminations. Notably, these advantages can be obtained without additional chromophore supplementation. Overall, among the existing photoswitches, its high versatility and regulatability makes MagRed a unique optogenetic core technology.
Using MagRed, we developed RedPA-Cre and Red-CPTS for red light optogenetics. RedPA-Cre can efficiently induce DNA recombination with red light illumination, which is the first report on the red light-activatable site-specific DNA recombinase based on split-protein reassembly, which works in mammalian systems. The Cre-loxP system is widely used for gene insertion, deletion, inversion or cassette exchange in various animal models. Combined with current recombinase-based biological tools, such as cell lineage tracing 46,47 , genetic circuits 48,49 and gene knock-out 35 and knock-in 50 analysis, RedPA-Cre with high spatiotemporal controllability could address more complicated biological questions and pathophysiological mechanisms for various diseases. Another MagRed-based optogenetic tool, Red-CPTS, enables activating the expression of multiplexed user-defined endogenous genes using red light illumination. In addition to transcription control, the Red-CPTS platform will also be extended to optogenetic control of other CRISPR applications based on the recruitment of effectors such as epigenetic modifications 51 and base editing 52 in mammalian deep tissues.
In conclusion, MagRed has the potential to regulate various cellular functions in a much more comprehensive range of biological samples, such as living cells, mammalian deep tissues and whole animals. The remarkable features of MagRed are valuable to synergistically expand the optogenetic toolbox in the long-wavelength region, thereby opening new avenues in the field of optogenetics using red light.

Online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/ s41587-022-01351-w.

Methods
Cloning. All plasmids in this study are listed in Supplementary Table 3. Complete cDNA sequences of these plasmids, except for gifted and commercially available plasmids, are denoted in Supplementary Note. All constructs for RedPA-Cre and Red-CPTS were cloned into the pcDNA3.1 or pcDNA3.1/V5-His vector (Invitrogen). All constructs for tetR-tetO system were cloned into the pSV40 vector, gifted from Wilfried Weber. All constructs encoding sgRNAs were cloned into the pSPgRNA vector (Addgene, 47108).
Polymerase chain reaction (PCR) was performed using PrimeSTAR DNA Polymerase (Takara Bio). Vectors and PCR fragments were ligated by Ligation high Ver.2 (Toyobo) or In-Fusion HD Cloning Kit (Takara Bio). Ligated plasmids were introduced into Mach1 competent cell (Invitrogen).
Absorption spectra measurements of DrBphP and RpBphP1. DrBphP and RpBphP1 proteins were expressed in Escherichia coli C41 containing the bilin biosynthetic plasmid pKT270 (ref. 54 ) in 1 L of LB media. The cells were harvested in a lysis buffer (20 mM HEPES-NaOH, pH 7.5, 0.1 M NaCl and 10% (w/v) glycerol) using an Emulsiflex C5 high-pressure homogenizer at 12,000 p.s.i. (Avestin). Homogenates were centrifuged at 165,000g for 30 minutes, and supernatants were filtered through a 0.8-µm cellulose acetate membrane. Filtrated samples were loaded onto a nickel-affinity His-trap column using ÄKTAprime plus (GE Healthcare). The column was washed using the lysis buffer containing 50 mM and 100 mM imidazole, followed by elution using a linear gradient of the lysis buffer containing 100-400 mM imidazole (1 ml min −1 , total 15 minutes). After incubation with 1 mM EDTA for 1 hour on ice, the purified proteins were dialyzed against the lysis buffer to remove EDTA and imidazole. Purified protein concentration was determined by the Bradford method.
UV-Vis absorption spectra of DrBphP and RpBphP1 were recorded with a UV-2600 spectrophotometer controlled by UVProbe version 2.43 (Shimadzu) at 37 °C. An Opto-Spectrum Generator (Hamamatsu Photonics) was used for generating 700-nm or 660-nm light for the photoconversion from Pr dark-state to Pfr photo-state of DrBphP and 760-nm light for the photoconversion from Pfr dark-state to Pr phot-state of RpBphP1. The dark reversion kinetics of DrBphP and RpBphP1 were recorded at 700 nm and 760 nm, respectively. Table 4. Affibody library was constructed by three-step PCR, followed by ligation with sequence elements required for ribosome display. dsDNA encoding the first and second helices of the Affibody was assembled by annealing and enzymatically extending primers O1 and O2 with complementary 3′ ends. Codon NNK (N = G, A, C, T; K = G, T) was used to encode randomized residues. Next, the third helix was appended by overlap extension PCR using primers O3 and O4 and the first reaction product as a template. In the third PCR, the resultant dsDNA encoding the Affibody library was amplified by PCR using primers O5 and O6 with the T7 promoter. In parallel, a genetic element including SecM elongation arrest sequence (AKFSTPVWISQAQGIRAGPQRLT) was amplified by PCR using primers O7 and O8 and pDgIIISecM-PURF1 as a template. These two fragments were digested with Type IIS restriction enzyme BsmBI (New England Biolabs), followed by ligation of each fragment using Ligation high Ver.2. To avoid overamplification and error in PCR, KOD -Multi & Epi-DNA polymerase (Toyobo) was used. We set the cycle number of each PCR step to no more than five cycles. The ligation product was separated by gel electrophoresis and purified with PureLink PCR Purification Kit (Invitrogen).

Affibody ribosome display library construction. Oligonucleotides used for library construction are listed in Supplementary
Ribosome display. cDNA encoding DrBphP-PSM was cloned into the pColdI vector (Takara Bio) containing N-terminal His6 tag, followed by an Avi tag. E. coli C41(DE3) strain (Lucigen) harboring pKT270 was transformed with pColdI-Avi-DrBphP-PSM. The cells were grown at 37 °C with shaking at 200 r.p.m. to an OD 590 = 0.45 in 30 ml of LB media with ampicillin (100 mg ml −1 ) and chloramphenicol (30 mg ml −1 ). The culture was cooled to room temperature.
Isopropyl-β-d-thiogalactoside (IPTG, Wako) and BV (Frontier Scientific) were added to the culture in final concentrations of 0.5 mM and 100 μM, respectively. The cells were cultured for 48 hours at 16 °C in the dark for protein expression. The cells were collected by centrifugation and lysed with 2 ml of B-PER reagent (Thermo Fisher Scientific) containing 0.2 mg of lysozyme (Wako), 10 U of DNase I (Thermo Fisher Scientific) and protease inhibitor cocktail (Sigma-Aldrich) for 10 minutes at room temperature. The crude soluble extract was purified using a HisTrap FF column (GE Healthcare). Biotinylation of DrBphP-PSM was performed using a BirA enzyme (BirA500, Avidity).
The ribosome-protein fusion libraries were generated with the PURE system. The standard PURE translation mixture was prepared as described previously 55 . In vitro transcription and translation reaction was performed at 37 °C for 60 minutes, followed by stopping the reaction with 100 μl of TBS-Mg 2+ buffer (50 mM Tris-HCl, 50 mM MgCl 2 and 150 mM NaCl, pH 7.5). Meanwhile, 30-μl volumes of streptavidin magnetic beads (Dynabeads M-280 Streptavidin, Invitrogen) were washed once with 200 μl TBS-Mg 2+ buffer. Biotinylated DrBphP-PSM was added to the washed beads and incubated at 4 °C for 30 minutes with gentle rotation. The beads were then washed once with 200 ml of TBS-Mg 2+ buffer, followed by the addition of diluted reaction mixture. Hereafter, the mixtures were placed under either 660-nm or 760-nm light condition to allow for DrBphP-PSM to adopt its Pfr photo-state or Pr dark-dark state conformations, respectively. After 45-minute incubation at room temperature with gentle rotation, the beads were washed twice with 200 μl of TBS-Mg 2+ buffer. To recover the enriched ribosome-protein fusion, 200 μl of elution buffer (TBS buffer + 50 mM EDTA) was added to the beads and incubated for 30 minutes with gentle rotation. The eluted solution was subjected to standard phenol-chloroform extraction and isopropanol precipitation to remove protein components. Purified RNAs were subjected to reverse transcription using primers O8 with SuperScript III (Thermo Fisher Scientific), and the enriched cDNA library was regenerated by PCR using primers O5 and O8 with KOD -Multi & Epi-DNA polymerase. After six rounds of selections, the enriched DNA library was sequenced on an Illumina MiSeq machine using the MiSeq Reagent Kit version 3 (150 cycles, 130 bp and 45 bp, paired-end).
Deep sequencing analysis. Only R1 reads of the paired-end reads were subjected to subsequent analysis. Analysis of the sequences was performed using custom Python scripts (Python 2.7). The sequences were filtered according to Phred quality scores (Q): reads were disregarded if more than half of the base calls were below Q20, and base calls with a quality score below Q20 were converted to N. For further quality assessment, sequences were searched for the two exact sequences at the constant region of an Affibody. It was assessed if the length between those two sites contained exactly 122 nucleotides. The sequences with expected length were considered to have a complete Affibody. Finally, we selected Affibody sequences that were enriched under 660-nm condition but not detectable under 760-nm condition.
Light source. Except for split-fluc reassembly assay, light illumination was performed inside a CO 2 incubator using pre-assembled LED arrays (CCS). A regulated DC power supply (Kikusui Electronics) was used to control LED current flow. Temporal illumination pattern was generated by an Arduino mega microcontroller board.
TetR-tetO-based gene expression system using luciferase reporter. HeLa cells were plated at 1.0 × 10 4 cells per well in a 96-well black-wall plate (Greiner) and cultured for 24 hours. The cells were transfected with Lipofectamine 3000 reagent (Invitrogen). Plasmids encoding VP16-NLS, tetR and firefly luciferase reporter or SEAP reporter were transfected at a 1:1:1 ratio. The total amount of DNA was 0.1 μg per well. As a mock-control Aff6-VP16-NLS (−) condition, the Aff6 moiety of Aff6-VP16-NLS was replaced with irrelevant Affibody Zdk1 (ref. 56 ). Twenty-four hours after transfection, the sample was added with 100 μl of fresh media and incubated under 660-nm pulsed light illumination (1 W m −2 ) that is repeatedly switching on for 1 minute and then turning off for 4 minutes. For dark condition, the sample was wrapped in aluminum foil during incubation. After incubation for 24 hours, the culture medium was replaced with 100 μl of HBSS (Gibco) containing 500 μM d-luciferin (Wako). After incubation for 30 minutes at room temperature, bioluminescence measurements were performed with a Centro XS3 LB 960 plate-reading luminometer (Berthold Technologies) using MikroWin 2000 software. When the SEAP reporter plasmid was used, supernatants of the illuminated cells were subjected to SEAP Reporter Gene Assay (Roche Diagnostics).

Biochemical characterization using QCM-D. Dissociation constant (K D ) of MagRed was measured with a QCM-D instrument qCell T (3T analytik).
His-Avi-DrBphP and His-Aff6_V18FΔN-3×FLAG proteins were expressed and purified as described above, except that these were further purified by size-exclusion chromatography (ÄKTAprime plus). His-Avi-DrBphP was biotinylated using the BirA enzyme. QCM sensor chips were cleaned for 60 seconds using a vacuum plasma apparatus (YHS-R, Sakigake Semiconductor). The cleaned senser chips were biotinylated with a biotin-SAM formation reagent (Dojindo Laboratories) in ethanol for 1 hour. The biotinylated sensor chips were then rinsed with MilliQ for three times, dried with air flow and immersed in PBS (−) containing 1 mg ml −1 of streptavidin for 1 hour. The streptavidin-coated sensor chips were rinsed by gentle shaking for 5 minutes with PBS (−) for three times and incubated with 10 μM biotinylated His-Avi-DrBphP in PBS (−) for 1 hour at room temperature to prepare DrBphP-coated QCM sensor chips. The sensor chips were rinsed by gentle shaking for 5 minutes with PBS (−) for four times and then attached to the QCM-D device. Stable baseline of the resonance frequency was monitored by flowing PBS (−) at a flow rate of 60 μl min −1 . Because DrBphP could be unintentionally activated by ambient light in the experimental processes described above, such as bacterial expression, purification, biotinylation and fixation of the QCM sensor chip, we illuminated DrBphP on the sensor chip at 800 nm (5 W m −2 ) for 5 minutes to switch the activated DrBphP back to dark-state, according to the reference 30 . DrBphP on the sensor chip was then illuminated at 660 nm (2 W m −2 ) or kept in the dark for 5 minutes. The sample solutions containing 5 μM and 10 μM of His-Aff6V18FΔN-3×FLAG in PBS (−) were introduced into the QCM device at a flow rate of 60 μl min −1 for 10 minutes in the presence of 660-nm illumination (2 W m −2 ) or in the dark to measure the adsorption of His-Aff6V18FΔN-3×FLAG to the DrBphP-coated sensor chips. By analyzing the adsorption curves measured at the two different concentrations using a software qGraph Viewer (3T analytik), we determine the K D , k on and k off of MagRed in both photo-state and dark-state, according to the manufacturer's protocol and the related reference 57 .
Split-fluc reassembly assay. HEK293T cells were plated in the presence of 25 μM BV at 4.0 × 10 5 cells in a 35-mm culture dish (Iwaki Glass) and cultured for 24 hours. Plasmids encoding Nfluc-DrBphP and 3×FLAG-Aff6_V18FΔN-Cfluc were transfected at a 1:1 ratio. The total amount of DNA was 2.5 μg per dish. In case of full-length fluc as a control, the amount of DNA was 0.0025 μg per dish. Twenty-four hours after transfection, the culture medium was replaced with 2 ml of HBSS with 200 μM d-luciferin. After incubation for 30 minutes at room temperature, the sample was illuminated at 800 nm (50 W m −2 ) for 5 minutes to achieve photoconversion of DrBphP from Pfr photo-state to Pr dark-state. Bioluminescence measurement was performed using a GloMax 20/20 Luminometer (Promega). The bioluminescence signals were integrated over 1 second and plotted every 1 second. We then illuminated the sample dish at 660 nm (10 W m −2 ) for 1 minute and performed the bioluminescence measurement.
Luciferase reporter assay for CPTS design. HEK293T and Neuro 2a cells were plated at 2.0 × 10 4 cells per well, and HeLa cells were plated at 1.0 × 10 4 cells per well, in a 96-well black-wall plate. The cells were cultured for 24 hours. Plasmids encoding NLS-dCas9-NLS, MS2, p65-HSF1, sgRNA and luciferase reporter were transfected at a 1:1:1:1:1 ratio. The total amount of DNA was 0.1 μg per well. Procedures for light illumination of the MagRed system and bioluminescence detection were identical to those described above. For RpBphP1-PpsR2/QPAS1 systems, the red light-illuminated samples were incubated under 760-nm pulsed light (1 minute ON and 4 minutes OFF) of 10 W m −2 . To study the illumination intensity dependence of the Light/Dark contrasts, we generated the tested illumination intensities by regulating LED array current flow using a regulated DC power supply (Kikusui Electronics). To study the dependence of the Light/Dark contrast on the duration of ON time and OFF time of 660-nm illumination, we generated the tested illumination patterns using an Arduino mega microcontroller board. For BV (+) condition, cells were plated in the presence of 25 μM BV. Twenty-four hours after the transfection, the samples were added with 100 μl of fresh media supplemented with 25 μM BV.

Endogenous gene activation by Red-CPTS.
The procedures for plating and transfection were identical to those described above, except for using a mixture of sgRNAs separately targeting four endogenous genes. Forty-eight hours after transfection, total RNA extraction and reverse transcription PCR were performed using CellAmp Direct RNA Prep Kit (Takara Bio) with Superscript IV VILO Master Mix (Thermo Fisher Scientific). Quantitative PCR was performed by the StepOnePlus system (Thermo Fisher Scientific) using TaqMan Gene Expression Master Mix (Thermo Fisher Scientific). TaqMan primers and probes were used to quantify the expression level of the target gene, and the GAPDH gene was measured as endogenous control (Life Technologies; TaqMan Gene Expression Assay IDs are as follows: ASCL1: Hs04187546_g1; IL1R2: Hs01030384_m1; HBG1: Hs00361131_g1; MYOD1: Hs02330075_g1; GAPDH: Hs99999905_m1). The ΔΔCt method was applied to show each relative mRNA level to that from non-transfected HEK293T cells as a negative control.
For deactivation of Red-CPTS at 800 nm, the cells were illuminated with 660-nm pulsed light (1 minute ON and 4 minutes OFF) of 1 W m −2 for 12 hours to pre-activate Red-CPTS. The cells were incubated under the 660-nm pulsed illumination condition or switched to the dark condition or the 800-nm pulsed illumination condition (1 minute ON and 4 minutes OFF) of 10 W m −2 .
For Supplementary Fig. 13, HEK293T cells were transiently transfected with plasmids encoding cysteine-eliminated mutants of DrBphP. Twenty-four hours after transfection, the cells were lysed as described above. The cell extracts were adjusted to the same amount of total cellular protein (5 μg) and electrophoresed in a 10% polyacrylamide gel. After electrophoretic transfer to a nitrocellulose membrane and its blocking, the membrane was cleaved between 50 kDa and 75 kDa to probe low-molecular-weight and high-molecular-weight proteins separately with different antibodies. The high-molecular-weight proteins membrane was analyzed by anti-V5-tag antibody conjugated with HRP (Invitrogen, cat. no. R961-25, 1:5,000 dilution) to probe DrBphP-p65-HSF1-V5-His, DrBphP_C24A-p65-HSF1-V5-His and DrBphP_C24S-p65-HSF1-V5-His. The low-molecular-weight proteins membrane was analyzed by anti-GAPDH antibody conjugated with HRP (Santa Cruz Biotechnology, cat. no. sc-365062, 1:1,000) as a loading control. Fluorescence reporter assay for RedPA-Cre. HEK293T cells were plated at 0.8 × 10 5 cells per well in a 24-well plate. Plasmids encoding NLS-CreN104-Aff6_ V18FΔN-Venus, NLS-DrBphP (FL)-CreC106 and fluorescence reporter were transfected at a 1:1:8 ratio. The total amount of DNA was 0.5 μg per well. After incubation for 24 hours in the presence or the absence of 660-nm pulsed illumination, cells were fixed with 4% paraformaldehyde in PBS (Wako) for 15 minutes, followed by blocking and permeabilization with incubation in blocking solution (5% BSA, 0.3% Triton X-100 in PBS) for 1 hour. Then, cells were immunostained with rat anti-mCherry antibody conjugated with Alexa Fluor 594 (Invitrogen, cat. no. M11240, 1:1,000 dilution) for 1 hour with gentle rocking. After three times washing with PBS, the cells were stained with 300 nM DAPI (Invitrogen) for 15 minutes. Images were acquired using an inverted microscope (DMI6000B, Leica Microsystems) equipped with a ×10 objective (Leica HCX PL FLUOTAR ×10/0.30NA PH1) and an EM-CCD camera (Cascade II:512, Photometrics) controlled by Metamorph software (Molecular Devices). The imaging of DAPI, GFP and mCherry channel was conducted with A, L5 and TX2 filter cubes (Leica Microsystems) Image processing. Obtained images were analyzed using ImageJ/FIJI 58 and CellProfiler 59 . The background of images was subtracted using the build-in 'Subtract background' tool in ImageJ. Nuclei were identified in the DAPI channel using an object diameter threshold of 5-20 pixel units. The mean intensity of Venus and mCherry fluorescence at each nucleus was measured to determine the population of GFP-positive (GFP + ) cells and mCherry-positive (mCh + ) cells. The intensity threshold was determined not to detect mCh + cell in the mock-control condition. The number of mCh + cells was then divided by the number of GFP + cells and multiplied by 100 to obtain the percentage of mCh + /GFP + cells.
In vivo RedPA-Cre and Red-CPTS activation. All procedures involving animals were approved by the Institutional Animal Care and Use Committee of the University of Tokyo and were conducted in accordance with the Guidelines for Care and Use of Laboratory Animals as stated by the University of Tokyo. Four-week-old female ICR mice and 6-week-old female BALB/c mice were purchased from Sankyo Labo Service. Housing conditions for the mice were 20-26 °C, 40-60% humidity and a 14-hour/10-hour light/dark cycle. The livers of 4-week-old female ICR mice were hydrodynamically transfected by injecting 10 μg of the RedPA-Cre plasmid, of which configuration is NLS-DrBphP-CreC106-IRES-NLS-CreN104-Aff6_V18FΔN, and 40 μg of the bioluminescent reporter plasmid with TransIT-EE Hydrodynamic Delivery Solution (Mirus Bio). As a mock-control, pcDNA3.1 empty vector was used instead of the RedPA-Cre plasmid. Eight hours after injection, the abdominal surface fur of mice was removed using a depilatory cream, and mice were randomly assigned to dark and red light groups. The person performing the hydrodynamic injections was blinded as to the assignment. Mice of the red light group were then illuminated with an LED light source (660 nm; 100 W m −2 , continuous). Every 8 hours, mice were returned back to home-cage and fed for 1 hour. Mice of the dark group were kept in the home-cage that received no light. Bioluminescence imaging of the mice was performed 25 hours after hydrodynamic injection. Before bioluminescence imaging, 200 μl of 100 mM d-luciferin was intraperitoneally injected into the mice. The mice were anaesthetized with isoflurane (Wako). Five minutes after d-luciferin injection, bioluminescence images of the mice were obtained using the Lumazone bioluminescence imager (Nippon Roper) equipped with the Evolve 512 EMCCD camera (Photometrics) controlled by SlideBook software (Intelligent Imaging Innovations).
In case of Red-CPTS for endogenous gene activation, the BALB/c mice were hydrodynamically transfected with plasmids encoding NLS-dCas9-NLS, 2xAff6_ V18FΔN-MS2-3xNLS, 3xNLS-DrBphP-p65-HSF1 and sgRNA at a 1:1:1:1 ratio. The total amount of DNA was 120 μg per mouse. Twenty-five hours after injection, the liver was collected in RNAlater solution (Invitrogen). Total RNA was extracted from the liver using a Precellys Evolution tissue homogenizer (Bertin Instruments) with cooling system, Precellys Lysing Kit CK28 and NucleoSpin RNA. After cDNA synthesis using SuperScript IV VILO Master Mix, reverse transcription PCR was conducted using Luna Universal Probe qPCR Master Mix (New England Biolabs). The sample was analyzed with the StepOnePlus system. TaqMan primers and probes were used to detect ASCL1 and GAPDH genes (Life Technologies; TaqMan Gene Expression Assay IDs are as follows: ASCL1: Mm03058063_m1; Gapdh: Mm99999915_g1). The ΔΔCt method was applied to show each relative mRNA level to that from non-transfected mice as a negative control.
Reagent availability. The plasmids encoding MagRed and the related plasmids will be distributed by Addgene.

Statistical analysis.
Microsoft Excel for Microsoft 365 and GraphPad Prism (version 9.0) were used for statistical analysis. For comparison between two groups, a two-tailed unpaired Student's t-test was performed. For comparison among more than three groups, ordinary two-way ANOVA was performed. For determining P values between the matched-pairs groups, the Wilcoxon matched-pairs signed-rank test was performed. No sample size estimates were performed, and our sample sizes are consistent with those normally used in experiments for regulation of protein activity. No sample exclusion was carried out. A Life Sciences Reporting Summary for this paper is available.
Reporting summary. Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability
The data supporting the findings of this study are available within the article and its Supplementary Information. The source data for the main figures and extended data figures are provided as Source Data files. A crystal structure of Affibody (Protein Data Bank accession code 2M5A) was used to depict a schematic representation of a binding partner candidate in Fig. 1b. The read counts for all screening data are available on the DDBJ Sequence Read Archive, accession numbers DRR243933 and DRR243934. Source data are provided with this paper.

code availability
The code for analysis of the read counts for all screening data has been deposited on GitHub (https://github.com/Kazushi40/NGS_analysis). Fig. 1 | effect of additional BV supplementation on the three different cPTS designs. (a-c) Mean bioluminescence intensities (from three independent biological samples) of CPTS designs based on RpBphP1-PpsR2 (a), RpBphP1-QPAS1 (b), and MagRed (c) were plotted. The designs of each configuration (#1-8) were shown in Fig. 3b, c. P values are indicated above the bars. (N.S., not significant P > 0.05; **P < 0.01; BV minus vs. plus using two-tailed Wilcoxon matched-pairs signed rank test). Fig. 6 | comparison of RedPA-cre with the existing red light-responsive recombinase systems. For the BV/PCB (+) conditions, HEK 293T cells were plated at 2.0 × 10 4 cells per well in a 96-well black-wall plate in the presence of 25 μM BV (for RedPA-Cre and FISC system) and 20 μM PCB (for CreLite and L-SCRaMbLE), respectively. For the BV/PCB(−) conditions, the procedures for plating were identical to those described above except for the chromophore supplementation. Plasmid amount used for each experiment is described below the graph. Especially, because a previous study has revealed that FISC system shows the highest recombination efficiency when Cre N-fragment (pXY169), Cre C-fragment (pXY177) and red light-responsive activator (pXY137) were transfected at 1:1:10 ratio, we additionally tested this transfection condition for FISC system. Following experimental procedures are the same as those in Fig. 5c, d. Ratios of the mean bioluminescence intensity under the red light condition (red bar) to that under the dark condition (gray bar) are depicted above the bars. Bar data are shown as the mean ± s.d. from four biological replicates. Dots represent individual data points. P values are indicated above the bars. (N.S., not significant P > 0.05; **P < 0.01; ***P < 0.001; ****P < 0.0001; dark vs. light using two-tailed unpaired t-test). Fig. 8 | RedPA-cre under dark, 800-nm illumination, and 660-nm illumination conditions. DNA recombination activities of RedPA-Cre were compared among the dark, the 800-nm illumination and the 660-nm illumination conditions. Experimental conditions are the same as those in Fig. 5c, d except for that the 800-nm samples are incubated under 800-nm pulsed light (1 min ON and 4 min OFF) of 10 W m −2 . Bar data are shown as the mean ± s.d. from four biological replicates. Dots represent individual data points. P values are indicated above the bars. (N.S., not significant P > 0.05; ****P < 0.0001; dark vs. 660 nm, dark vs. 800 nm and 800 nm vs. 660 nm using two-tailed unpaired t-test). Fig. 10 | in vivo gene activation by Red-cPTS upon noninvasive red light illumination. (a, b) ICR mice were transfected with plasmids encoding Red-CPTS and luciferase reporter together with a plasmid encoding unrelated sgRNA as a negative control (a, Empty) or sgRNA targeting GAL4UAS (b, GAL4UAS). After the transfection, the mice were noninvasively illuminated at 660 nm or kept in the dark as shown in Supplementary Figure 28, and then bioluminescence imaging of the mice was performed. (c) Total bioluminescence intensities of the mice shown in a and b. Gray and red bars represent the mean ± s.d., and dots represent the total bioluminescence intensity of each mouse (n = 4 mice per group). (N.S. P > 0.05; ****P < 0.0001; using two-way ANOVA with multiple comparisons). (d) Red light-dependent endogenous gene activation by Red-CPTS with unrelated sgRNA as a negative control (Empty) or sgRNA targeting mouse ASCL1 (mASCL1) in vivo in living BALB/c mice. Data are represented as the relative mRNA level to the non-transfected negative control (n = 6 mice per group). Gray and red bars represent the mean ± s.d., and dots represent individual data points. No difference can be observed in the appearance between the mice maintained in the dark and the ones illuminated with red light at 660 nm for 16 h. P values are indicated above the bars. (N.S., not significant P > 0.05; ****P < 0.0001; using two-way ANOVA with multiple comparisons).