Exploration of natural red-shifted rhodopsins using a machine learning-based Bayesian experimental design

Microbial rhodopsins are photoreceptive membrane proteins, which are used as molecular tools in optogenetics. Here, a machine learning (ML)-based experimental design method is introduced for screening rhodopsins that are likely to be red-shifted from representative rhodopsins in the same subfamily. Among 3,022 ion-pumping rhodopsins that were suggested by a protein BLAST search in several protein databases, the ML-based method selected 65 candidate rhodopsins. The wavelengths of 39 of them were able to be experimentally determined by expressing proteins with the Escherichia coli system, and 32 (82%, p = 7.025 × 10−5) actually showed red-shift gains. In addition, four showed red-shift gains >20 nm, and two were found to have desirable ion-transporting properties, indicating that they would be potentially useful in optogenetics. These findings suggest that data-driven ML-based approaches play effective roles in the experimental design of rhodopsin and other photobiological studies. (141/150 words).


M
icrobial rhodopsins are photoreceptive membrane proteins widely distributed in bacteria, archaea, unicellular eukaryotes, and giant viruses 1,2 .They consist of seven transmembrane (TM) α helices, with a retinal chromophore bound to a conserved lysine residue in the seventh helix (Fig. 1a).The first microbial rhodopsin, bacteriorhodopsin (BR), was discovered in the plasma membrane of the halophilic archaea Halobacterium salinarum (formerly called H. halobium) 3 .BR forms a purple-colored patch in the plasma membrane called purple membrane, which outwardly transports H + using sunlight energy 4 .After the discovery of BR, various types of microbial rhodopsins were reported from diverse microorganisms, and recent progress in genome sequencing techniques has uncovered several thousand microbial rhodopsin genes 1,[5][6][7] .These microbial rhodopsins show various types of biological functions upon light absorption, leading to all-trans-to-13-cis retinal isomerization.Among them, ion transporters, including light-driven ion pumps and light-gated ion channels, are the most ubiquitous (Fig. 1b).Ion-transporting rhodopsins can transport several types of cations and anions, including H + , Na + , K + , halides (Cl -, Br -, I -), NO 3 -, and SO 4 2 , [8][9][10] .The molecular mechanisms of ion-transporting rhodopsins have been detailed in numerous biophysical, structural, and theoretical studies 1,2 .
In recent years, many ion-transporting rhodopsins have been used as molecular tools in optogenetics to control the activity of animal neurons optically in vivo by heterologous expression 11 , and optogenetics has revealed various new insights regarding the neural network relevant to memory, movement, and emotional behavior [12][13][14][15] .However, strong light scattering by biological tissues and the cellular toxicity of shorter wavelength light make precise optical control difficult.To circumvent this difficulty, new molecular optogenetics tools based on red-shifted rhodopsins, which can be controlled by weak scattering and low toxicity longer-wavelength light are urgently needed.Therefore, many approaches to obtain red-shifted rhodopsins have been reported, including gene screening, amino acid mutation based on biophysical and structural insights, and the introduction of retinal analogs [16][17][18] .The insights obtained in these experimental studies, and further theoretical and computational studies [19][20][21][22] revealed basic physical principle regulating absorption maximum wavelengths (λ max ) of rhodopsins (also called spectral or color-tuning rule) in which the distortion of retinal polyene chain induced by steric interactions with surrounding residues, electrostatic interaction between protonated retinal Schiff base and counterion(s), and polarizability of the retinal binding pocket play essential role 23 .The λ max of several rhodopsins could be red-shifted by 20-40 nm without impairing the ion-transport function based on these physicochemical insights 17,24,25 .These are successful examples of knowledge-driven experimental approach.Recently, a new method using a chimeric rhodopsin vector and functional assay was reported to screen the λ max and proton transport activities of several microbial rhodopsins that are present in specific environments 26 .This method identified partial sequences of red-shifted yellow (560-570 nm)-absorbing proteorhodopsin (PR), the most abundant outward H + -pumping bacterial rhodopsin subfamily, from the marine environment.These works identified several red-shifted rhodopsins 15,16,18,27 .Especially, most successful optogenetic tools are red-shifted channel rhodopsins such as Chrimson 27,28 and RubyACR 29 which can induce and inhibit neural firing by absorbing 590 and 610-nm light, respectively.The rational amino acid mutation based on the structural insight further red-shifted the λ max of Chrimson to 608 nm 27 .The development of next-generation sequencing technology is expected to continue to more rapidly identify a large number of new rhodopsin genes, including proteins with even longer wavelength-shifted absorption.However, screening of all of them either by experimental or theoretical methods would be very costly.Therefore, a less expensive and more efficient approach to screen red-shifted rhodopsins is needed, and datadriven study is expected as the third class of approach to investigate the color-tuning rule of rhodopsins at low cost.
To estimate the λ max of rhodopsins, we recently introduced a data-driven approach 30 .In this previous study, we investigated the statistical relationship between the amino acid types at each position of the seven TM helices and the absorption wavelength of rhodopsins.We constructed a database containing 796 wildtype (WT) rhodopsins and their variants, the λ max of which had been reported in earlier studies.Then, we evaluated the strength of the relationship with a data-splitting approach, i.e., the data set was divided into a training set and a test set; the former was used to construct the predictive model, and the latter was used to estimate the predictive ability.The results of this "proof-of-concept'' study suggested that the λ max of an unknown family of rhodopsins could be predicted with an average error of ±7.8 nm, which is comparable to the mean absolute error of λ max estimated by the hybrid quantum mechanics/molecular mechanics (QM/MM) 21 method.Considering the computational cost of both approaches, the data-driven approach was found to be much more efficient than the QM/MM approach, while the latter provides insights on the physical origin controlling λ max .Encouraged by this result, in this study, we introduced a machine-learning (ML)-based experimental design method which enables us screening more efficiently the candidates of rhodopsins that are likely to have red-shift gains with data-driven assist compared to the random or knowledge-driven screening.For this aim, we constructed a new dataset of 3022 wild-type putative ion-pump rhodopsins which were collected from public gene databases (NCBI non-redundant protein sequences, and metagenomic proteins 31 and the Tara Oceans microbiome and virome database 32 ) and for which λ max have not been experimentally investigated yet to explore new red-shifted rhodopsins.The goal of the present study was to identify rhodopsins with λ max longer than the wavelengths of the representative rhodopsins in each subfamily of microbial rhodopsins for which the λ max has already been reported (base wavelengths).Here, we call the degrees of red-shift of the wavelength from the base wavelength the "red-shift gain".We focus on rhodopsins with large red-shift gains because this would lead to the identification of amino acid types and residue positions that play important roles in redshifting absorption wavelengths.Also, it is practically important in optogenetics applications to have a wide variety of ion-pumping rhodopsins from each subfamily to construct a new basis for rhodopsin toolboxes with red-shifted absorption and various types of ion species that can be transported.We constructed the ML-based experimental design method so that it could properly predict the expected red-shift gains, and applied this new method to 3022 putative ion-pumping rhodopsins derived from archaeal and bacterial origins that can be easily expressed in Escherichia coli (Fig. 1b).
We conducted experiments by introducing the synthesized rhodopsin genes into E. coli to measure the absorption wavelengths of 65 candidates for which the ML-based experimental design method predicted that the expected gains were >10 nm.Of these 65 selected candidates, 39 showed substantial coloring in E. coli cells, 32 showed actual red-shift gains, 6 showed blue-shifts, and 1 showed no change, i.e., 82% (=32/39, 7.025 × 10 −5 ) of the selected candidates showed actual red-shift gains.We then investigated the ion-transportation properties of the rhodopsins for which the red-shift gains were >20 nm, and found that some actually had desirable ion-transporting properties, suggesting that they (and their variants) could potentially be used as new optogenetics tools.Furthermore, the differences in the amino acid sequences of the newly examined rhodopsins and the representative ones in the same subfamily could be used for further investigation of the red-shifting mechanisms.This result suggests that it should be possible to find rhodopsins that have desired properties without conducting exhaustive biological experiments, and suggests that data-driven ML-based approaches should play effective roles in the experimental design of rhodopsin and other photobiological studies.

Results
Construction of an ML-based experimental design method for predicting expected red-shift gain.To screen rhodopsins that would have large red-shift gains, it is necessary to consider the uncertainty of prediction in the form of "predictive distributions" 33 .By using predictive distributions, it is possible to consider appropriately the "exploration-exploitation trade-off" in screening processes 34,35 , where exploration indicates an approach that prefers candidates with larger predictive variances, and exploitation indicates an approach that prefers candidates with longer predictive mean wavelengths (Fig. 2).Here, the term "exploration-exploitation'' is a technical term used in the fields of active learning and experimental design, and "explorations'' in the title of this paper is used in a broader sense and is not directly related to the former technical terminology.We employed a Bayesian modeling framework to compute the predictive distributions of candidate rhodopsin red-shift gains.We then consider an exploration-exploitation trade-off by selecting candidate rhodopsins based on a criterion called "expected red-shift gains".
To compute the expected red-shift gains of a wide variety of rhodopsins, we developed ML-based experimental design method based on the statistical analysis in our previous study 30 . Figure 3 shows a schematic illustration of the ML-based experimental design method.First, we added 88 WT microbial rhodopsins and their variants for which the λ max had recently been reported in the literature or determined by our experiments, to a previously reported data set 30 .In other words, the new training data set consisted of the amino acid sequences and λ max of 884 WT microbial rhodopsins and their variants (Supplementary Data 1).Second, the new ML model used only N = 24 residues located around the retinal chromophore (Supplementary Fig. 1) because our previous study 30 indicated that amino acid residues at these 24 positions play significant roles in predicting absorption wavelengths (Fig. 3a).Third, M = 18 amino acid physicochemical features (Supplementary Data 2) were used as inputs in the ML model, as opposed to the amino acid types used in the previous statistical analysis.This enabled us to predict the absorption wavelengths of a wide range of target rhodopsins that contain unexplored amino acid types in the training data at certain positions.Therefore, an amino acid sequence is transformed into an M × N = 432 dimensional feature vector x 2 R MN by concatenating x i,j , the j-th feature of the i-th residue (Fig. 3b).We consider a linear prediction model , where β i,j is the parameter for the j-th feature of the i-th residue, and μ is the intercept term.
Finally, to consider the exploration-exploitation trade-off appropriately in the screening process, we introduce a Bayesian modeling framework, which allows us to compute the predictive distributions of red-shift gains.Specifically, we employed Bayesian sparse modeling called BLASSO 36 (see the Methods section for details).This enables us to provide not only the mean, but also the variance of the predicted wavelengths.Unlike classical regression analysis, BLASSO regards the model parameters β i,j and μ as random variables generated from underlying distributions, as illustrated in Fig. 3c.Therefore, the wavelength prediction f(x) is also represented as a distribution.The red-shift gain is defined as gain = max(f(x)−λ base' 0), where λ base is the wavelength of the representative rhodopsin in the same subfamily whose λ max has been experimentally determined and reported in the literature (Supplementary Data 3).Note that the red-shift gain is positive if f (x) is greater than λ base ; otherwise, it takes the value of zero.Since f (x) is regarded as a random variable in BLASSO, the red-shift gain is also regarded as a random variable.Therefore, we employ the expected value of the red-shift gain, denoted by E½gain, as the screening criterion where E represents the expectation of a random variable.Illustrative examples of E½gain are shown in Fig. 3d.Unlike the simple expectation of the wavelength prediction E½f ðxÞ, E½gain depends on the variance of the predictive distribution (For example, E½gain of target #4 is larger than #1 in Fig. 2f though E Àλ base of #4 is smaller than #1 in Fig. 2e).This encourages the exploration of rhodopsin candidates having large uncertainty (for exploration), as opposed to only those having longer wavelengths with high confidence (for exploitation).
Screening potential red-shifted microbial rhodopsins based on expected red-shift gains.The target data set to explore redshifted microbial rhodopsins was constructed with putative microbial rhodopsin genes collected by a protein BLAST (blastp) search 37 of the NCBI non-redundant protein and metagenome databases 31 , as well as the Tara Oceans microbiome and virome databases 32 .As a result, we obtained a non-redundant data set of 5558 microbial rhodopsin genes (Fig. 1b).The sequences were aligned by ClustalW and categorized to subfamilies of microbial rhodopsins based on the phylogenic distances, as reported previously 38 .Among these, 3022 rhodopsin genes, which did not have identical sequences in the training data and from bacterial and archaeal origins, were extracted because their λ max can be easily measured by expressing in E. coli cells.We calculated the E½gain of these 3022 genes (Supplementary Data 4), and then selected 65 genes of putative light-driven ion-pump rhodopsins showing an E½gain >10 nm for further experimental evaluation, as ion-pump rhodopsins can be used as new optogenetics tools.
Experimental measurement of the absorption wavelengths of microbial rhodopsins showing high red-shift gains.We synthesized the selected 65 genes that showed an E½gain > 10 nm.These were then introduced into E. coli cells, and the proteins expressed in the presence of 10 μM all-trans retinal.As a result, 39 E. coli cells showed substantial coloring, indicating high expression of folded protein, and their λ max were determined by observing ultraviolet (UV)-visible absorption changes upon bleaching of the expressed rhodopsins through a hydrolysis reaction of their retinal with hydroxylamine, as previously reported 30 (Fig. 4).The observed gains were compared with the E½gain shown in Table 1.A full list of unexpressed genes is shown in Supplementary Data 5.In total, 32 out of 39 genes showed a longer wavelength than their base wavelength (that is, positive red-shift gain; Fig. 5), suggesting that our ML-based model can significantly improve the efficiency of screening to explore new red-shifted microbial rhodopsins compared with random sampling (p = 7.025 × 10 −5 by a binomial test assuming that the probability of red-shift gain for random choice is 50%).
Ion-transport function of red-shifted microbial rhodopsins.Overall, 4 of the 39 rhodopsins showed red-shifted absorption ≥20 nm compared with the base wavelengths (Table 1): three were halorhodopsins (HRs) from bacterial species 10,39,40 (to distinguish classical HRs from archaeal species, these are hereafter referred to as bacterial-halorhodopsins [BacHRs]), and one was a PR 41 .Their ion-transport activities were then investigated by expressing in E. coli cells and observing the pH change in external solvent whose pH was initially set to 7 (Fig. 6a).Upon light illumination, BacHRs from Rubrivirga marina and Myxosarcina The density of the predictive distribution of each target protein on its red-shift gain value.The gain is defined as the predicted wavelength subtracted by the base wavelength, and if it is negative, the value is truncated as 0. This can be seen as a "benefit" that can be obtained by observing the target protein.f Expected value of the red-shift gain.This provides a ranking list from which the next candidates to be experimentally investigated can be determined.Target #4 has the largest expected gain, although target #1 has the largest increase in the predictive mean compared with base wavelength in e.Because of its larger SD (as shown in a, c, d, and e), target #4 is probabilistically expected to have a larger gain than the other targets.
sp. GI1 showed alkalization of external solvent, which was enhanced by addition of the protonophore (CCCP), which increases the H + permeability of the cell membrane, and the light-dependent alkalizations disappeared when anions were exchanged from Cl -to NO 3 -, indicating that these were lightdriven Cl -pumps, similar to other rhodopsins in the same BacHR subfamily 10,39 .By contrast, Cyanothece sp.PCC 7425 did not show any substantial transport.While no transporting function can be attributed to the heterologous expression in E. coli, it would have considerably different molecular properties from other BacHRs.PR from a metagenome sequence (ECV93033.1)showed acidification of external solvent that was abolished by the addition of CCCP and was independent from ionic species in the solvent.Hence, this was a new red-shifted outward H + pump compared with typical PRs whose λ max are present at ca. 520 nm 41 .Furthermore, these rhodopsins are needed to be functional in mammalian cells for their optogenetic applications.To verify this issue, we carried out electrophysiological experiment to measure the photocurrent of BacHRs from Rubrivirga marina and PR from a metagenome sequence (ECV93033.1)in mammalian cells (ND7/23; Fig. 6b).Both of them showed substantial photocurrent even in the mammalian cells.These light-driven ion-pumping rhodopsins with red-shifted λ max have the potential to be applied as new optogenetics tools, and thus, warrant further study in the near future.

Discussion
Microbial rhodopsins show a wide variety of λ max by changing steric and electrostatic interactions between all-trans retinal Fig. 3 Overview of the ML-based exploration of natural red-shifted rhodopsins.a Using existing experimental data, a training data set consisting of pairs of a wavelength λ max and an amino acid sequence was constructed.A particular focus was placed on the 24 amino acid residues around the retinal chromophore to build an ML-based prediction model.A set of protein sequences with no known wavelength was also collected as target proteins.b All amino acid sequences were transformed into physicochemical features, leading to 24 ×18 = 432 dimensional numerical representations of each protein.c A linear regression model was constructed using the Bayesian approach.Each regression coefficient β i,j was estimated as a distribution (shown as a gray region).The broadness of these distributions represent the uncertainty of the current estimation.d The expected red-shift gain values were evaluated for the target proteins.The green region is the standard deviation of the prediction.The red shaded region in the vertical distribution corresponds to the probability that the wavelength is larger than the base wavelength (dashed line), which is determined by the subfamily of the microbial rhodopsin.The bar represents the expected red-shift gain, defined by the expected value of the increase from the base wavelength.
chromophores and surrounding amino acid residues.An understanding of the color-tuning rule enables more efficient screening and the design of new red-shifted rhodopsins that have value as optogenetics tools, and our ML-based data-driven approach therefore provides a new basis to identify color-regulating factors without assumptions.
We previously demonstrated that an ML-based model based on ∼800 experimental results could predict the λ max of microbial rhodopsins with an average error of ±7.8 nm.Encouraged by this result, in the present study, we constructed a new MLbased model to compute expected red-shift gains for a wide range of unknown families of microbial rhodopsins.As a result, 32 out of 39 microbial rhodopsins were found to have redshifted absorption compared with the base wavelengths of each subfamily of microbial rhodopsins (Table 1), suggesting that our data-driven ML approach can screen red-shifted microbial rhodopsin genes more efficiently than random choice (p = 7.025 × 10 −5 ).
By considering the exploration-exploitation trade-off, that is, to consider not only the expected value of the prediction, but also the uncertainty, it was possible to construct a red-shift protein screening process, as shown in Fig. 7. Figure 7a shows the relationships between the prediction uncertainty (as measured by the standard deviation) and the observed red-shift gains.It can be seen that rhodopsins with red-shift gain are found in areas of not only low (small standard deviation), but also high prediction uncertainty (large standard deviation).Figure 7b shows the twodimensional projection of the d = 432 dimensional feature space by principal component analysis.It can be seen that red-shift gains (red) are found for target proteins not only close to training proteins (green), but also far from training proteins.Figure 8 shows that the observed wavelengths and red-shift gains tend to be smaller than the predicted ones.We conjecture that these differences between the observed and predicted wavelengths and red-shift gains are due to modeling errors, possibly caused by a lack of sufficient information (e.g., three-dimensional structures) and modeling flexibility (e.g., nonlinear effects); in other words, rhodopsins having high prediction values partly by modeling errors have a high chance of being selected.Therefore, it would be valuable to develop a statistical methodology to eliminate selection bias due to modeling errors.
Four rhodopsins showed red-shifted absorption ≥20 nm than the base wavelength, three of which showed light-driven iontransport function.Interestingly, while one BacHR from Rubrivirga marina (accession No.: WP 095512583.1)showed a 40-nm longer λ max (577 nm) than the base wavelength, another 11-nm red-shifted BacHR (WP 095509924.1)was also identified from the  same bacteria (Table 1).These BacHRs are highly similar to each other (55.2% identity and 70.6% similarity), and only four of 24 amino acid residues around the retinal chromophore differ.Hence, R. marina evolved two BacHRs with 29-nm different λ max by a small number of amino acid replacements; the amino acid residue(s) responsible for this color-tuning should be investigated in the future.
The differences in amino acids in three of 24 retinalsurrounding residues are known to play a color-tuning role in natural rhodopsins without affecting their biological function.These correspond to positions 93, 186, and 215 in BR (BR Leu93, Pro186, and Ala215, respectively) 17 .Position 93 is known to be diversified in the PR family (the well-known position 105 in PRs).Green-light-absorbing PRs (GPRs) have leucine as a BR, whereas glutamine is conserved in blue-light-absorbing PRs 5,26 .This color-tuning effect by the difference between leucine and glutamine is known as the "L/Q-switch" 42 .Interestingly, while 29.8% of 3022 candidate genes have glutamine at this position, all 39 genes whose large red-shift gains were suggested by our MLbased model have amino acids other than glutamine, which suggests that our ML-based model avoided the genes having glutamine at position 93.Especially, 12 (37.5%) of 32 genes that actually showed red-shifted absorption compared with the base wavelengths had methionine at this position (Supplementary Data 6), which is substantially higher than the proportion of methionine-conserving genes in the 3022 candidates (16.1%).The red-shifting effect of the L-to-M mutation of this residue in GPRs previously reported 42 and the current result imply that many rhodopsins have evolved methionine to absorb light with longer wavelengths.Position 215 in BR is also known to have a colortuning role.The mutation from alanine to threonine or serine (A/ TS switch) has a blue-shifting effect of 9-20 nm 17,[43][44][45] .Five of six genes that showed blue-shifted λ max compared with the base wavelengths have threonine or serine at this position, suggesting that these types of genes should be avoided to explore red-shifted rhodopsins.By contrast, asparagine was conserved in more than half (58.4%) of the 3022 candidate genes, especially in those belonging to the PR subfamily.A substantial portion (37.5%) of the genes with red-shifted absorption compared with the base wavelengths also had asparagine at this position (Supplementary Data 6).The A-to-N mutation at this position had a smaller effect (4-7 nm) 30,44 than that of the A-to-S/T mutation; thus, the difference between alanine and asparagine is not so critical to explore red-shifted rhodopsins.Position 186 in BR is proline in most microbial rhodopsins (in 98.7% of the 3022 candidate genes), and the mutation to non-proline amino acids induces redshift of absorption 17 .We identified sodium pump rhodopsin (NaR) from Parvularcula oceani, which also has a threonine at this position, and showed 10-nm longer absorption than the base The first component (horizontal axis) explains 33% of the total variance of the original space, and the second (vertical axis) explains 17%.The green markers are the training data, and the black markers are the target data.For the synthesized proteins, differences in the observed and base wavelengths are shown by the color map.The results indicate that, by considering the exploration-exploitation trade-off, it was possible to make a red-shift protein screening process that considered not only the expected value of the prediction, but also the uncertainty.wavelength.Although genes having non-proline amino acids are rare in nature, it would be beneficial to identify new red-shifted rhodopsins.These results indicate that ML-based modeling can provide insights for identifying new functional tuning rules for proteins based on specific amino acid residues.
The number of reported microbial rhodopsin genes is rapidly increasing due to the development of next-generation sequencing techniques and microbe culturing methods.New microbial rhodopsins with molecular characteristics suitable for optogenetics applications are expected to be included in upcoming genomic data.Data-driven approaches would be able to efficiently suggest promising rhodopsins which should be investigated preferentially.Although the absorption of the most red-shifted rhodopsin found in this study (BacHR from Rubrivirga marina, λ max = 577 nm) is shorter than the peak activation wavelength of eNpHR3.0(590 nm) which is extensively used in optogenetic studies 46 , our MLbased model could be expected to reduce the costs associated with identifying red-shifted rhodopsins from upcoming genomic data.Especially, we expect that our ML-based model could be applied to ion channel and enzymatic rhodopsins, which were not a focus of this study because of their eukaryotic origins; however, their use in optogenetics research could help identify more useful optogenetics tools with red-shifted absorption in the future.

Methods
Experimental design.The objective of this study was to introduce and demonstrate the effectiveness of a data-driven experimental design method to screen candidates for rhodopsin proteins with desired properties from more than several thousand candidates identified in various microbial species.To this end, we constructed a training dataset for developing a ML model and a target dataset for screening targets (Construction of training and target data sets).A machine learning model was constructed using the training dataset (ML modeling), which was used to select the 65 candidates from 3022 in the target dataset.The protein expressions of selected candidates were induced (Protein expression), and the absorption spectra and λ max of the selected rhodopsins were measured (Measurement of the absorption spectra and λ max of rhodopsins by bleaching with hydroxylamine).Furthermore, we investigated the ion-transportation properties of the rhodopsins that showed large red-shift gains (Ion-transport assay of rhodopsins in E. coli cells).Statistical significance of the effectiveness of the data-driven experimental design method was assessed by a binomial test.
Construction of training and target data sets.In this study, we constructed a new training data set (Supplementary Data 1) by adding 88 genes for which the λ max had recently been reported in the literature or determined by our experiments, to a previously reported data set 30 .The sequences were aligned using ClustalW 47 and the results were manually checked to avoid improper gaps and/or shifts in the TM parts.The aligned sequences were then used for ML-based modeling.
To collect microbial rhodopsin genes for the training data set, BR 48 and heliorhodopsin 48C12 49 sequences were used as queries for searching homologous amino acid sequences in NCBI non-redundant protein sequences and metagenomic proteins 31 and the Tara Oceans microbiome and virome database 32 .Protein BLAST (blastp) 37 was used for the homology search, with the threshold Evalue set at <10 by default, and sequences with >180 amino acid residues were collected.All sequences were aligned using ClustalW 47 .The highly diversified Cterminal 15-residue region behind the retinal binding Lys (BR Lys216) and long loop of HeR between helices A and B were removed from the sequences to avoid unnecessary gaps in the alignment.The successful alignment of the TM helical regions, especially the 3rd and 7th helices, was checked manually.The phylogenic tree was drawn using the neighbor-joining method 50 , and the microbial rhodopsin subfamilies were categorized based on the phylogenetic distances, as reported previously 38 .Based on the phylogenetic tree, 3022 putative ion-pumping rhodopsin genes from bacterial and archaeal origins were extracted, and their aligned sequences were used as the training data set for the prediction of λ max .The original training and test sets are provided in Supplementary Data 1 and Table 1, respectively, and the entire transformed datasets with physicochemical features (see Supplementary Data 2) are provided in Supplementary Data 7.
ML modeling.Suppose that we have K pairs of an amino acid sequence and an absorption wavelength , where x (k) ∈R MN is the feature vector of the k-th amino acid sequence and λ ðkÞ max 2 R is the absorption wavelength of the kth rhodopsin protein.The least-absolute shrinkage selection operator (LASSO) is a standard regression model in which important regression coefficients can be Fig. 8 Comparisons of experimental observations and ML predictions.In these two plots, the red points have longer observed wavelengths than the base wavelength λ base , while the blue points have shorter observed wavelengths than λ base .a ML-based prediction of λ max (horizontal axis) vs. experimentally observed λ max (vertical axis).b Expected red-shift gain (horizontal axis) vs. observed gain (vertical axis).Since we selected rhodopsins having expected red-shift gains of ≥10 nm, all the points on the horizontal axis are ≥10 nm.The observed gain, defined by max (λ max −λ base ,0), is nonnegative by definition.For blue points whose observed gain is equal to 0, the value of λ max −λ base is also shown as blue outlined circles.The green and orange dashed lines are the averages of the horizontal and vertical axes (19.2 nm and 9.5 nm), respectively.The results indicate that the observed wavelengths and red-shift gains tended to be smaller than the predicted ones.We conjecture that these differences between the observed and predicted wavelengths are due to modeling errors (see the Discussion for details).
automatically selected by the penalty on the absolute value of the coefficient, as follows: where β 2 R MN is a vector of β i,j and γ > 0 is the regularization parameter.BLASSO is a Bayesian extension of LASSO for which the model is defined through the following random variables: where N(μ,s 2 ) is a Gaussian distribution with mean μ and variance s 2 , and π β j σ p σ 2 e Àγjβ i;j j= p σ 2 is the conditional Laplace prior.In this model, the maximum of the conditional distribution of the parameter ; λ; σ is equivalent to the LASSO 51 estimator.For γ, a hyper-prior is set through the gamma distribution prior on γ 2 , and the inverse gamma prior is assumed for σ 2 .For the computational details, see the original paper 36 .We used the "monomvn" package of R in our implementation.The prediction f (x) was sampled through the Gibbs sampler of β and μ.The number of samplings was set as T = 10,000 times.For each candidate x, we approximately obtain E½gain by where μ (t) and β (t) are the t-th sampled parameters.The parameters of the trained model is provided in Supplementary Data 8.
Protein expression.The synthesized genes of microbial rhodopsins codonoptimized for E. coli (Genscript, NJ) were incorporated into the multi-cloning site in the pET21a(+) vector (Novagen, Merck KGaA, Germany).The plasmids carrying the microbial rhodopsin genes were transformed into the E. coli C43(DE3) strain (Lucigen, WI).Protein expression was induced by 1 mM isopropyl β-D-1thiogalactopyranoside (IPTG) in the presence of 10 μM all-trans retinal for 4 h.Ion-transport assay of rhodopsins in E. coli cells.To assay the ion-transport activity in E. coli cells, the cells carrying expressed rhodopsin were washed three times and resuspended in unbuffered 100 mM NaCl.A cell suspension of 7.5 mL at OD 660 = 2 was placed in the dark in a glass cell at 20 °C and illuminated at λ > 500 nm from the output of a 1-kW tungsten-halogen projector lamp (Rikagaku, Japan) through a long-pass filter (Y-52; AGC Techno Glass, Japan) and a heat-absorbing filter (HAF-50S-50H; SIGMA KOKI, Japan).The light-induced pH changes were measured using a pH electrode (9618S-10D; HORIBA, Japan).All measurements were repeated under the same conditions after the addition of 10 μM CCCP.
Imaging and electrophysiological assays.For heterologous expression in mammalian cultured cells, the synthesized rhodopsin genes were inserted into the cloning site between the CMV promoter and eYFP in phKR2-3.0-EYFP 52using EcoRI and BamHI.All experiments were carried out using ND7/23 cells, lined hybrid cells derived from neonatal rat dorsal root ganglion neurons fused with the mouse neuroblastoma, which were transfected with plasmids as previously described 53 .EYFP fluorescence (543 nm) in the ND7/23 cells expressing the rhodopsins were imaged under a confocal laser scanning microscopy (LSM510, Carl Zeiss, Oberkochen, Germany) at 512 × 512 pixels using a water-immersion objective (×63/0.95,Achroplan, Carl Zeiss) and Ar laser (514 nm).Currents were recorded using an EPC-8 amplifier (HEKA Electronic, Lambrecht, Germany) under a whole-cell patch clamp configuration while a 200 ms pulse illuminations at 549 ± 15 (nm, >90% of the maximum) and 28 mW‧mm −2 was given at 0.1 Hz using a SpectraX light engine (Lumencor Inc., Beaverton, OR).The internal pipette solution contained (in mM) 121.Statistical analysis.We assessed the effectiveness of the data-driven experimental design method by comparing it with random selection in terms of the proportions of observing red-shift gains in the selected rhodopsins.The statistical significance of the effectiveness was quantified by comparing the red-shift gain proportions 0.82 (=32/39, p = 7.025 × 10 −5 ) with the probability of observing red-shift gains from randomly selected rhodopsins, i.e., 0.50, based on a binomial test.Since we set the base wavelength of each subfamily to the λ max of rhodopsin which was studied in detail in previous work and equal or longer than the empirical median of the λ max in each subfamily (Supplementary Fig. 2), it is reasonable to assume that the probability of observing red-shift gains from randomly selected rhodopsins must be smaller than or equal to 0.50.For statistical analysis of the ML model building and the evaluation of its performance, see the ML modeling section above.

Fig. 1
Fig. 1 Structure and phylogenetic tree of microbial rhodopsins.a Schematic structure of microbial rhodopsins.b Phylogenic tree of microbial rhodopsins.The subfamilies of light-driven ion-pump rhodopsins targeted in this study are differently colored; non-ion-pump microbial rhodopsins and ion-pumping microbial rhodopsins from eukaryotic and giant viral origins are shown in gray.

Fig. 2
Fig. 2 Illustrations of exploration-exploitation for screening rhodopsins with red-shift gain.a Bayesian prediction model constructed using the current training data (black crosses).The prediction model is represented by the predictive mean and predictive standard deviation (SD).The horizontal axis schematically illustrates the space of proteins defined through physicochemical features.The four vertical dotted lines indicate target proteins (candidates to synthesize).b Predictive mean.This function is defined as the expected value of the probabilistic prediction by the Bayesian model.c Predictive SD.Since the predictive SD represents the uncertainty of the prediction, it has a larger value when the training data points do not exist nearby.d The distributions on the vertical dotted lines represent the predictive distributions, and the horizontal dashed lines are the base wavelengths of the target points.The base wavelength is different for each target point because it depends on the subfamily of the protein.eThe density of the predictive distribution of each target protein on its red-shift gain value.The gain is defined as the predicted wavelength subtracted by the base wavelength, and if it is negative, the value is truncated as 0. This can be seen as a "benefit" that can be obtained by observing the target protein.f Expected value of the red-shift gain.This provides a ranking list from which the next candidates to be experimentally investigated can be determined.Target #4 has the largest expected gain, although target #1 has the largest increase in the predictive mean compared with base wavelength in e.Because of its larger SD (as shown in a, c, d, and e), target #4 is probabilistically expected to have a larger gain than the other targets.

Fig. 4 λ
Fig.4λ max of 39 microbial rhodopsins in solubilized E. coli membrane observed upon hydroxylamine bleach reaction.The difference absorption spectra between before and after hydroxylamine bleaching reaction of microbial rhodopsins in solubilized E. coli membrane.The λ max of each rhodopsin was determined by the peak positions of the absorption spectra of the original proteins, and the absorption of retinal oxime produced by the reaction of retinal Schiff base and hydroxylamine was observed as a negative peak at ~360-370 nm.

Fig. 5
Fig. 5 Observed wavelengths and expected red-shift gains.The predicted and observed red-shift (and blue-shift) gains for the 39 candidate rhodopsins that showed substantial coloring in E. coli cells.Differences between observed and base wavelengths are shown by the bars.The red bars indicate red-shift from the base wavelength, while the blue bars indicate observed wavelengths that were shorter than the base wavelengths.Proteins are sorted in the descending order by E½gain, as shown by the black line.Among the 39 candidates, 32 (82%) showed red-shift gains, suggesting that the proposed ML-based model can screen red-shifted rhodopsins more efficiently than random choice.

Fig. 7
Fig. 7 Diversity of the selected proteins.a Predicted standard deviation (horizontal axis) vs. observed gain (vertical axis).The marker shape represents the subfamily of each protein.b Two-dimensional projection created by principal component analysis.The original d = 432 dimensional feature space is projected onto the first two principal component directions.The first component (horizontal axis) explains 33% of the total variance of the original space, and the second (vertical axis) explains 17%.The green markers are the training data, and the black markers are the target data.For the synthesized proteins, differences in the observed and base wavelengths are shown by the color map.The results indicate that, by considering the exploration-exploitation trade-off, it was possible to make a red-shift protein screening process that considered not only the expected value of the prediction, but also the uncertainty.

Fig. 6
Fig. 6 Light-driven ion-transport activities of microbial rhodopsins showed longer λ max .a The light-induced pH change in the external solvent of E. coli cells expressing four microbial rhodopsins that showed a λ max ≥ 20 nm longer than the base wavelength of the subfamily.The data obtained without and with 10 μM CCCP are indicated by the blue and green lines, respectively, in 100 mM NaCl, CsCl, and NaNO 3 .Light was illuminated for 150 s (yellow solid lines).b Rubrivirga marina BacHR or PR (ECV93033.1 metagenome) were expressed in the membrane of ND7/23 cells (top image) and generated positive photocurrent in response to a green light pulse (200 ms, 549 nm, 28 mW/mm 2 ).The traces in the bottom are typical records at a holding potential of 0 mV.
Measurement of the absorption spectra and λ max of rhodopsins by bleaching with hydroxylamine.E. coli cells expressing rhodopsins were washed three times with a solution containing 100 mM NaCl and 50 mM Na 2 HPO 4 (pH 7).The washed cells were treated with 1 mM lysozyme for 1 h and then disrupted by sonication for 5 min (VP-300N; TAITEC, Japan).To solubilize the rhodopsins, 3% n-dodecyl-D-maltoside (DDM, Anatrace, OH) was added, and the samples were stirred for overnight at 4 °C.The rhodopsins were bleached with 500 mM hydroxylamine and subjected to yellow light illumination (λ > 500 nm) from the output of a 1-kW tungsten−halogen projector lamp (Master HILUX-HR; Rikagaku) through colored glass (Y-52; AGC Techno Glass, Japan) and heat-absorbing filters (HAF-50S-15H; SIGMA KOKI, Japan).The absorption change upon bleaching was measured by a UV-visible spectrometer (V-730; JASCO, Japan).

Table 1
Predicted and observed gains of 39 microbial rhodopsins expressed in E. coli.