Abstract
Predicting phenotypes from genetic variation is a central challenge in biology. Here, machine learning (ML) offers great promise, but its use is often limited by poor accessibility, difficulty with interpretability, and a “data-cliff”—a gap between abundant sequences and scarce functional measurements. To develop more robust methods for genotype–phenotype prediction, an outstanding model system is opsin genes, visual pigments with extensive phenotypic information that strongly influence animal spectral sensitivity. Here, we advance ML characterization of the opsin genotype–phenotype map through four main contributions. First, we introduce the Opsin Phenotype Tool for Inference of Color Sensitivity, a user-friendly platform for predicting maximum wavelength sensitivity (λmax) from amino acid sequences, featuring integrated modules for SHapley Additive exPlanations and 3D structural mapping to reveal sequence-specific mechanistic drivers. Second, we show that encoding sequences with amino acid physicochemical properties improves predictive performance and interpretability over standard encoding methods and performs competitively with state-of-the-art protein language models, while retaining biological explainability. Finally, we present the Mine-N-Match pipeline, which systematically links published opsin sequences to compiled data on in vivo λmax values, expanding genotype–phenotype coverage and improving prediction, especially for undersampled taxa. By integrating accessible software, biologically informed encoding, and data harmonization, our framework improves confidence, accuracy, and interpretability of genotype–phenotype predictions for animal opsins. An accurate genotype–phenotype map will allow simulating molecular evolution of function, reconstructing the history of visual phenotypes, designing functional proteins, and generating new hypotheses that can be tested with heterologous phenotyping.
Keywords: machine learning, regression, compiled database, genotype-phenotype map, predicting phenotypes, spectral sensitivity, color-vision, opsins, phylogenetics, cross-validation
Introduction
Accurately relating phenotypes and genetic variation is a central challenge in evolutionary biology (Wagner 2011; Kemble et al. 2019; Nichol et al. 2019). A strong understanding of such genotype–phenotype maps will allow reconstructing historical shifts in gene function (Yokoyama et al. 2014; Storz 2016) and simulating or forecasting evolutionary pathways (de Visser and Krug 2014; Lässig et al. 2017). Accurate genotype–phenotype maps could transform fields including molecular evolution, medicine, agriculture, and protein engineering. Yet, despite recent progress in heterologous expression assays (Liénard et al. 2022; Smedley et al. 2022) and high-throughput mutational scanning (Fowler and Fields 2014; Inoue et al. 2021), empirical approaches remain costly and time-consuming, limiting their scalability, especially for broad comparative studies.
Artificial intelligence (AI) including machine learning (ML) provides a powerful complement to empirical work by learning predictive rules from genotype–phenotype datasets. These computational approaches accelerate discovery, reduce dependence on labor-intensive empirical assays, and generate testable hypotheses for experimental validation (Vamathevan et al. 2019; Hie et al. 2020; Frazer et al. 2021). For example, protein language models trained on millions of sequences capture structural and functional constraints (Rives et al. 2021; Lin et al. 2023), and large language models (LLMs) can simulate protein evolution and forecast mutational effects across deep timescales (Hayes et al. 2025). Despite this promise, barriers remain. First, most ML/AI tools require computational expertise, limiting accessibility to experimental biologists. Second, while predictive performance has advanced rapidly, connecting model features to specific residues or physicochemical properties remains challenging in many approaches, complicating biological interpretation. Third, a persistent “data-cliff”—a steep imbalance between abundant sequences and scarce functional measurements—limits the training of robust, generalizable models (Bhardwaj et al. 2025). Overcoming these barriers is essential if genotype–phenotype prediction is to become a reliable, widely used tool in molecular evolution.
To address these barriers, opsins provide an outstanding system for advancing genotype–phenotype prediction (Karasuyama et al. 2018; Adam et al. 2022; Frazer et al. 2024; Sela et al. 2024). In animals, these G-protein-coupled receptors form the molecular basis of vision and determine color sensitivity through their maximum wavelength of light absorption (λmax) (Govardovskii et al. 2000). Opsins are especially well-suited for methodological development because they combine massive sequence diversity with extensive phenotypic data from heterologous expression, in vivo measurements, and comparative studies (Terakita 2005; Yokoyama 2008; Hagen et al. 2023). Moreover, opsins have repeatedly diversified across metazoans, offering natural experiments in functional convergence and divergence (Porter et al. 2012; Ramirez et al. 2016; Vöcking et al. 2017). This combination of broad sequence sampling, rich functional characterization, and evolutionary repeatability makes opsins an excellent model for testing and refining ML approaches to genotype–phenotype mapping.
Here, we advance ML modeling of the opsin genotype–phenotype map through three main contributions. First, we introduce the Opsin Phenotype Tool for Inference of Color Sensitivity (OPTICS), a user-friendly platform that predicts maximum wavelength sensitivity (λmax) from amino acid sequences. To begin bridging the gap between sequence prediction and biophysical mechanism, OPTICS integrates SHapley Additive exPlanations (SHAP) (Lundberg and Lee 2017) and 3D structural mapping, offering powerful methods for local interpretability by assigning specific values of phenotypic contributions to individual residues and visualizing their position in the protein in three-dimensional space. Second, we show that encoding sequences with physicochemical properties of amino acids improves predictive accuracy and allows better mechanistic interpretability, while also performing comparably to complex protein language models. Finally, we present the Mine-N-Match (MNM) pipeline, which systematically links published opsin sequences to compile in vivo λmax data, expanding genotype–phenotype coverage and improving prediction, especially for invertebrate opsins with sparse heterologous expression data. Together, these advances establish a methodological foundation for predictive molecular evolution using opsins as a model system—opening the door to simulating molecular evolution, reconstructing ancestral visual phenotypes, and generating testable hypotheses for experimental validation, while enabling direct between molecular evolution and visual ecological function in diverse light environments.
Methods
OPTICS: an accessible ML tool for predicting opsin spectral sensitivity
To improve the accessibility of our ML models, we developed the Opsin Phenotype Tool for Inference of Color Sensitivity (OPTICS), a comprehensive and user-friendly platform for predicting and interpreting opsin λmax values from unaligned amino acid sequences. OPTICS is available as a command-line tool, graphical-user-interface (GUI), and a web application under the Galaxy system. The GUI integrates four distinct analytical pipelines: (1) Standard Predictions, (2) SHAP Interpretation, (3) Structure SHAP Mapping, and (4) Structure Annotations (all modules described in more detail below). Additionally, the GUI provides hyperlinked execution logs for seamless navigation of results. Across these modules, OPTICS provides users eleven best-performing ML models, trained on 11 different datasets, which can use either one-hot encoding (scoring each amino acid at each position as either present or absent) or an “amino-acid property” (aa-property) encoding scheme described herein. For prediction, OPTICS aligns the user's query sequence to the training alignment of the selected model using MAFFT (Katoh and Standley 2013).
In addition, OPTICS incorporates optional bootstrapping and BLASTp (Camacho et al. 2009) analyses. Bootstrapping (described in more detail below) quantifies uncertainty, including box plots, colored to reflect the median predicted λmax using the corresponding hex-code color value. The BLASTp analysis compares query sequences against the training dataset of the selected model. Site numbering in BLASTp reports can be standardized to a chosen reference sequence (e.g. bovine or squid rhodopsin) or a custom one (see Methods S1 for implementation details and availability). OPTICS is implemented in Python, with core functionality built using scikit-learn (Pedregosa et al. 2011) for model execution and BioPython (Cock et al. 2009) for sequence handling, along with dependencies such as MAFFT, BLAST+, and standard Python data-processing libraries.
Assessing prediction stability with bootstrapping
To evaluate the stability of λmax predictions and estimate confidence intervals (CIs), we implemented a bootstrapping pipeline. For each VPOD opsin data subset (Frazer et al. 2024), we generated 100 pseudoreplicated datasets by randomly resampling with replacement entire sequences and their associated λmax value. For each pseudoreplicate, we trained a separate ML model for predicting λmax for sequences input into OPTICS. We report mean and median predictions across replicates, using the 2.5th and 97.5th percentiles to construct CIs (see Methods S2). To illustrate the procedure, we applied bootstrapping to three example sequences with disparate λmax: a short-wave sensitive (SW) opsin (OX393528.1-9544021-9545976) from the Tobacco Hornworm (Manduca sexta), a rhodopsin (Rho; MN519143.1) from the Bluespotted Stingray (Neotrygon kuhlii), and a long-wave sensitive (LWS) opsin (MK983124.1) from the Corkwing Wrasse (Symphodus melops).
Encoding amino acid physicochemical properties for ML model training
We compared traditional one-hot encoding (each amino acid scored as present or absent at each position) to a novel encoding based on 12 physicochemical properties (aa-properties; see Methods S3 and Table S1 for a more detailed justification of aa-property choices and actual values used). In the new approach, we represented each amino acid as continuous values of amino acid properties. Unlike one-hot encoding, which treats all unseen residues at a site as equivalent, aa-property encoding allows all models to use information for residues not present in the training set (Figure S1a/b). We used deepBreaks (Baghbanzadeh et al. 2023; Frazer et al. 2024) to test all possible aa-property combinations across six VPOD datasets. For each dataset, we trained models with 12 ML algorithms and recorded standard performance metrics. Under a null hypothesis of no change between encoding types, we next used Wilcoxon Signed-Rank Tests to compare aa-property and one-hot models based on cross-validation error for the whole dataset (WDS) and on the accuracy of predicting λmax of mutants using models trained only on wild type (WT) data (Gommers et al. 2022; Damian Riina et al. 2023; Frazer et al. 2024). Finally, we built visualization tools to assess the site-wise contributions of specific aa-properties to λmax predictions (Methods S3).
To evaluate the performance of our biologically interpretable feature engineering against state-of-the-art representation learning, we extracted sequence embeddings using the ESM-2 (esm2_t36_3B_UR50D) protein language model (Lin et al. 2023). Embeddings were extracted for all the opsin datasets from VPOD v1.2. Using a modified version of the deepBreaks pipeline (Frazer et al. 2024), we trained regression models (including GBR and XGBoost) on these high-dimensional ESM-2 embeddings and compared their predictive metrics (e.g. R2, MAE) to our models trained using aa-property encoding. All extraction code, Jupyter notebooks for model training, and resulting comparative model metrics for this benchmarking analysis are available in the VPOD GitHub repository.
Expanding model interpretability with SHAP and 3D models
To move beyond global feature importance (the relative importance of individual features to a model) and provide sequence-specific mechanistic insights, we integrated SHAP (Lundberg and Lee 2017) into OPTICS. This feature operates in two primary modes. In “single” mode, OPTICS calculates the SHAP values for individual query sequences, quantifying how much each specific amino acid state or physicochemical property shifts the predicted λmax away from the model's base value (average predicted λmax of the decision-tree based models; e.g. XGB, GBR, and RF). In “comparison” mode, OPTICS performs pairwise comparisons between user-provided sequences, calculating the difference in SHAP values to attribute predicted spectral tuning shifts to specific amino acid differences between the two sequences. To allow for easy analysis of biological relevance, the pipeline automatically maps feature indices back to the target sequence numbering and/or a standardized reference sequence (e.g. Bovine Rhodopsin).
To facilitate spatial understanding of sequence features, we developed two structural visualization modules in OPTICS. The first module, “Structure SHAP Mapping,” projects the calculated SHAP importance values directly onto 3D protein structures. The tool parses the absolute SHAP values for a given sequence, aggregates them by residue position, normalizes the scores to a 0 to 100 scale, and replaces the B-factor (temperature factor) column of a target PDB file (e.g. Bovine Rhodopsin 1U19, or a user-provided custom PDB, including structures generated using AlphaFold). This effectively creates a 3D structural heatmap of ML feature importance.
The second module, “Structure Annotations,” allows users to visualize arbitrary, custom annotations (e.g. known tuning sites, mutational targets) without requiring coding expertise. Users provide a PDB file containing their target structure and a simple CSV file defining residue positions, colors, styles (e.g. spheres, sticks), and labels. OPTICS then generates automated execution scripts for popular molecular visualization software (PyMOL or ChimeraX) for rendering the 3D models. For an example input of this module see the file “optics_custom_annotations_ex.csv” in the “/examples” folder on the OPTICS GitHub.
Assessing phylogenetic nonindependence in model evaluation
Because closely related sequences can inflate predictive performance when present in both training and testing sets, we evaluated the impact of phylogenetic nonindependence on model accuracy. We implemented a phylogenetically informed cross-validation scheme that assigns sequences to folds based on pairwise distances from a maximum likelihood opsin gene tree, generated with IQ-TREE (Minh et al. 2020), thereby reducing similarity between training and test partitions. Across a range of fold numbers and distance thresholds, this approach produced performance estimates broadly consistent with standard cross-validation, indicating that phylogenetic structure does not qualitatively alter model comparisons (see Methods S4). Given these results, and to maintain computational efficiency and usability, OPTICS uses standard cross-validation for model training and prediction.
Optimizing model hyperparameters via grid search
To determine the best-fit hyperparameters for training ML models, we performed comprehensive grid searches (Pedregosa et al. 2011; Liashchynskyi and Liashchynskyi 2019; Baghbanzadeh et al. 2023) for the three algorithms (GBR, XGB, and RF), each applied to six primary VPOD data subsets (WDS, WT, Vert, Invert, WT-Vert, and T1), using both aa-property encoding and one-hot encoding strategies. For aa-property encoding, we first selected the top ten performing aa-property combinations (five by best R2, five by lowest MAE) from earlier combinatorial analysis. We recorded grid search-optimized R2 and MAE values and their corresponding hyperparameters, ultimately selecting the single best model algorithm and, for aa-property encoded models, the best aa-property combination and ML algorithm for each data subset (see Methods S5, Tables S2 and S3).
Mine-N-match pipeline: linking genotypes to in vivo phenotypes
We developed the Mine-N-Match (MNM) pipeline to address the opsin “data-cliff,” where many more species have opsin sequences than associated λmax measurements. MNM uses in vivo λmax values compiled from prior studies, retrieves opsin sequences from the same species, predicts λmax for those sequences with OPTICS, and expands the amount of sequence data with corresponding phenotypes when predictions match measurements. We first assembled VPOD_in_vivo_v1.0 (Methods S6) from six published compilations and additional literature searches to harmonize in-vivo λmax data from microspectrophotometry (Liebman et al. 1972; Bowmaker 1984), electroretinograms (Jacobs et al. 1996; Rocha et al. 2016), and related techniques. As a proof of concept, VPOD_in_vivo_v1.0 is not comprehensive and additional λmax measures can be added in future updates. Using the species list from VPOD_in_vivo_v1.0, we queried the NCBI taxonomy database (Schoch et al. 2020), corrected names with the Global Biodiversity Information Facility (GBIF) taxonomy when necessary (Lane 2003; Edwards 2004), and retrieved opsin coding sequences (nucleotide and protein) from NCBI (Sayers et al. 2025). To minimize the inclusion of nonvisual opsins from unspecific genome-wide selections, our automated NCBI queries incorporated an extensive list of explicit exclusion keywords (e.g. “melanopsin,” “OPN4,” “non-visual”). We supplemented these from other compiled sources to capture sequences absent from NCBI (Methods S6). Before the matching step, all retrieved candidate sequences were subjected to a BLASTp query against a curated reference database containing both visual and nonvisual opsins. Any sequence returning a top hit to a nonvisual opsin was strictly discarded. We then deployed the “whole-dataset,” aa-properties, model on OPTICS_v1.2 to predict λmax for all candidate sequences and matched each predicted value to the closest in vivo λmax measurement for each species in VPOD_in_vivo_v1.0. Matches were filtered to retain only the best match (absolute difference ≤10 nm) and to remove sequences already in VPOD or flagged as unlikely opsins by OPTICS BLASTp output. While we employ a strict 10 nm threshold here to serve as a conservative consistency filter, researchers utilizing the open-source MNM pipeline can easily adjust this parameter, or evaluate the unfiltered output files provided in our repository, to explore results using alternative stringencies. To track potential matching ambiguity, the pipeline automatically outputs a “candidate_opsin_count” for each match, recording the total number of candidate sequences for that species falling within the 10 nm threshold. We integrated these genotype–phenotype pairs into VPOD_v1.3, adding new “physiologically inferred” data subsets, each named with an “MNM” suffix in metadata and FASTA files. We trained models on these subsets and compared their performance to models trained on heterologously expressed opsins (see Methods S7).
To evaluate the fidelity of the MNM pipeline, we conducted a blind-retrieval validation test. We randomly selected and withheld 50 wild-type opsin sequences from the “whole-dataset” (specifically excluding any opsins with corresponding mutant data to avoid data leakage). We then trained a new OPTICS model on the remaining sequences. Treating the 50 true in vitro λmax values as mock in vivo measurements, we ran the full MNM pipeline; querying NCBI for the respective species, predicting λmax with the newly trained model, and filtering for best matches. We then evaluated the proportion of correctly recovered target sequences to quantify pipeline accuracy.
Results
OPTICS: an accessible ML tool for predicting opsin spectral sensitivity
The Opsin Phenotype Tool for Inference of Color Sensitivity (OPTICS) enables rapid prediction of opsin spectral sensitivity (λmax) from protein sequences using ML models trained on genotype–phenotype data from the Visual Physiology Opsin Database (VPOD) (Frazer et al. 2024). OPTICS offers multiple pretrained models tailored to different taxonomic groups and allowing different sequence encoding strategies, including one-hot and amino acid property (aa-prop) encoding. In addition to λmax prediction, OPTICS provides optional analyses for sequence interpretation, including BLASTp comparisons to training data, site-difference reports standardized to reference sequences, and bootstrap-based confidence estimates that can be visualized as distribution plots (Fig. 1). The tool outputs predicted λmax values (mean, median, percentile-based CI, and SD) in TSV and Excel formats, along with metadata on the model, encoding method and a parameter log; optional outputs include BLASTp reports and bootstrap plots. OPTICS is freely available via GitHub and as a web application using the Galaxy Project platform (Galaxy Community 2024). Moreover, the standalone desktop GUI further democratizes these capabilities by uniting all OPTICS features—standard predictions, SHAP analysis, and structural mapping—under a single, user-friendly interface that handles multithreaded processing and provides hyperlinked execution logs for seamless navigation of results.
Figure 1.
Box plot distributions of bootstrapped λmax predictions illustrate the contrasting prediction confidence (distribution width) from the WDS bootstrap-ensemble when predicting the λmax for a short-wave (SW) opsin (OX393528.1-9544021-9545976) from the Tobacco Hornworm (Manduca sexta) (95% CI width = 54 nm, SD = 14.7), a Rhodopsin (Rho; MN519143.1) from the Bluespotted Stingray (Neotrygon kuhlii) (95% CI width = 6.2 nm, SD = 1.6 nm), and long-wave sensitive (LWS) opsin (MK983124.1) from the Corkwing Wrasse (Symphodus melops)(95% CI width = 34.1 nm, SD = 10.0 nm). Note, the colors of the boxes automatically reflect the median predicted λmax converted to the corresponding hex-code value. This method of uncertainty quantification and visualization formed an integral component for reporting OPTICS prediction uncertainty.
Bootstrapping provides feedback on prediction stability and confidence
Bootstrapping produced quantitative CIs and allowed qualitative assessment of prediction distributions, as illustrated for the three example opsins (Fig. 1). The SW opsin from M. sexta exhibited a wide 95% CI (54 nm, SD = 14.7), the Rho from N. kuhlii had a conversely narrow CI (6.2 nm, SD = 1.6), and the LWS opsin from S. melops was of intermediate width (34.1 nm, SD = 10.0). In plots, box colors automatically reflect the median predicted λmax converted to the corresponding hex-code value. This quantification and visualization of uncertainty using bootstrapping is an integral feature of OPTICS outputs.
Encoding with physicochemical properties of amino acids enhances ML interpretability and predictive power
Across all datasets, models using aa-property encodings achieved higher R2 and lower error metrics than one-hot models (Table 1, Table S4). For example, in WDS, aa-property encoding improved R2 from 0.956 to 0.964 and reduced MAE by 18.5% (6.48 nm to 5.28 nm; P = 2.43 × 10^−14, Wilcoxon test). We also saw some improvement for WT models predicting mutant opsins, with MAE decreasing from 10.0 nm to 9.63 nm (P = 0.046, Wilcoxon test). Optimal aa-property sets differed by dataset, but hydrophilicity and hydrogen bonding properties appeared frequently. Although the magnitude of encoding improvement on mutants (MAE of 10.0 nm to 9.63 nm) is statistically significant, it is practically modest. Choice of well-fitted nonlinear algorithms (e.g. GBR, XGBoost) over others provides substantially larger gains than does the choice of encoding scheme; meaning the most benefit to prediction performance comes from simply selecting the appropriate algorithm class for your dataset (see the section “ML algorithm type contributes to the predictive power of ML models” from our previous work (Frazer et al. 2024) for a more detailed discussion of this point).
Table 1.
Performance metrics across opsin subsets and top performing models using amino-acid property encoding.
| Name | Data Subset Version | # Seqs | Top ML Algorithm | Top AA_Prop Combos | R2a | MAE [nm]b | MAPE [%]b | MSEa | RMSEa |
|---|---|---|---|---|---|---|---|---|---|
| Whole dataset (WDS) | VPOD_wds_het_1.2 | 1211 | XGB | H1,P2,SCT | 0.964 | 5.46 | 1.22 | 138 | 11.4 |
| Wild-types (WT) | VPOD_wt_het_1.2 | 364 | GBR | H2,H3,P1,NCI,PKA | 0.939 | 8.01 | 1.73 | 181 | 13.0 |
| Vertebrates (Vert) | VPOD_vert_het_1.2 | 1057 | XGB | H2,H3,NCI,SCT,PKB | 0.978 | 5.13 | 1.14 | 81.5 | 8.91 |
| WT vertebrates (WT-Vert) | VPOD_wt_vert_het_1.2 | 319 | GBR | H2,P2,V | 0.979 | 4.73 | 1.01 | 56.2 | 7.14 |
| Invertebrates (Invert) | VPOD_inv_het_1.2 | 155 | GBR | H1,H3 | 0.831 | 13.4 | 2.86 | 515 | 21.2 |
| Whole dataset MNM (WDS-mnm) | VPOD_wds_het + vivo_1.0 | 1724 | XGB | H2,H3,NCI,MASS | 0.959 | 6.23 | 1.32 | 138 | 11.6 |
| Wild-types MNM (WT-mnm) | VPOD_wt_het + vivo_1.0 | 877 | GBR | H2,P1,NCI,MASS,SASA,PKB | 0.951 | 8.14 | 1.74 | 168 | 12.8 |
| Vertebrates MNM (Vert-mnm) | VPOD_vert_het + vivo_1.0 | 1393 | XGB | H3,P2,SCT,PKA,PKB | 0.983 | 4.34 | 0.96 | 62.4 | 7.71 |
| WT vertebrates MNM (WT-Vert-mnm) | VPOD_wt_vert_het + vivo_1.0 | 655 | XGB | H2,H3,PKB | 0.981 | 4.64 | 0.98 | 52.3 | 6.83 |
| Invertebrates MNM (Invert-mnm) | VPOD_inv_het + vivo_1.0 | 331 | GBR | H1,P1,SCT | 0.896 | 13.0 | 2.81 | 473 | 20.7 |
| Type-One Opsins (T1) | Karyasuyama_T1_ops | 884 | XGB | H3,P1,PKB | 0.846 | 7.99 | 1.49 | 141 | 11.8 |
Summary: Machine learning (ML) models trained on opsin genotype–phenotype data using optimal sets of amino-acid properties are capable of accurately predicting λmax.
aR2, mean square error (MSE) or root mean square error (RMSE) are often interpreted as direct measures of comparing/analyzing model performance and used as training loss terms of the objective function—which measures how well the model fits the training data. One has to often balance between this and the regularization term, which controls the complexity of the model. Thus, a high performance is both simple and predictive; a tradeoff referred to as the “bias-variance” tradeoff. Additionally, note that the values presented here do not reflect performance metrics obtained with PW-CV; Table S5 provides all available information on Wild-Type model performance metrics under different PW-CV parameters.
bMean absolute error (MAE) and mean absolute percent error (MAPE) are in relation to the absolute error λmax predictions and interpreted in the same units of “nm.”
To evaluate whether our biologically informed feature engineering was competitive with state-of-the-art representation learning, we benchmarked our top-performing regression models (GBR, XGBoost) using sequence embeddings extracted from the ESM-2 protein language model (Lin et al. 2023) in place of our aa-property encodings. Models trained on ESM-2 embeddings yielded performance metrics that were similar to, but in all cases slightly worse than, models trained on our optimized combinations of physicochemical properties (Table 1, Table S5; ESM-2 WDS R2 = 0.961, MAE = 7.28 nm vs. AA-Prop WDS R2 = 0.964, MAE = 5.49 nm). Because models trained on embeddings fundamentally sacrifice site-wise mechanistic explainability, a core objective of the OPTICS framework, and require substantial additional computational overhead to embed every new query sequence prior to prediction, we retained physicochemical property encoding as the optimal balance of high predictive accuracy, computational efficiency, and biological interpretability.
We also used aa-property encoding to explore biological interpretability. Visualizations of site–property importance (Fig. 2a) showed that amino acid mass at site 43, hydrophobicity at site 94, and charge at site 124 strongly influenced predictions of λmax. Furthermore, at site 94 (Fig. 2c), we find higher hydrophobicity (H1) to be correlated with lower λmax, while at site 124 (Fig. 2d) we find the net charge index (NCI) of amino acid to be positively correlated with λmax. These property–phenotype relationships would be less apparent in amino acid identity plots using standard one-hot encoding, as it treats amino acids as simple categorical objects, thereby obscuring the trends revealed when working with continuous aa-property values. This highlights an advantage of property-based visualizations for mechanistic insight.
Figure 2.
A WT model trained on the amino-acid property (aa-property) combination of hydrophobicity (H1), net charge index (NCI), and mass (MASS) reveals that properties such as amino-acid mass at site 43, hydrophobicity at site 94, and amino-acid charge at site 124 exerted relatively high influence on predictions of λmax. a) Bar graph of relative importance by position generated via the mean importance values from the “BayesianRidge,” “GBR,” “XGB,” and “RF” ML regression model trained on the WT-Vertebrate opsin dataset. We interpret positions with higher relative importance as having a larger effect or weight on λmax prediction. Positions 43, 94, and 124 are highlighted with stars because they are among the highest scoring sites, show clear trends between target aa-property and associated λmax distributions, and have all been previously characterized as functionally important to opsin phenotype and function. b to d) Distribution box plots for sites 43, 94, and 124, comparing the relationship between selected aa-property and associated range of λmax values. The top distribution box plots provide a biologically interpretable visualization for the relationship between the measure of a physiochemical aa-property and associated range of λmax values at a site of interest. At sites 43 and 124, increasing amino-acid mass and charge values display a positive correlation with true λmax values, while increasing hydrophobicity is negatively correlated with λmax at site 94. This ease of biological interpretation is lost when we simply visualize the relationship between amino-acids (as categories) and λmax. Note, all aa-properties are normalized, either −1 to 1 or 0 to 1 for ML training. Thus, these values do not reflect true units. For a more detailed explanation on how position importance scores are calculated for different models, refer to the “Interpretation” heading under the methods section of the deepBreaks publication (Baghbanzadeh et al. 2023).
SHAP reveals sequence-specific and pairwise mechanistic drivers of phenotype predictions
While global feature importance highlights universally critical tuning sites (e.g. sites 43, 94, 124), it cannot easily explain the specific contribution of individual sequence features to a predicted phenotype nor the reasons for predicted shifts in phenotype between two closely related sequences. Using our integrated SHAP pipeline, OPTICS successfully deconstructs individual λmax predictions into additive feature contributions. For any given query sequence, the tool generates summary files and bar plots detailing how amino acid properties (e.g. a highly hydrophobic residue at a specific reference position) push the predicted λmax higher or lower relative to the training dataset average (Fig. 3a). Furthermore, the pairwise comparison mode successfully isolates the exact feature differences driving predicted spectral shifts between any two sequences (Fig. 3c); a feature potentially most useful for understanding spectral tuning sites which drive differences in predicted λmax between closely related opsins. By generating all-to-all difference matrices and pairwise SHAP comparison plots, the tool provides immediate, testable hypotheses regarding which specific mutations are responsible for observed or predicted functional differences in target visual systems. For example, when comparing the LWS1 and LWS2 paralogs of C. phantasticus (Sommer 2025; Fig. 3c; sequences provided as supplementary data, SD1), OPTICS explicitly identifies that a substitution at position 208 from Methionine (M) to Leucine (L), which increases site hydrophobicity (H1), is the primary driver of the 30.4 nm predicted blue-shift between the two sequences, followed by property shifts at sites 261 and 269.
Figure 3.
OPTICS integrated SHAP and structural mapping reveals mechanistic drivers of spectral tuning for single sequences and pairwise comparisons. a) Single-sequence SHAP explanation for the Long-Wave Sensitive 1 (LWS1) opsin of C. phantasticus (sequences provided as supplementary data, SD1). The bar plot displays the top sequence features—mapped to Bovine Rhodopsin reference numbering—and their specific physicochemical properties (e.g. Side Chain Type [SCT] at site 286, Polarizability [P2] at site 184) contributing to the predicted λmax of 555.60 nm, relative to the model's base value of 468.74 nm. b) 3D structural mapping of the single-sequence SHAP values from (a) onto the Bovine Rhodopsin (1U19) reference structure. Normalized SHAP importance scores are visualized as a heatmap (cyan to orange), physically locating the most influential predictive residues within the transmembrane helices. c) Pairwise SHAP comparison illustrating the specific features driving a 30.4 nm predicted blue-shift between two paralogs, C. phantasticus LWS1 (555.6 nm) and LWS2 (525.2 nm). The plot quantifies how specific amino acid substitutions and their corresponding property changes (e.g. a shift from Methionine [M] to Leucine [L] at position 208 increasing hydrophobicity, [H1]) contribute additively to the difference in predicted phenotype. d) 3D structural mapping of the pairwise SHAP difference values from (c) onto the Bovine reference structure, highlighting the spatial distribution of the mutations responsible for the functional divergence between the LWS1 and LWS2 paralogs.
The utility of the SHAP module as a hypothesis generating tool is further elevated when used in combination with the “SHAP structure mapping” module, allowing for three-dimensional visualizations of the sequence features, which impact individual phenotype prediction or which separate two sequences in predicted phenotype space (Fig. 3b/d). Referring back to the pairwise comparison of C. phantasticus paralogs, structural mapping quickly reveals how the potential tuning sites driving paralog divergence (such as sites 208, 261, and 269) are spatially distributed around the retinal binding pocket (Fig. 3d). Our structural mapping pipeline maps SHAP-derived importance scores onto the B-factor column of both the standard bovine rhodopsin (1U19) structure and user-provided PDB files, repurposing this field to encode residue-level importance rather than atomic displacement. Additionally, the custom annotation module automates visualization of user-defined sites of interest (e.g. residues surrounding the binding pocket, in combination with SHAP-highlighted sites), bypassing the need for molecular visualization scripting.
Assessing the effects of phylogenetic nonindependence on model performance
To evaluate whether phylogenetic relatedness inflates performance estimates, we applied a phylogenetically informed cross-validation scheme that partitions sequences based on evolutionary distance (see Methods; Methods S4). We found that increasing the stringency of phylogenetic separation led to modest declines in performance metrics (e.g. R2), reflecting reduced similarity between training and test data (Figure S2, Table S6). These effects did not qualitatively alter comparisons among models, encoding strategies, or algorithm classes. In particular, aa-property encoding continued to outperform one-hot encoding, and tree-based methods (e.g. GBR, XGBoost) remained the top-performing algorithms under phylogenetically informed partitioning. Together, these results indicate that while phylogenetic structure influences absolute performance estimates, it does not change the relative conclusions of our analyses. Given this, and to maintain computational efficiency and accessibility, OPTICS uses standard cross-validation for model training and prediction.
Hyperparameter optimization via grid search identifies dataset-dependent parameters, enhancing ML predictive power
For models trained with one-hot encoded sequences, our grid search (gs) pipeline identified the specific algorithm (among GBR, XGB, and RF) and its corresponding hyperparameters that yielded the highest R2 for each individual dataset. While the best-performing algorithm varied depending on the dataset, the optimization process successfully pinpointed configurations maximizing predictive accuracy based on R2. The optimized hyperparameters and the resulting top R2 scores for the best-performing algorithm identified for each dataset are detailed in Table S2.
For models trained using aa-property encoded sequences, our grid search pipeline identified the single best-performing combination of aa-properties and ML algorithm hyperparameters for each dataset, based on maximizing the postgrid-search R2 value. The specific aa-prop combination selected, the best-performing algorithm with its optimized hyperparameters, and the corresponding peak R2 values achieved for each dataset are documented in Table S3.
ML can help link genotype data to in vivo measurements of phenotype
VPOD_in_vivo_v1.0 contains 3810 unique in vivo λmax measurements across 1397 species from nine phyla. From those species, we mined 2565 candidate visual opsin sequences from 329 species (split between NCBI and supplementary sources). The MNM pipeline matched predictions from these sequences to physiological λmax values, yielding 852 initial matches, filtering for best match per species and removing duplicates. After removing poor matches (>10 nm difference between prediction and in vivo measurement), we retained 526 genotype–phenotype links for use in subsequent model training.
To quantify the risk of false matches caused by multiple viable candidates, we calculated the average number of opsins falling within the 10 nm threshold per in vivo target. On average, successful matches had 2.11 candidate opsins; however, this figure was driven primarily by a few outlier teleosts and insect species possessing 10 to 18 potential candidates, suggesting that the vast majority of matches face minimal ambiguity. Furthermore, our blind-retrieval test demonstrated the high fidelity of the MNM pipeline. Out of 50 withheld wild-type sequences processed as mock in vivo targets, the pipeline successfully retrieved and correctly matched 47 sequences (94% accuracy). The three incorrect matches were entirely driven by incorrect paralog assignment within species containing multiple opsins with nearly identical λmax values. In one case, two paralogs with true λmax values of 561 and 562 nm were both predicted at 561.3 nm, resulting in an essentially randomly swapped assignment. The third mismatch similarly involved a sequence incorrectly matched over the correct paralog. The two opsins had predicted λmax which differed by only 3.9 nm (490.8 and 494.7 nm) and were forced to match a single target λmax value (491 nm).
Harmonizing in vivo and in vitro data improves prediction of spectral sensitivity for undersampled opsin families
We integrated the 526 matches into VPOD_v1.3, creating five new data subsets that merge heterologous data and matched data (WDS-mnm, WT-mnm, Vert-mnm, WT-Vert-mnm, Invert-mnm). This addition doubled the number of wildtype genotype–phenotype links, as illustrated by the wild-type (WT) (364 to 877) and invertebrate (Invert) (155 to 331) datasets. Models trained on MNM-augmented subsets consistently outperformed those trained on heterologous-only data. For example, a gs-optimized aa-property model on Invert-mnm achieved R2 = 0.901, MAE = 13.2 nm, compared with R2 = 0.839, MAE = 13.1 nm for heterologous-only Invert. The WT-mnm model likewise improved, if only slightly (R2 = 0.949 vs. 0.939; MAE = 7.17 nm vs. 8.08 nm). Gains were especially strong for understudied invertebrate opsins, suggesting that incorporating inferred in vivo data improves generalization and accuracy (Table 1; Tables S2 to S6). We deployed these new MNM-trained models, plus bootstrap versions, as part of the OPTICS_v1.3 public release on GitHub.
Discussion
Accurately predicting protein function from sequence remains a central challenge in molecular evolution. We advance this goal using opsin visual pigments by integrating interpretable ML and systematic data harmonization. Our contributions include the following: (1) OPTICS, an accessible and flexible tool to predict λmax; (2) encoding based on amino acid properties that improve accuracy and generalizability over one-hot encoding; (3) bootstrapping and to better understand the uncertainties of model predictions; and (4) the Mine-N-Match (MNM) pipeline, which bridges the “data-cliff” between sequence-rich and phenotype-poor datasets. Together, these innovations provide a framework for more accurate genotype–phenotype prediction and make these capabilities broadly available for visual ecology and molecular evolution.
Democratizing phenotype prediction
Powerful ML models and structural biology tools often require specialized computational expertise, limiting their reach. OPTICS removes this barrier by offering command-line, GUI, and web-based interfaces that predict λmax directly from amino acid sequences, while requiring minimal bioinformatics background. The tool packages pretrained models across data subsets and encoding strategies, automates alignment insertion, performs bootstrap analysis for CIs, and generates SHAP explanations of phenotype predictions which it can then map onto 3D structures. This accessibility enables a wider community, especially visual ecologists and molecular evolutionists, to seamlessly incorporate predictive modeling and structural visualization into their research workflows.
Despite the broad utility of these ML models, caveats exist. The models predict λmax, a central but incomplete descriptor of spectral sensitivity. λmax does not capture activation kinetics or in vivo modifiers like screening pigments (Arikawa and Stavenga 1997), oil-droplets (Das et al. 1999; Hart and Vorobyev 2005; Toomey et al. 2015; Toomey and Corbo 2017), or chromophore shifts (Buczyłko et al. 1996; Terakita 2005; Sekharan and Morokuma 2011). The tool will also return predictions for any sequence, including nonfunctional or partial opsins, which may yield unreliable results, especially if missing data involve key tuning sites. While OPTICS alerts users when sequence identity to known opsins is low, future versions could incorporate automated filtering of nonopsins and pseudogenes. While we cannot state a specific “cut-off” for the reliability of predictions, as with any ML tool, predictions for highly divergent sequences require caution. Thus, such features as bootstrap intervals and BLASTp provide critical feedback for individual assessments of prediction reliability.
Advancing ML genotype–phenotype links: confidence and interpretability
Reliable genotype–phenotype prediction from biological sequences requires three pillars: robust confidence estimates, evaluation methods that account for evolutionary relatedness, and biologically grounded interpretability. CIs provide important context for the reliability of predictions. Herein, bootstrapping demonstrated substantial variance in confidence across different opsins (Fig. 1); reflecting differences in how well-sampled are different regions of genotype–phenotype space. Without CIs, predictions from sparsely sampled paralogs could appear as certain as those for conserved, highly sampled genes, like vertebrate rhodopsins.
We found model interpretability to benefit from encoding strategies that reflect amino acid properties. One-hot encoding, while common, treats each amino acid as an unrelated category and fails to capture similarities based on shared physicochemical properties. By contrast, our amino acid property encoding improves both predictive accuracy and generalization to mutant sequences (Table 1, Table S4; Figure S2a and b), likely because it allows the model to exploit biologically relevant relationships, even for amino acids absent from the training set, and because amino acid properties may contain more information about changes to opsin tuning sites. Conversely, while highly parameterized protein language models (like ESM-2) offer powerful sequence representations (Brandes et al. 2023; Lin et al. 2023; Hayes et al. 2025), our benchmarking revealed that they provided no distinct predictive advantage over our optimized physicochemical property combinations for this specific task (Table 1, Table S5). Crucially, aa-property encoding allows the model to exploit biologically relevant relationships while explicitly preserving site-wise explainability; an attribute lost when sequences are transformed into high-dimensional embedding space.
Visualizations of site-wise importance from our aa-prop models link predictive patterns to known or candidate spectral tuning mechanisms. For example, our models identified hydrophobicity at site 94, a position in the binding pocket near the counterion at site 113 and the Schiff base linkage at site 296, as negatively correlated with λmax, consistent with the role of hydrophobic interactions in stabilizing the chromophore binding pocket (Takahashi and Ebrey 2003; Chinen et al. 2005; Tsukamoto et al. 2017). Similarly, charge at site 124, another known tuning site (Zheng et al. 2015; Castiglione and Chang 2018), showed a positive correlation with λmax. Such property–phenotype relationships provide direct, mechanistic hypotheses for experimental testing, and future work could also integrate epistasis or multiproperty effects to further enhance interpretability. That said, it is important to note that several properties are likely correlated (e.g. hydrophobicity, volume, SASA), which could complicate interpretation of aa-property feature importance. Future iterations of this work could seek to address this by applying an additional correlation filter when using combinatorial analysis to find the optimal aa-property combinations for a given dataset.
While global visualizations of site-wise importance provide a broad overview of tuning mechanisms, such as identifying the general role of hydrophobicity at site 94 or charge at site 124 in the binding pocket, they fail to explain the specific evolutionary trajectory of individual sequences. By integrating SHAP, OPTICS bridges this gap, providing local interpretability. SHAP values explicitly quantify how specific amino acid states in a given sequence contribute to its unique λmax, and the pairwise comparison tool isolates the exact features driving predicted functional divergence between two sequences. Crucially, OPTICS takes this interpretability a step further by mapping these SHAP values directly onto 3D protein structures. By converting ML feature importance into structural heatmaps, researchers can visually assess whether highly influential sites are structurally clustered, interacting directly with the chromophore, or exerting allosteric effects from the protein surface. As demonstrated with the SHAP comparison of C. phantasticus LWS paralogs, SHAP can highlight potential tuning sites driving paralog divergence (such as sites 208, 261, and 269; Fig. 3c) and structural mapping can quickly reveal how these potential tuning sites are spatially distributed around the retinal binding pocket (Fig. 3d). This seamless transition from raw sequence, to ML prediction, to biophysical structural context provides direct, mechanistic hypotheses for experimental testing (e.g. site-directed mutagenesis). Future work could also integrate interaction maps within these 3D SHAP maps to further enhance our understanding of the structural basis of spectral tuning.
Bridging the data-cliff with mine-N-match
A persistent challenge in functional genomics is the data cliff, the steep disparity between the abundance of sequence data and the relative scarcity of experimentally characterized phenotypes. This imbalance limits our ability to fully use genomic information for predictive modeling of phenotypes. Opsins exemplify this challenge: while in vitro measurements of heterologously expressed sequences provide precise and controlled functional data, they are demanding technically, especially for invertebrate r-opsins, and thus limited in number. By contrast, in vivo measurements of spectral sensitivity (e.g. microspectrophotometry, electroretinograms) are more numerous across species but are rarely linked to the exact opsin sequences responsible.
The Mine-N-Match (MNM) pipeline addresses this gap by using predictions from ML as an informed bridge between unlinked in vivo phenotypes and available sequences. Importantly, MNM does not generate new phenotype values or sequences. Instead, it links independently measured in vivo λmax values and empirically derived opsin sequences from the same species using model predictions from OPTICS as a conservative consistency filter. MNM automates the retrieval of candidate opsin sequences for species with known in vivo λmax, predicts λmax for each candidate using OPTICS, and assigns the most likely sequence to a phenotype. Because this assignment requires close agreement between predicted and empirical λmax values, MNM acts as a conservative filtering step that prioritizes high-confidence matches while excluding ambiguous or potentially novel associations. This systematic approach accelerates what has traditionally been a slow, manual process of linking data scattered across public repositories and the literature. By combining automated NCBI queries, taxonomic reconciliation, and ML-based matching, MNM offers an efficient workflow for harmonizing heterogeneous datasets.
Integrating MNM-derived genotype–phenotype pairs into VPOD_v1.3 substantially expanded data coverage, doubling the number of wild-type opsins with linked phenotypes and nearly doubling invertebrate coverage—which are very undersampled in heterologous studies. We provide Figure S3 as an aid to visualize the distribution of λmax phenotypes captured by VPOD_1.3, separated by vertebrate and invertebrate distributions. Models trained on these expanded datasets showed considerable gains, especially for invertebrate r-opsins, where predictive accuracy (R2) and error rates improved relative to models trained solely on in vitro data (Table 1). These results demonstrate that leveraging in vivo data—when genotype links are inferred by robust ML methods—can meaningfully improve prediction accuracy and generalization in data-sparse regions of sequence space.
Although developed for opsins, the MNM strategy could be more broadly applicable to other molecular systems where phenotypes are measured independently of genotypes—such as enzymes with kinetic parameters from biochemical assays but no linked gene sequence, or receptors with pharmacological profiles but unsequenced sources. By pairing systematic sequence mining with predictive modeling, analogous pipelines could help bridge similar data-cliffs across diverse areas of biology, accelerating the integration of legacy phenotypic data into modern sequence-based frameworks.
While the results of the MNM pipeline are promising, it is important to note that success relies on the accuracy of OPTICS predictions to correctly link genotypes to in vivo phenotypes. Our blind-retrieval test demonstrated that the pipeline is highly robust, accurately recovering 94% (47/50) of targeted sequences. However, as highlighted by the test's three mismatches, incorrect links are still possible, especially for species with multiple opsin paralogs or natural variants having similar predicted λmax values close to a target in vivo measurement. This fact presents a relevant challenge for pinpointing the exact opsin gene responsible for the physiological measurement (although this a potentially less prominent issue beyond certain arthropods and fish clades as opsin duplication is often touted as a primary mechanism of spectral sensitivity diversification; Rennison et al. 2012; Porath-Krause et al. 2016; Sharkey et al. 2023; Schott et al. 2024). Furthermore, the 1 to 4 nm prediction differences that caused paralog swapping in our blind test represent a level of fine-grained resolution not typically obtainable with in vivo measurements (e.g. ERG, MSP), which may also differ systematically from heterologous expression due to intraocular optical filtering, oil droplets, or screening pigments. Thus, while this paralog ambiguity represents an accepted level of uncertainty, it likely has minimal impact on the resulting model generalization. Furthermore, some taxa are known to co-express multiple opsins within the same photoreceptor, resulting in intermediate spectral sensitivities that cannot be cleanly matched to any single underlying sequence (Dalton et al. 2014; Isayama et al. 2014; Schott et al. 2024). Finally, it is important to note that our pipeline has the potential to overlook matches due to large-effect mutations not represented in the training set, reinforcing existing biases rather than capturing novel effects. We fully accept this as a limitation but wish to reiterate as the goal of our pipeline is to use the existing summary of opsin genotype–phenotype information (our models) as a mechanism to infer new connections and expand the existing catalog for those who are interested. Future iterations of this pipeline would benefit immensely from the integration of in situ hybridization expression data to help resolve these ambiguities and validate MNM-inferred links and future work could involve testing the validity of matches by expressing opsins heterologously and comparing the in vitro λmax to the in vivo measurement it was linked to by MNM. Moreover, there were a rather large number of λmax values from VPOD_in_vivo_1.0 that were not linked to any opsin sequences. These could be a good target for future empirical work.
Implications & future directions
The methods and tools developed here have immediate relevance for visual ecology, sensory biology, molecular evolution, and protein engineering. OPTICS and the expanded VPOD_v1.3 database can accelerate characterization of visual systems across taxa, enabling large-scale comparative studies and deeper insight into how visual sensitivities adapt to diverse ecological niches. The principles behind PW-CV and amino acid property encoding are broadly transferable to predictive modeling of other protein functions.
Looking forward, this framework lays the ground for more ambitious explorations of genotype–phenotype landscapes. We envision extending this work into an integrated evolution simulation pipeline (Wittmann et al. 2021; Howard et al. 2025) designed to probe historical contingency and adaptive trajectories in molecular evolution. By simulating evolutionary paths under different varying selective pressures, this pipeline could reveal how different genetic starting points might constrain or expand accessible phenotypes (Upton et al. 2021; Murphy and Westerman 2022), identify repeatable mutational paths to the same phenotype, and show how these paths depend on genotype and selection. Such simulations could help illuminate the predictability of evolution, the role of epistasis in shaping adaptive landscapes, and the molecular underlying visual diversity, further enhancing the role of opsins as a model for broader principles of the molecular evolution of functional diversity.
Supplementary Material
Contributor Information
Seth A Frazer, Ecology, Evolution, and Marine Biology, University of California, Santa Barbara, CA 93106.
Todd H Oakley, Ecology, Evolution, and Marine Biology, University of California, Santa Barbara, CA 93106.
Supplementary material
Supplementary material is available at Molecular Biology and Evolution online.
Funding
None declared.
Data availability
All methods, results, and analyses from this study and our previous publication are available in the GitHub repository The Visual Physiology Opsin Database (VPOD): https://github.com/VisualPhysiologyDB/visual-physiology-opsin-db. Opsin Phenotype Tool for Inference of Color Sensitivity (OPTICS), is available at: https://github.com/VisualPhysiologyDB/optics. To ensure long-term reproducibility, all major releases of OPTICS and VPOD, including the exact training datasets, metadata, and models used herein, are versioned, archived, and freely available via Zenodo (VPOD_v1.3 DOI: 10.5281/zenodo.19051998; OPTICS_v1.3 DOI: 10.5281/zenodo.18955371). All data and code are released under the GNU General Public License v3.0 (Open Source Initiative–approved). These resources also support applications using the deepBreaks ML framework (Baghbanzadeh et al. 2023) and the VPOD database for opsin research (Frazer et al. 2024).
References
- Adam ZR, Schwieterman EW, Kacar B. Earliest photic zone niches probed by ancestral microbial rhodopsins. Mol Biol. 2022:39:msac100. 10.1093/molbev/msac100. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Arikawa K, Stavenga D. Random array of colour filters in the eyes of butterflies. J Exp Biol. 1997:200:2501–2506. 10.1242/jeb.200.19.2501. [DOI] [PubMed] [Google Scholar]
- Baghbanzadeh M et al. DeepBreaks: a machine learning tool for identifying and prioritizing genotype-phenotype associations. Res Sq. 2023. 10.21203/rs.3.rs-2534899/v1. [DOI] [Google Scholar]
- Bhardwaj E, Alexander R, Becker C. 2025. Limits to AI growth: the ecological and social consequences of scaling [preprint]. arXiv [cs.CY]. January 29. arXiv. http://arxiv.org/abs/2501.17980.
- Bowmaker JK. Microspectrophotometry of vertebrate photoreceptors. A brief review. Vision Res. 1984:24:1641–1650. 10.1016/0042-6989(84)90322-5. [DOI] [PubMed] [Google Scholar]
- Brandes N, Goldman G, Wang CH, Ye CJ, Ntranos V. Genome-wide prediction of disease variant effects with a deep protein language model. Nat Genet. 2023:55:1512–1522. 10.1038/s41588-023-01465-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Buczyłko J, Saari JC, Crouch RK, Palczewski K. Mechanisms of opsin activation. J Biol Chem. 1996:271:20621–20630. 10.1074/jbc.271.34.20621. [DOI] [PubMed] [Google Scholar]
- Camacho C et al. BLAST+: architecture and applications. BMC Bioinformatics. 2009:10:421. 10.1186/1471-2105-10-421. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Castiglione GM, Chang BS. Functional trade-offs and environmental variation shaped ancient trajectories in the evolution of dim-light vision. eLife. 2018:7:e35957. 10.7554/eLife.35957. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chinen A, Matsumoto Y, Kawamura S. Spectral differentiation of blue opsins between phylogenetically close but ecologically distant goldfish and zebrafish. J Biol Chem. 2005:280:9460–9466. 10.1074/jbc.M413001200. [DOI] [PubMed] [Google Scholar]
- Cock PJA et al. Biopython: freely available python tools for computational molecular biology and bioinformatics. Bioinformatics (Oxford, England). 2009:25:1422–1423. 10.1093/bioinformatics/btp163. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Dalton BE, Loew ER, Cronin TW, Carleton KL. Spectral tuning by opsin coexpression in retinal regions that view different parts of the visual field. Proc Biol Sci. 2014:281:20141980. 10.1098/rspb.2014.1980. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Damian Riina M, Stambaugh C, Stambaugh N, Huber KE. Chapter 28—continuous Variable analyses: T-test, Mann–Whitney, wilcoxin rank. In: Eltorai AEM, Bakal JA, Kim DW, Wazer DE, editors. Translational radiation oncology. Academic Press; 2023. [Google Scholar]
- Das D, Wilkie SE, Hunt DM, Bowmaker JK. Visual pigments and oil droplets in the retina of a passerine bird, the Canary Serinus Canaria: microspectrophotometry and opsin sequences. Vision Res. 1999:39:2801–2815. 10.1016/S0042-6989(99)00023-1. [DOI] [PubMed] [Google Scholar]
- de Visser JAGM, Krug J. Empirical fitness landscapes and the predictability of evolution. Nat Rev Genet. 2014:15:480–490. 10.1038/nrg3744. [DOI] [PubMed] [Google Scholar]
- Edwards JL. Research and societal benefits of the global biodiversity information facility. Bioscience. 2004:54:486. 10.1641/0006-3568(2004)054[0486:RASBOT]2.0.CO;2. [DOI] [Google Scholar]
- Fowler DM, Fields S. Deep mutational scanning: a new style of protein science. Nat Methods. 2014:11:801–807. 10.1038/nmeth.3027. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Frazer J et al. Disease variant prediction with deep generative models of evolutionary data. Nature. 2021:599:91–95. 10.1038/s41586-021-04043-8. [DOI] [PubMed] [Google Scholar]
- Frazer SA, Baghbanzadeh M, Rahnavard A, Crandall KA, Oakley TH. Discovering genotype-phenotype relationships with machine learning and the visual physiology opsin database (VPOD). GigaScience. 2024:13:giae073. 10.1093/gigascience/giae073. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Galaxy Community . The galaxy platform for accessible, reproducible, and collaborative data analyses: 2024 update. Nucleic Acids Res. 2024:52:W83–W94. 10.1093/nar/gkae410. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gommers R et al. 2022. Scipy/scipy: SciPy 1.9.0. Zenodo. Preprint, Zenodo, July 29. 10.5281/zenodo.6940349. [DOI]
- Govardovskii VI, Fyhrquist N, Reuter T, Kuzmin DG, Donner K. In search of the visual pigment template. Vis Neurosci. 2000:17:509–528. 10.1017/S0952523800174036. [DOI] [PubMed] [Google Scholar]
- Hagen JFD, Roberts NS, Johnston Jr RJ. The evolutionary history and spectral tuning of vertebrate visual opsins. Dev Biol. 2023:493:40–66. 10.1016/j.ydbio.2022.10.014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hart NS, Vorobyev M. Modelling oil droplet absorption Spectra and spectral sensitivities of bird cone photoreceptors. J Comp Physiol A Neuroethol Sens Neural Behav Physiol. 2005:191:381–392. 10.1007/s00359-004-0595-3. [DOI] [PubMed] [Google Scholar]
- Hayes T et al. Simulating 500 million years of evolution with a language model. Science (New York, N.Y.). 2025:387:850–858. 10.1126/science.ads0018. [DOI] [PubMed] [Google Scholar]
- Hie B, Bryson BD, Berger B. Leveraging uncertainty in machine learning accelerates biological discovery and design. Cell Syst. 2020:11:461–477.e9. 10.1016/j.cels.2020.09.007. [DOI] [PubMed] [Google Scholar]
- Howard AJ et al. 2025. Jan 29. Combining directed evolution with machine learning enables accurate genotype-to-phenotype predictions [preprint]. bioRxivorg. 10.1101/2025.01.27.635131. [DOI]
- Inoue K et al. Exploration of natural red-shifted rhodopsins using a machine learning-based Bayesian experimental design. Commun Biol. 2021:4:362. 10.1038/s42003-021-01878-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Isayama T et al. Coexpression of three opsins in cone photoreceptors of the salamander Ambystoma tigrinum: pigment mixtures in salamander photoreceptors. J Comp Neurol. 2014:522:2249–2265. 10.1002/cne.23531. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jacobs GH, Neitz J, Krogh K. Electroretinogram flicker photometry and its applications. J Opt Soc Am A Opt Image Sci Vis. 1996:13:641–648. 10.1364/JOSAA.13.000641. [DOI] [PubMed] [Google Scholar]
- Karasuyama M, Inoue K, Nakamura R, Kandori H, Takeuchi I. Understanding colour tuning rules and predicting absorption wavelengths of microbial rhodopsins by data-driven machine-learning approach. Sci Rep. 2018:8:15580. 10.1038/s41598-018-33984-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Katoh K, Standley DM. MAFFT multiple sequence alignment software version 7: improvements in performance and usability. Mol Biol Evol. 2013:30:772–780. 10.1093/molbev/mst010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kemble H, Nghe P, Tenaillon O. Recent insights into the genotype-phenotype relationship from massively parallel genetic assays. Evol Appl. 2019:12:1721–1742. 10.1111/eva.12846. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lane MA. The global biodiversity information facility. Bull Am Soc Inf Sci. 2003:30:22–24. 10.1002/bult.301. [DOI] [Google Scholar]
- Lässig M, Mustonen V, Walczak AM. Predicting evolution. Nat Ecol Evol. 2017:1:77. 10.1038/s41559-017-0077. [DOI] [PubMed] [Google Scholar]
- Li Z, Tang J, Guo F. Identification of 14-3-3 proteins phosphopeptide-binding specificity using an affinity-based computational approach. PLoS One. 2016:11:e0147467. 10.1371/journal.pone.0147467. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Liashchynskyi P, Liashchynskyi P. 2019. Grid search, random search, genetic algorithm: a big comparison for NAS [preprint]. arXiv [cs.LG]. December 12. arXiv. http://arxiv.org/abs/1912.06059.
- Liebman PA et al. Microspectrophotometry of photoreceptors. In: Abrahamson EW, Baumann C, Bridges CDB, editors. Photochemistry of vision. Springer Berlin Heidelberg; 1972. [Google Scholar]
- Liénard MA, Valencia-Montoya WA, Pierce NE. Molecular advances to study the function, evolution and spectral tuning of arthropod visual opsins. Philos Trans R Soc Lond B Biol Sci. 2022:377:20210279. 10.1098/rstb.2021.0279. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lin Z et al. Evolutionary-scale prediction of atomic-level protein structure with a language model. Science (New York, N.Y.). 2023:379:1123–1130. 10.1126/science.ade2574. [DOI] [PubMed] [Google Scholar]
- Longcore T. A compendium of photopigment peak sensitivities and visual spectral response curves of terrestrial wildlife to guide design of outdoor nighttime lighting. Basic Appl Ecol. 2023:73:40–50. 10.1016/j.baae.2023.09.002. [DOI] [Google Scholar]
- Lundberg S, Lee S-I. 2017. A unified approach to interpreting model predictions [preprint]. arXiv [cs.AI]. May 22. arXiv. http://arxiv.org/abs/1705.07874.
- Minh BQ et al. IQ-TREE 2: new models and efficient methods for phylogenetic inference in the genomic era. Mol Biol Evol. 2020:37:1530–1534. 10.1093/molbev/msaa015. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Murphy MJ, Westerman EL. Evolutionary history limits Species’ ability to match colour sensitivity to available habitat light. Proc Biol Sci. 2022:289:20220612. 10.1098/rspb.2022.0612. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nichol D, Robertson-Tessi M, Anderson ARA, Jeavons P. Model genotype-phenotype mappings and the algorithmic structure of evolution. J R Soc Interface. 2019:16:20190332. 10.1098/rsif.2019.0332. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Pedregosa F et al. Scikit-learn: machine learning in python. J Mach Learn Res. 2011:12:2825–2830. [Google Scholar]
- Porath-Krause AJ et al. Structural differences and differential expression among rhabdomeric opsins reveal functional change after gene duplication in the bay scallop, Argopecten irradians (Pectinidae). BMC Evol Biol. 2016:16:250. 10.1186/s12862-016-0823-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Porter ML. Crustacean phylogenetic systematics and opsin evolution. Brigham Young University; 2005. https://scholarsarchive.byu.edu/etd/557 [Google Scholar]
- Porter ML et al. Shedding new light on opsin evolution. Proceedings. Biological Sciences/The Royal Society. 2012:279:3–14. 10.1098/rspb.2011.1819. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Porter ML, Cronin TW, McClellan DA, Crandall KA. Molecular characterization of crustacean visual pigments and the evolution of pancrustacean opsins. Mol Biol Evol. 2007:24:253–268. 10.1093/molbev/msl152. [DOI] [PubMed] [Google Scholar]
- Ramirez MD et al. The last common ancestor of most bilaterian animals possessed at least nine opsins. Genome Biol Evol. 2016:8:3640–3652. 10.1093/gbe/evw248. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Rennison DJ, Owens GL, Taylor JS. Opsin gene duplication and divergence in ray-finned fish. Mol Phylogenet Evol. 2012:62:986–1008. 10.1016/j.ympev.2011.11.030. [DOI] [PubMed] [Google Scholar]
- Rives A et al. Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences. Proc Natl Acad Sci U S A. 2021:118:e2016239118. 10.1073/pnas.2016239118. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Roberts DR et al. Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure. Ecography. 2017:40:913–929. 10.1111/ecog.02881. [DOI] [Google Scholar]
- Rocha FAdF et al. Spectral sensitivity measured with electroretinogram using a constant response method. PLoS One. 2016:11:e0147318. 10.1371/journal.pone.0147318. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sayers EW et al. Database resources of the national center for biotechnology information in 2025. Nucleic Acids Res. 2025:53:D20–D29. 10.1093/nar/gkae979. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schoch CL et al. NCBI taxonomy: a comprehensive update on curation, resources and tools. Database (Oxford). 2020:2020:baaa062. 10.1093/database/baaa062. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schott RK et al. Diversity and evolution of frog visual opsins: spectral tuning and adaptation to distinct light environments. Mol Biol Evol. 2024:41:msae049. 10.1093/molbev/msae049. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schweikert LE, Caves EM, Solie SE, Sutton TT, Johnsen S. Variation in rod spectral sensitivity of fishes is best predicted by habitat and depth. J Fish Biol. 2019:95:179–185. 10.1111/jfb.13859. [DOI] [PubMed] [Google Scholar]
- Sekharan S, Morokuma K. Why 11-cis-retinal? Why not 7-cis-, 9-cis-, or 13-cis-retinal in the eye? J Am Chem Soc. 2011:133:19052–19055. 10.1021/ja208789h. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sela M, Church JR, Schapiro I, Schneidman-Duhovny D. RhoMax: computational prediction of rhodopsin absorption Maxima using geometric deep learning. J Chem Inf Model. 2024:64:4630–4639. 10.1021/acs.jcim.4c00467. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sharkey CR, Blanco J, Lord NP, Wardill TJ. Jewel beetle opsin duplication and divergence is the mechanism for diverse spectral sensitivities. Mol Biol Evol. 2023:40:msad023. 10.1093/molbev/msad023. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Smedley GD, McElroy KE, Feller KD, Serb JM. Additive and epistatic effects influence spectral tuning in molluscan retinochrome opsin. J Exp Biol. 2022:225:jeb242929. 10.1242/jeb.242929. [DOI] [PubMed] [Google Scholar]
- Sommer GM. “Molecular Evolution of Vision in Teleost Fishes with Focus on the Elephant Fishes (Mormyridae) and Their Trophic Ecology.” Zuzana Musilová. Charles University. 2025. https://dspace.cuni.cz/bitstream/handle/20.500.11956/207560/140143582.pdf
- Storz JF. Causes of molecular convergence and parallelism in protein evolution. Nat Rev Genet. 2016:17:239–250. 10.1038/nrg.2016.11. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Takahashi Y, Ebrey TG. Molecular basis of spectral tuning in the newt short wavelength sensitive visual pigment. Biochemistry. 2003:42:6025–6034. 10.1021/bi020629+. [DOI] [PubMed] [Google Scholar]
- Terakita A. The opsins. Genome Biol. 2005:6:213. 10.1186/gb-2005-6-3-213. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Toomey MB, Corbo JC. Evolution, development and function of vertebrate cone oil droplets. Front Neural Circuits. 2017:11:97. 10.3389/fncir.2017.00097. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Toomey MB et al. A Complex carotenoid palette tunes avian colour vision. Journal of the Royal Society, Interface/the Royal Society. 2015:12:20150563. 10.1098/rsif.2015.0563. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tsukamoto H, Chen I-S, Kubo Y, Furutani Y. A ciliary opsin in the brain of a marine annelid zooplankton is ultraviolet-sensitive, and the sensitivity is tuned by a single amino acid residue. J Biol Chem. 2017:292:12971–12980. 10.1074/jbc.M117.793539. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Upton BA et al. Evolutionary constraint on visual and nonvisual mammalian opsins. J Biol Rhythms. 2021:36:109–126. 10.1177/0748730421999870. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vamathevan J et al. Applications of machine learning in drug discovery and development. Nat Rev Drug Discov. 2019:18:463–477. 10.1038/s41573-019-0024-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- van der Kooi CJ, Stavenga DG, Arikawa K, Belušič G, Kelber A. Evolution of insect color vision: from spectral sensitivity to visual ecology. Annu Rev Entomol. 2021:66:435–461. 10.1146/annurev-ento-061720-071644. [DOI] [PubMed] [Google Scholar]
- Vöcking O, Kourtesis I, Tumu SC, Hausen H. Co-expression of Xenopsin and rhabdomeric opsin in photoreceptors bearing microvilli and cilia. eLife. 2017:6:e23435. 10.7554/eLife.23435. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wagner A. The origins of evolutionary innovations. Oxford University Press; 2011. [Google Scholar]
- Wittmann BJ, Johnston KE, Wu Z, Arnold FH. Advances in machine learning for directed evolution. Curr Opin Struct Biol. 2021:69:11–18. 10.1016/j.sbi.2021.01.008. [DOI] [PubMed] [Google Scholar]
- Yokoyama S. Evolution of dim-light and color vision pigments. Annu Rev Genomics Hum Genet. 2008:9:259–282. 10.1146/annurev.genom.9.081307.164228. [DOI] [PubMed] [Google Scholar]
- Yokoyama S et al. Epistatic adaptive evolution of human color vision. PLoS Genet. 2014:10:e1004884. 10.1371/journal.pgen.1004884. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zheng L et al. Analysis of conserved glutamate and aspartate residues in Drosophila rhodopsin 1 and their influence on spectral tuning. J Biol Chem. 2015:290:21951–21961. 10.1074/jbc.M115.677765. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Citations
- Gommers R et al. 2022. Scipy/scipy: SciPy 1.9.0. Zenodo. Preprint, Zenodo, July 29. 10.5281/zenodo.6940349. [DOI]
Supplementary Materials
Data Availability Statement
All methods, results, and analyses from this study and our previous publication are available in the GitHub repository The Visual Physiology Opsin Database (VPOD): https://github.com/VisualPhysiologyDB/visual-physiology-opsin-db. Opsin Phenotype Tool for Inference of Color Sensitivity (OPTICS), is available at: https://github.com/VisualPhysiologyDB/optics. To ensure long-term reproducibility, all major releases of OPTICS and VPOD, including the exact training datasets, metadata, and models used herein, are versioned, archived, and freely available via Zenodo (VPOD_v1.3 DOI: 10.5281/zenodo.19051998; OPTICS_v1.3 DOI: 10.5281/zenodo.18955371). All data and code are released under the GNU General Public License v3.0 (Open Source Initiative–approved). These resources also support applications using the deepBreaks ML framework (Baghbanzadeh et al. 2023) and the VPOD database for opsin research (Frazer et al. 2024).



