Molecular signatures and machine learning driven stress biomarkers for rainbow trout aquaculture and climate adaptation Authors: Ali Ali, Youssef Ali, Guglielmo Raymo, Asutosh Dalei, Mohamed Salem Published: 2025 ABSTRACT Climate-induced stressors pose significant threats to fish growth, survival, and ecological stability. Identifying reliable molecular biomarkers is crucial for improving stress management and acclimation strategies. This study employed a comprehensive transcriptomic analysis to examine stress responses in rainbow trout (Oncorhynchus mykiss) exposed to five distinct environmental stressors—high and low temperatures, crowding, salinity, and low water quality (characterized by reduced dissolved oxygen and elevated CO2)—over six hours. A total of 21,580 differentially expressed transcripts (DETs) were identified, including 16,959 unique DETs. Heat stress and salinity induced the most pronounced transcriptomic responses, with most DETs being stressor-specific, highlighting distinct physiological acclimation mechanisms. Only 39 DETs were consistently regulated across all stress conditions. Key DETs associated with heat stress were further analyzed using machine learning models to evaluate their predictive potential in distinguishing control and heat-stressed fish from natural Redband trout populations. The logistic model tree (LMT) classifier demonstrated the highest accuracy with a set of 234 DETs. When the dataset was reduced to 50 or 2 DETs, the Random Forest model achieved optimal classification, consistently identifying two heat shock protein transcripts, hsp47 and hspa4l, as primary predictors across both short- and long-term stress responses. In contrast, core DETs shared across stressors exhibited limited predictive power, achieving only 52.78% classification accuracy. These findings underscore the specificity of molecular signatures to individual stressors and highlight the potential of transcriptomic biomarkers for monitoring climate-induced stress in fish populations. The study recommends the integration of these biomarkers into selective breeding programs and conservation strategies to enhance fish resilience and welfare in the face of environmental change.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-025-30120-3. Introduction Climate change affects water quality and habitats, posing a serious hazard to aquatic organisms1. Climate change encompasses changes in temperature, water availability, precipitation patterns, floods, and droughts. Global warming raises water temperatures2 and lowers dissolved oxygen levels, affecting water quality2,3. Rising temperatures are expected to reduce the threshold of nutrient loading that causes water bodies to transition from clear to turbid, accelerating eutrophication and dramatically reducing water transparency4,5. Additionally, droughts and rising sea levels, induced by climate change, contribute to the salinization of surface waters5. Increasing salinity and temperature enhance transmission rates of parasites and pathogens among fish, potentially resulting in increased fish mortality. In addition to wild species, farmed fish species in semi-open or recirculating aquaculture systems are significantly impacted by climate-related stress and stress associated with husbandry practices. Compromised water quality intensifies competition for space and food, and leads to behavioral changes that negatively impact fish welfare, survival, and growth1,6,7. Rainbow trout (Oncorhynchus mykiss) have been artificially distributed in every state within the United States. They are the most widely spread trout species worldwide, present on every continent except Antarctica. Rainbow trout play an important role both as a key aquaculture and fisheries species, for recreational activities as a sport fish and as a research model in fish biology8. Recently, however, there has been a 31.5% decline in rainbow trout production in the US9. While the loss due to fish stress and accompanying disease susceptibility is not fully estimated, a better understanding of the underlying mechanisms of stress responses can lead to the development of biomarkers implicated in stress coping mechanisms. This would ultimately improve fish welfare and increase the survivability in wild population and profitability of aquaculture operations8. Traditionally, cortisol levels in blood plasma have been used to measure stress in fish10. However, cortisol levels can fluctuate based on several factors, including the frequency of stress exposure. In cases of chronic stress, the reliability of cortisol as a marker decreases because its levels may either remain elevated over time or return to baseline even if the stress persists. Earlier studies focused on cortisol measurements in rainbow trout to identify stress biomarkers, but the results were inconsistent over time8,11. This inconsistency emphasizes the need for novel methods to assess fish health and stress. Transcriptomics provides valuable insights into the complex responses of organisms to environmental stress. RNA sequencing (RNA-seq) has been used to examine stress responses in fish, including rainbow trout1,8,12–19. For example, Liu and colleagues profiled gene expression in rainbow trout under handling and confinement stress, using transcriptome reference generated through Roche 454 sequencing of stressed fish8. Additionally, gene expression responses to heat stress were examined in desert and montane Redband trout (O. mykiss gairdneri) strains, as well as their F1 hybrids19. However, stress response and adaptation to extreme conditions in fish are polygenic, involving genes from multiple biological pathways20, suggesting the necessity for alternative approaches to reduce the data dimensionality. Moreover, although RNA-seq provides quality control throughout the analysis, there are various limitations, including statistical methods, which can impact the accurate detection of differentially expressed genes (DEGs)21–27. Machine learning is a multidisciplinary field that uses computer science, statistics, and information theory to develop algorithms that can be trained from existing data and make predictions on new datasets28. It has become increasingly used in biological research, including image analysis29, cancer research30, phenotyping31, and gene discovery32. Machine learning-based differential network analysis has been used to predict stress-responsive genes by recognizing patterns in known stress-related gene expression features33. For instance, a study utilized the feature selection algorithms to pinpoint 23 crucial features that are important for regulating gene expression in response to ethylene27. Thus, this methodology improves traditional RNA-seq analysis and helps identify DEGs that may have otherwise gone undetected27. In aquaculture, machine learning has recently been extended to fish stress prediction and welfare assessment, where it integrates multi-sensor data and transcriptomic features to classify physiological stress states. Recent work has shown that wearable bioimpedance sensors combined with deep learning models can dynamically and non-invasively assess fish health and stress levels under challenging conditions such as waterless and low-temperature exposure34. Similarly, AI-driven predictive systems integrating environmental sensors and machine learning algorithms have been successfully used to classify fish welfare states with high accuracy in aquaponic systems35. Moreover, multi-sensing fusion approaches employing convolutional networks have been applied to assess fish vitality during live transport, achieving over 90% classification accuracy36. These advances support the application of predictive algorithms for transcriptome-informed stress detection in fish. In this study, RNA-seq was used to analyze gene expression changes in fish exposed to five distinct stressors: high and low temperatures, crowding, salinity, and low-quality water (characterized by reduced dissolved oxygen and elevated CO2 levels). Our goal was to identify molecular signatures associated with various stress responses and then assess using machine learning models to predict stress phenotype in natural populations. We tested models across ecologically divergent populations of Redband trout that have evolved in desert and montane climates to assess the predictive power of the identified temperature-associated DETs and InfoGainAttributeEval-ranked features. The desert population (Little Jacks Creek) is naturally exposed to extreme summer temperatures, representing a lineage with inferred higher thermal tolerance, whereas the montane population (Keithley Creek) experiences cooler, more stable temperatures19. This natural contrast provides a robust framework for validating whether the molecular signatures of heat stress identified in a domesticated aquaculture strain hold predictive value across populations with different evolutionary histories and inherent resilience. The study pinpointed two heat shock genes that could serve as markers for both short- and long-term stress responses, suggesting their potential use in breeding programs to enhance fish welfare and increase productivity in fish farming, and support species conservation through captive breeding initiatives. Materials and methods Ethics declarations No new animal experiments were generated for this study; all analyses were performed using previously published data collected under approved protocols19,37. In the previous studies, all animal procedures underlying the data used in this study were conducted in accordance with relevant institutional and national guidelines and regulations. Experimental protocols were approved by the USDA/ARS National Center for Cool and Cold Water Aquaculture Institutional Animal Care and Use Committee (IACUC Protocol #50) and the University of Idaho Institutional Animal Care and Use Committee (IACUC Protocol #201,025). All methods are reported in accordance with ARRIVE guidelines. Transcriptomic analysis of short term exposure to five stress in the NCCCWA population RNA-seq datasets from fish exposed to the five different stress conditions were retrieved from the NCBI Sequence Read Archive (SRA) under the accession number SRP070774. The fish used and the stress challenge protocols were previously described in37. In brief, four unrelated fish families from the NCCCWA even-year broodstock, which had been selectively bred for growth38, were utilized for both stress and control treatments. Each family was tagged, and two fish per family were placed in one of four 193-L tanks with a flow-through water system per stress condition, resulting in a total of 20 tanks (five conditions × four tanks each). For each condition, one tank was assigned as the control, while the fish in the remaining three tanks were subjected to one of five stressors. Before the onset of the experiment, the fish were acclimated for two weeks under standard culture conditions (temperature: 13.7 °C, CO2: 25.0 mg/L, dissolved oxygen: 15.1 mg/L, salinity: 0‰). Water quality parameters, such as dissolved oxygen (DO), CO2 levels, temperature, and nitrogen compounds, were monitored throughout the acclimation period and at the start (time 0), midpoint (time 3), and end (time 6) of the stress trials as explained below. Following acclimation, the water conditions in each tank were gradually modified over a three-hour period to reach the desired stress parameters (time 3), which were then maintained for additional three hours. The stress conditions included: 1) high temperature (25 °C); 2) low temperature (2 °C); 3) high salinity (32‰, by adding NaCl); 4) water reuse (low-quality water), resulting in reduced DO (5.0–6.0 mg/L) and elevated CO2 levels (67.8 mg/L average); and 5) handling/crowding stress, based on procedures by Weber et al.39 and adapted from Pottinger et al.,40. For crowding challenge, fish were netted and transferred from their 193-L home tanks into significantly smaller tanks (either 6-L or 15-L, scaled to fish size) for a duration of three hours. All eight fish from each tank were then euthanized using a lethal dose of MS-222, and gill tissues were quickly collected and preserved in liquid nitrogen. At the conclusion of the experiment, the fish were weighed, with an average weight of 57.7 g (ranging from 28.0 to 99.0 g). Total RNA was extracted from the gill tissue using the TRIzol method following the manufacturer’s instructions (Invitrogen, Carlsbad, CA). Equal amounts of RNA from each fish in a tank were pooled to create a single tank-level biological sample. From this pooled RNA, two replicate libraries were prepared per tank. This resulted in n = 6 sequencing libraries per stress treatment (3 stressed tanks × 2 replicates) and n = 10 sequencing libraries for the control tanks (5 tanks × 2 replicates = 10).The RNA was sequenced following the Illumina protocol on the Illumina HiSeq 2000 platform, with a read length of 100 nucleotides per read. The rainbow trout genome annotation was obtained from NCBI (GCA_013265735.3, https://www.ncbi.nlm.nih.gov/assembly/ GCF_013265735.2/). Quality control, such as trimming of low-quality reads (quality limit = 0.05) and removal of adapters, followed by read mapping and differential expression analysis were carried out using CLC Genomics Workbench (version 22). To identify DETs, raw counts were analyzed with the integrated EdgeR tool in CLC. All control RNA-seq datasets (two per tank, five tanks total) were combined into a single control group for differential expression. Transcripts were deemed as DETs if they exhibited an absolute fold change of ≥ 2 and an FDR-adjusted P-value ≤ 0.05. Transcriptomic analysis of long term exposure to heat stress in redband trout The raw sequencing data generated from three Redband trout strains were downloaded from the NCBI Short Read Archive (SRA; accession number PRJNA233945). Redband trout (O. mykiss gairdneri) from desert (Little Jacks Cr.) and montane (Keithley Cr.) populations, and their F1 crosses, were used as test populations to evaluate the effectiveness of the markers identified from the USDA-NCCCWA population in distinguishing long term heat stress response. Experimental setup and RNA sequencing were previously described by Narum and Campbell19. In brief, gametes were collected from the desert (LJ) and montane (K) populations. Gametes were fertilized to produce half-sibling progeny: pure desert (LJ), pure montane (K), and F1 crosses (LJ × K). Fry were reared at 15 °C until they reached an average weight of 2 g and then fry from each strain were divided into treatment and control groups. The experiment involved 18 tanks (3 strains × 2 treatments × 3 replicates), with each tank holding approximately 45 fish. The treatment groups experienced diel temperature cycles (17 °C at night to 28.5 °C in the afternoon). Fish in the control groups remained at a constant 15 °C. Fish were euthanized on days 1, 3, 7, and 28 to collect gill tissues. Total RNA was extracted from gills using Qiagen RNeasy kits. RNA was pooled from three fish per tank to generate 72 libraries (3 strains × 2 treatments × 3 replicate tanks × 4 time points).. Sequencing was performed on an Illumina HiSeq 1500 using single-read 100 bp flow cells. Each sample had an average of 31.96 million reads. For this study, the downloaded raw reads were trimmed using CLC Genomics Workbench to remove low-quality reads (quality limit = 0.05) and adapters. High-quality trimmed data were mapped to the rainbow trout reference genome (NCBI accession GCA_013265735.3; assembly GCF_013265735.2), with an average mapping rate of 62.26%. Normalized expression values (TPM) were then used for downstream machine learning analyses. Machine learning analysis For this analysis, we utilized Weka 3 (version 3.8.2)41 and the Scikit-learn machine learning (ML) framework in Python42 to perform feature selection and train classification models. Initially, we applied the InfoGainAttributeEval algorithm to identify the most informative transcripts. Expression data from transcripts selected via InfoGainAttributeEval, as well as those identified based on false discovery rate (FDR) and fold-change thresholds, were used to train five classification algorithms: Random Forest, Sequential Minimal Optimization (SMO; Support Vector Machine), Multilayer Perceptron, Logistic Model Trees (LMT), and J48 decision trees. These models were evaluated using data from the USDA-NCCCWA under both tenfold cross-validation and a 66% training split for each stress condition. To assess the generalizability of the trained models, we further tested their predictive performance on an independent RNA-seq dataset (SRA Accession: SRP035242) derived from Redband trout, a subspecies of rainbow trout that evolved in contrasting desert and montane environments. This allowed us to evaluate the classifiers’ ability to predict heat stress phenotypes in natural populations. Model performance was assessed using metrics such as classification accuracy and Cohen’s kappa statistic, enabling a comparative analysis of each classifier’s effectiveness in distinguishing between control and heat-stressed samples. To explore the biological significance of the predictive features, we conducted gene ontology enrichment analysis using ShinyGO 0.80 with default parameters43. In addition, we applied Principal Component Analysis (PCA), Mutual Information Gain, and Recursive Feature Elimination (RFE) using various algorithmic models from the Scikit-learn framework to refine the selection of differentially expressed transcripts (DETs). These features were subsequently used to train and evaluate models including Naïve Bayes, Logistic Regression, and tree-based classifiers. As a negative control, we generated 10 randomized datasets by shuffling the group labels (e.g., stress and control) of the top-ranked features. This procedure ensured no inherent patterns existed in the data for the algorithms to learn. For binary classification tasks, a correct prediction rate of ~ 50% indicates random guessing and, therefore, no learning. Accordingly, classification accuracies near this threshold were used to validate that learning in the actual datasets was not due to chance44. Results and discussion Transcriptomic analysis of short-term multi-stressor exposure in the NCCCWA rainbow trout population A total of 1,776,024,749 reads were obtained from the NCBI Short Read Archive (SRA) under accession number SRP070774, with an average depth of 44,400,619 reads per sample. After removing sequencing adapters and trimming, the average number of high-quality reads per sample was 43,994,113 reads. On average, 88.14% of high-quality reads were mapped to the OmykA_1.1 reference genome. Differential expression analysis was performed between fish subjected to each stressor and the control group to identify transcripts related to stress response in rainbow trout (Fig. 1a–e). Across the five stress conditions, 21,580 DETs were identified among all stress conditions (16,959 unique DETs) (Table S1). These included 12,474 for high temperature, 2,001 for low temperature, 961 for crowding, 4,037 for salinity, and 2,107 for low-quality water.Fig. 1Volcano plots illustrating DETs in response to various environmental stressors: (a) high temperature, (b) low temperature, (c) crowding, (d) salinity, and (e) low-quality water. Transcripts are considered significantly differentially expressed with a log2 fold change ≥|1| and FDR ≤ 0.05. The top 24 transcripts that exhibited distinct expression patterns, including six consistently upregulated and 18 consistently downregulated across different stress conditions are shown in each plot. Volcano plots illustrating DETs in response to various environmental stressors: (a) high temperature, (b) low temperature, (c) crowding, (d) salinity, and (e) low-quality water. Transcripts are considered significantly differentially expressed with a log2 fold change ≥|1| and FDR ≤ 0.05. The top 24 transcripts that exhibited distinct expression patterns, including six consistently upregulated and 18 consistently downregulated across different stress conditions are shown in each plot. A Venn diagram illustrating the shared and unique DETs in rainbow trout under the five stress conditions is shown in Fig. 2a. The high-temperature condition exhibited the highest number of unique DETs (10,024 transcripts), indicating a notable reaction/response to heat stress, which produced more DETs than any other condition. Following high temperature, 1,731 transcripts were unique to salinity exposure, suggesting a considerable transcriptomic response. The fish exhibited 2,107 and 2,001 variably expressed transcripts in response to low-quality water and low temperature, respectively. These unique and shared transcripts highlighted in the Venn diagram indicate both distinct and shared response mechanisms between stressors. The smallest set of unique DETs (271 transcripts) was found when fish were subjected to crowding, indicating a limited stress response or lower transcriptional sensitivity under this condition compared to the others.Fig. 2(a) Venn diagram showing shared and unique DETs in rainbow trout under the five stress conditions. Ninety-three transcripts were commonly regulated across all five stress conditions. (b) Venn diagram showing overlapping and unique ranked features identified across the five stress conditions. (c) Average performance of five machine learning algorithms based on the number of FDR-ranked DETs selected in response to heat stress. The plot shows the percentage of correct classifications for each algorithm using the top five DET sets containing 50, 100, 250, 500 and 1000 transcripts. (d) Average performance of five machine learning algorithms based on the number of InfoGain-ranked features selected in response to heat stress. The plot shows the percentage of correct classifications for each algorithm using the top five feature sets containing 50, 100, 250, 500 and 1000 transcripts. (a) Venn diagram showing shared and unique DETs in rainbow trout under the five stress conditions. Ninety-three transcripts were commonly regulated across all five stress conditions. (b) Venn diagram showing overlapping and unique ranked features identified across the five stress conditions. (c) Average performance of five machine learning algorithms based on the number of FDR-ranked DETs selected in response to heat stress. The plot shows the percentage of correct classifications for each algorithm using the top five DET sets containing 50, 100, 250, 500 and 1000 transcripts. (d) Average performance of five machine learning algorithms based on the number of InfoGain-ranked features selected in response to heat stress. The plot shows the percentage of correct classifications for each algorithm using the top five feature sets containing 50, 100, 250, 500 and 1000 transcripts. There were 39 shared DETs (core stress response) across all five conditions (Fig. 2a). The core stress response may represent a limited universal stress response in rainbow trout to a wide range of environmental stressors. High temperature and salinity exhibited the highest overlap (1,364 shared DETs), suggesting that heat and salt stress might provoke shared transcriptomic responses. There were only 205 shared DETs between the high and low temperature stressors, suggesting completely different mechanisms in response to extreme temperature shifts. Stressors of low-quality water and crowding showed less overlap, suggesting more distinct transcriptional changes under these conditions. Comparison of machine learning ranked feature selection to differential expression in the NCCCWA population The differential gene expression analysis revealed significant variability in the transcriptomic response of fish exposed to different stressors. For instance, 12,474 DETs were detected under high temperatures, while only 961 DETs were identified for crowding. Given this broad range in the number of DETs across the various stressors, we considered using machine learning and the information gain attribute evaluation method to identify which specific transcripts are most informative for distinguishing between the stress phenotypes. Machine learning feature selection was used to rank transcripts with a fold change (FC) >|2| and an unadjusted p-value < 0.05 (Table S2), allowing evaluation of a broader set of transcripts based on raw statistical evidence of differential expression. Notably, when the feature selection was repeated using only transcripts that met the FDR-adjusted significance threshold, the resulting ranked features still did not completely overlap with the DET list, reflecting methodological differences between differential expression and information gain–based selection. For low-temperature stress, 1,812 transcripts were ranked, of which 631 overlapped with the 2,001 DETs identified. In the case of crowding stress, 1,036 transcripts were ranked, but only 187 matched the 961 DETs, indicating a more distinct selection of features. A Venn diagram showing the overlapping and unique features identified across five stress conditions is shown in Fig. 2b. The largest group of unique transcripts was observed in the high salinity stress condition (4,460), followed by high temperature (3,886). The highest overlap was also observed between high temperature and salinity (368). Six common transcripts were identified across all conditions. Crowding had the smallest set of unique features (581), whereas reused/low-quality water showed a moderate number of unique and overlapping features across conditions. This suggests varied responses to different environmental stresses. Conversely, high temperature exhibited the greatest overlap, with 3,519 of the 4,593 ranked features corresponding to the 12,474 DETs, suggesting a strong concordance. Additionally, conditions of reused or low-quality water and high salinity displayed significant overlap, with 541 and 2,625 transcripts, respectively. This alignment implies that the informative feature ranking is partially consistent with the results of the differential expression analysis. FDR of the DETs and InfoGainAttributeEval-ranked features were then used to assess the performance of five models in classifying the phenotype in each condition (Table S3). The InfoGain-based approach consistently showed superior performance across key metrics (Correct Classification, Kappa, and AUROC) for most models (Table S3 and Fig. 2c and d). Additionally, with InfoGain, tenfold cross-validation and 66% training/33% testing split yielded similar results (Table S3). Core stress response in fish from the NCCCWA population An investigation into the common transcripts that have a potential role in the fish response when subjected to any of the five stressors uncovered 39 DETs (Fig. 2a) and six ranked features (Fig. 2b). None of the ranked features overlapped with the common DETs. Among 39 DETs, 24 transcripts displayed distinct patterns of expression, with six consistently upregulated and 18 downregulated in response to stress. Among the genes that were found to be upregulated, SPRY domain-containing protein 4 and CCR4-NOT transcription complex subunit 6a were particularly notable, exhibiting significant fold changes (1273.6 and 827.97, respectively, under high-temperature conditions). This suggests that these genes may play important roles in how organisms acclimate to environmental stress. spry4 is linked to several critical cellular processes, including the regulation of cell apoptosis and proliferation. It also plays a role in managing oxidative stress, inflammatory responses, and the effects of ischemic injury45. On the other hand, tetraspanin-11 and DNA replication licensing factor mcm4 were notably downregulated (fold changes of − 357.62 and − 320.52, respectively, for low temperature). Other tetraspanins, like Tetraspanin 1 (tsp-1), are essential for helping organisms cope with heat stress46 and salt stress47. The MCM complex, which includes critical subunits MCM2-7, exhibits DNA helicase activity and is a key component of the replisome machinery48,49. When DNA replication is not properly controlled, it leads to replicative stress, a factor linked to various diseases50. In addition, Table S1 lists other DETs that are associated with environmental stress responses, including Acyl-CoA desaturase, Sarcoplasmic/Endoplasmic Reticulum Calcium ATPase 2 (serca2), Interferon Regulatory Factor 2 (irf2), Fibroblast Growth Factor 13a (fgf13a), and the Major Histocompatibility Complex Class I-related Gene Protein. The information gain feature selection was also used to prioritize common key features for the stress phenotype (Table S2). Six common transcripts were identified across all conditions. Of them, five transcripts had consistent fold-change directions. The transcripts are coding for proteins including periphilin-1 (PPHLN1), tight junction protein ZO-2, and neurolysin (metallopeptidase M3 family). The PPHLN1 protein was found to colocalize with highly repetitive satellite III (hsatiii) lncRNAs in nuclear stress bodies when exposed to heat stress51. ZO-2, on the other hand, is known to translocate to the nucleus under low cell density conditions52 or in response to stressors like chemical agents and heat shock53. There were 29 common InfoGainAttributeEval-ranked and differentially regulated transcripts, with consistent fold change direction. We sought to assess the effectiveness of five machine learning models in distinguishing between control and chronic heat-stressed samples in natural populations of a rainbow trout subspecies, the Redband trout, which evolved in desert versus montane climates. Using the common transcripts, we trained the models on expression data generated from the USDA-NCCCWA population to classify stress responses in 72 public gill RNA-seq datasets of the Redband trout population. The models showed poor performance in accurately distinguishing heat-stressed and control fish. For instance, the best model achieved only 52.78% accuracy with a low Kappa statistic, which indicates limited predictive power. These results show no common InfoGainAttributeEval-ranked stress-related transcripts can capture all stress responses and each stress condition should be considered separately which will be considered in the next sections. Stressor-specific molecular signatures from the NCCCWA multi-stressor experiment Differential expression analysis and the InfoGainAttributeEval feature selection revealed a substantial number of unique regulated genes under each stress condition, suggesting that different environmental stressors trigger their own unique physiological and molecular responses. Because of this, focusing on markers that are more specific to each type of stress could lead to better accuracy in predictive models. It may be effective to look for stressor-specific biomarkers or condition-specific transcripts that can provide clear insights into how the fish are reacting under each stress scenario. Identifying these specific markers would not only improve the precision of machine learning models but also give a deeper biological understanding of how various stressors impact fish at the transcriptomic level. In this section, we will examine the unique DETs and ranked features associated with the five stress conditions. Following this, we will evaluate the predictive accuracy of heat-specific features in ecologically diverse populations of Redband trout that have evolved in desert and montane climates19. High temperature Of the 10,024 unique DETs in response to high temperature, 5,189 transcripts were upregulated, whereas 4,835 were downregulated. Gene enrichment analysis of the upregulated transcripts highlighted several pathways critical for the stress response, including protein folding and immune activation (Fig. 3a). The C-X-C chemokine receptor pathway showed a strong enrichment with two genes, il8r and cxcr1 (18.05 fold enrichment), which likely play a role in inflammation and immune cell recruitment during heat stress. Heat stress induced an increased expression of the IL-8 receptor gene in humans54. Enrichment of endoplasmic reticulum lumen genes such as pdia4 and pdia8, which are involved in protein folding and processing55, highlights the ER’s role in managing increased protein misfolding triggered by heat. We also found transcripts overrepresented in protein phosphopantetheinylation (6.65 fold enrichment), which are involved in the modification of proteins for catalytic activity. The analysis indicates that heat stress significantly affects protein integrity and the capacity for proper protein folding. Several transcripts related to unfolded protein binding, such as hsp90aa1.1, dnajb11, and hsp90b1, as well as those involved in protein processing (hsp90aa1.1, pdia4, herpud1) and protein folding (hsp90aa1.1, hsp90b1), were significantly enriched. The hsp90aa1, hsp90b1, and herpud1 have been previously reported as key components in the heat stress response in other animals, such as cattle and chickens56–58.Fig. 3Gene enrichment analyses of unique DETs in response to various environmental stressors: (a) high temperature (upregulated), (b) high temperature (downregulated), (c) crowding (upregulated), (d) crowding (downregulated), (e) salinity (upregulated), (f) salinity (downregulated), (g) low-quality water (upregulated), and (h) low-quality water (downregulated). Gene enrichment analyses of unique DETs in response to various environmental stressors: (a) high temperature (upregulated), (b) high temperature (downregulated), (c) crowding (upregulated), (d) crowding (downregulated), (e) salinity (upregulated), (f) salinity (downregulated), (g) low-quality water (upregulated), and (h) low-quality water (downregulated). Gene enrichment analysis of the downregulated DETs associated with high temperature indicated notable disruptions in crucial biological pathways, especially those related to DNA methylation and alkylation (Fig. 3b). The downregulation of genes associated with DNA methylation, such as dnmt3ab and dnmt1, along with alkylation repair genes like ung, suggests potential disruption of DNA methylation processes, increased DNA damage, and weakened DNA repair capacity59. Previous studies have also reported reduced DNA methylation levels and decreased ung expression in response to heat stress60,61. Also, the downregulation of genes linked to AMP deaminase and purine metabolism (e.g., ampd3 and ampd3a), indicates modifications in energy metabolism, such as the purine salvage pathway which recycles nucleotides62. Purine metabolism was found downregulated in heat-resistant bacteria63. Within the 3,886 unique informative features ranked by the InfoGainAttributeEval algorithm, 1,559 features were upregulated in association with high temperature. We identified enriched pathways which align with acclimatory responses to heat stress (Table S4). For instance, increased expression of genes of the cysteine and methionine metabolism pathway (enoph1, slc25a3, dnmt3ba, and mat2aa) suggests enhanced amino acid metabolism, contributing to glutathione synthesis for mitigating oxidative stress64,65. Upregulation of genes involved in vascular smooth muscle contraction (mylk3, edra1ba, and rhoa) help maintain vascular tone and blood flow under stress-induced vasodilation66,67. Additionally, enrichment of the protein processing in the endoplasmic reticulum (ER) pathway (hsp90aa1.1, HSPA8, and atf4b) helps restore protein homeostasis and counteract protein misfolding that occur during heat stress68,69. Other pathways such as cytokine-cytokine receptor interaction (bmp2b and gdf7), MAPK signaling pathway (hspa8, atf4b, and fgfr2), and the neuroactive ligand-receptor interaction pathway (thrb, edra1ba, and calca), were also enriched in response to heat stress. Among the unique informative features, 2,327 were downregulated. The enriched pathways (Table S4) and downregulation of associated genes reflect a destructive response to heat stress. The downregulation of genes involved in the Fanconi anemia pathway (fanci, slx1, and fancd2), may result in impaired DNA repair and increased susceptibility to heat-induced genomic instability70. Similarly, downregulation of genes involved in the PPAR signaling pathway (fabp7 and scd5) disrupts lipid homeostasis and reduces anti-inflammatory signaling71. The downregulation of genes involved in the fatty acid degradation pathway (acsbg2 and aldh3a2b) reduces energy production72. Whereas, the downregulation of the genes sat2b and ncoa4 of the ferroptosis pathway indicates impaired iron homeostasis and ROS detoxification73. Reduction of the expression of genes in the regulation of the actin cytoskeleton and endocytosis pathways suggests reduced cellular motility and trafficking74. Additionally, pathways such as glycolysis/gluconeogenesis, Notch signaling, and NOD-like receptor signaling, which are critical for energy metabolism, cell communication, and immune responses75–77, exhibit downregulation, suggesting impaired cellular and systemic heat stress responses. Low temperature A total of 629 transcripts were uniquely differentially expressed in response to cold stress, suggesting they may be specific to the response to low temperatures. The list included several upregulated transcripts related to immune function (e.g., Granzyme B, C-ets-1), which indicates immune pathways activation during cold stress78. Granzyme B has been found to target key proteins related to cellular homeostasis and the stress response, such as HSP-90, which belong to the heat shock protein family79. Also, it affects heat shock-associated proteins such as HIP, HOP, and BAG1-L79–83. Upregulation of transcripts linked to metabolic processes (e.g., 5-aminolevulinate synthase (alas1) and GATOR complex protein (wdr24)) suggests changes in cellular energy management and biosynthesis84. The alas1 catalyzes the initial step in the synthesis of heme, and it was previously demonstrated that stress can lead to dysregulation of iron metabolism85. Also, a signaling pathway involving sestrin2, gator2, gator1, and ragb plays a key role in mediating the suppression of mTORC1 activity in response to stress86. Transcripts linked to vesicle trafficking (e.g., TBC1 domain family member 13) and protein degradation (e.g., tripartite motif-containing proteins) were also upregulated, suggesting acclimatation in cellular transport and protein turnover. Acute exposure to cold stress triggers an increase in the expression of murf1, a member of the tripartite motif family, in the skeletal muscle of zebrafish87. The upregulation of neurocalcin delta a emphasizes the importance of calcium signaling under cold stress as previously reported88,89. The most downregulated transcripts in response to cold stress included histone acetyltransferase p300 and zinc finger MYM-type protein 4 (zmym4), both of which play key roles in regulating gene expression through epigenetic and transcriptional control mechanisms78,90. Of the 1,153 unique informative features ranked by the InfoGainAttributeEval method, 825 features were upregulated. The enrichment analysis revealed several pathways potentially contributing to cold stress acclimation such as the PPAR signaling pathway, ErbB signaling pathway, glycerophospholipid metabolism, neuroactive ligand-receptor interaction pathway, vascular smooth muscle contraction pathway, cell adhesion molecules pathway, and insulin signaling pathway (Table S4). For instance, the PPAR signaling pathway upregulated genes are associated with lipid metabolism (e.g., lipoprotein lipase, fabp11a, plin1, and fabp7) likely for energy production and maintenance of membrane fluidity during cold stress91. Also, the upregulated genes of the vascular smooth muscle contraction pathway (avp, proca1, and araf) suggest a role in preventing heat loss92. Finally, the upregulation of genes in the cell adhesion molecules pathway (cd226, lrrc4ba, and ncam1b) indicates structural acclimation to maintain tissue integrity under stress93. Crowding Of the 271 unique DETs in response to crowding, 104 transcripts were upregulated, and 167 were downregulated. The most significantly enriched pathways include the nucleoside biosynthetic process and related pathways such as nucleobase-containing small molecule biosynthesis, purine nucleoside biosynthesis, and ribonucleoside biosynthesis (Fig. 3c). The gene hprt1l is involved in the biosynthesis and salvage of nucleotides94. Rasa1a is associated with the negative regulation of Ras protein signal transduction and small GTPase-mediated signal transduction, hinting at a regulatory role in cell growth and development95,96. Other enriched genes (e.g., pkig and prkag2b) are linked to pathways involved in the regulation of protein kinase activity and phosphorylation (Fig. 3c). The analysis suggests metabolic acclimation of the fish to a crowded environment. The broad metabolic pathways category (6.56-fold enrichment) (Fig. 3d) showed downregulation of several important metabolic genes (e.g., dhrs4, zgc:123,305, cant1a, aadat, cant1b, pip5k1a, and va0h), suggesting an overall decrease in metabolic activity under high-density conditions. Out of the 581 unique informative features ranked by the InfoGainAttributeEval method, 358 features were upregulated. Under high stocking density, enriched upregulated genes were linked to the neuroactive ligand-receptor interaction pathway (e.g., ptger4c, adcyap1, nr3c1, gabrr3a, and ghr) (Table S4). The pathway has a role in stress perception and regulation through neuroendocrine signaling97. For example, adcyap1 (adenylate cyclase activating polypeptide 1) promotes cortisol release98, which is a key component of the stress response in fish. Whereas nr3c1 (the glucocorticoid receptor) enables physiological acclimation to prolonged stress by mediating the effects of cortisol99. Across the unique informative features, 196 were downregulated. The downregulated genes and enriched pathways, in Table S4, align with physiological disruptions associated with high stocking density. The downregulation of acsl4a, nos2 (nitric oxide synthase 2), and amacr (alpha-methylacyl-CoA racemase) in the peroxisome pathway reduce lipid metabolism and reactive oxygen species (ROS) detoxification, resulting in an impaired cellular defense mechanism100. In the apelin signaling pathway, reduced expression of plat (tissue plasminogen activator) and nos2 may disrupt cardiovascular and metabolic regulation, and thus impair energy balance and adaptation to stress101. Salinity Of the 1,731 unique DETs in response to high salinity, 1,046 transcripts were upregulated, whereas 685 were downregulated. The analysis identified several significant upregulated transcripts (hmgcs1, klf6a, tph2, snrkb, and brd4) related to hematopoiesis and immune system development (Fig. 3e). Significant increases in red blood cell (RBC) and white blood cell (WBC) counts were observed in different fish species under high salinity conditions102–105. Downregulated DETs that are associated with development and morphogenesis pathways were also identified (Fig. 3f). The transcripts included snap29, tsc1a, and blzf1, which are linked to kidney development and organ morphogenesis106,107. Within the 4,460 unique informative features ranked by the InfoGainAttributeEval algorithm, 2,048 features were upregulated. We noticed enrichment of numerous important pathways in response to salt stress in rainbow trout. Enriched pathways included the P53 signaling pathway (casp3b, gadd45aa, and casp8), fatty acid metabolism pathway (acsbg2, cpt1a, and elovl1), MAPK signaling pathway (jund, fgf1b, and traf6), calcium signaling pathway (vegf, cxcr4b, plce1), the cytokine-cytokine receptor interaction pathway (lepr, cxcr4b, il8), and the intestinal immune network for IgA production pathway (cxcr4b and cd80) (Table S4). The activation of the calcium signaling pathway suggests modulation of ion transport to maintain homeostasis under salinity stress108. Also, the enrichment of the Intestinal immune network for IgA production pathway is likely linked to osmotic changes in the gut109. Of the unique informative features, 2,412 were downregulated. The InfoGainAttributeEval feature selection indicated that under high salinity stress certain pathways-associated genes were downregulated (Table S4), implying potential physiological trade-offs or disturbances in rainbow trout. These include suppression of genes involved in the ABC transporters (abcg2d, abcc10, and abcg4b) which may disrupt the ability to control ion transport and detoxification, all of which are necessary for maintaining osmotic equilibrium110. Similarly, downregulation of purine metabolism (pde4ca, adcy5, ampd3a) may limit the supply of nucleotides and ATP needed to deal with osmotic stress18. It was previously reported that the synthesis of purine nucleotides was unaffected by salt stress; however, salinity disorder purine metabolism111. Low-quality water Of the 815 unique DETs in response to low-quality water, 649 transcripts were upregulated, and 166 were downregulated. Gene enrichment analysis for upregulated transcripts (Fig. 3g) in rainbow trout exposed to low-quality water revealed significant metabolic, energy production, and structural changes. Genes involved in polysaccharide metabolism (agla, ugp2a, phka1b) were enriched. A previous study found that reduction in ugp2 expression leads to widespread transcriptomic changes, which impair the cells’ capacity to produce glycogen, disrupts normal glycosylation processes, and increase their sensitivity to ER stress112. Enrichment was also observed for genes involved in cardiac muscle contraction (cox4i2, casq2, cacng4a), which may help maintain cardiovascular efficiency under stress. Under low-oxygen (hypoxic) conditions, hypoxia-inducible factor (hif) triggers the production of cox4i2, which in turn affects the mitochondrial membrane potential, resulting in higher ATP production and an increase in reactive oxygen species (ROS)113. Our analysis highlighted genes involved in identical protein binding (tmem38a, gpd1b, hspb8). The hspb8 expression was found to be triggered by a variety of stressors, including hypoxia114,115. Additionally, more genes related to energy metabolism processes were identified, possibly to meet higher energy demands during stress, including ADP metabolic processes (tpi1b, aldoa, eno3, gapdh), ATP metabolic processes (tpi1b, cox4i2, aldoa, eno3, gapdh), and energy derivation by oxidation of organic compounds (cox4i2, agla, ugp2a, phka1b). Gene enrichment analysis revealed that genes linked to desmosome-related pathways and reproductive processes (Fig. 3h) were underrepresented in response to low-quality water. The underrepresentation of genes involved in desmosome assembly (Fold Enrichment 201.13) and desmosome organization (Fold Enrichment 201.13) may reflect damage to tissue integrity due to poor water quality. Hypoxia causes loosening of tight junctions116. Furthermore, the underrepresentation of genes involved in reproductive processes may reflect an acclimatory response of stressed fish to prioritize survival over reproduction. Hypoxia can lead to retarded development of gonad117. The negative impact of stress on reproduction in salmonids likely results from the cortisol-mediated delayed gonadal development and reduced pituitary gonadotrophin content118. Among the 918 unique informative features ranked by the InfoGainAttributeEval algorithm, 604 features were upregulated. Enriched genes are involved in pathways related to cardiac muscle contraction (cox4i2, casq2, and myh7), adrenergic signaling (mapk12b, adrb2b, and myh7), cell cycle (rad21l1, gadd45aa, and cdkn1ba), glycerophospholipid metabolism (gpat4, pcyt1ba, and gpat3), calcium signaling (ednraa, casq2, and mylk4a) and protein serine phosphatase activity (ppm1aa and ppm1nb) (Table S4). Out of the unique informative features, 314 were downregulated. We found genes involved in the melanogenesis pathway (tyr, slc24a5, and mc1r), the ErbB signaling pathway (egfr, erbB2, and erbB3), and the neuroactive ligand-receptor interaction pathway (grin1a, npY2r, and p2ry2) were downregulated only in response to poor quality water (Table S4). Consistent with our findings, it was previously reported that fish with more pigmentation are likely healthy and resistant to stress119. Overall, the enrichment analysis reveal that stressed fish likely reallocate resources away from non-essential activities, such as pigmentation, in order to prioritize responses to oxygen or ammonia toxicity—consistent with the observed downregulation of growth-related genes in tilapia exposed to low-quality water120. Predictive performance of heat-specific DETs in the redband trout population We assessed effectiveness of machine learning in distinguishing between control and chronic heat-stressed samples in natural populations of a rainbow trout subspecies, the Redband trout, which evolved in desert versus montane climates. We selected 234 DETs with the lowest FDR values from a total of 10,024 unique transcripts (Table 1). Using these top candidates, we trained models on USDA-NCCCWA data (described above) to classify stress responses in 72 public gill RNA-seq datasets of the Redband trout population. Several machine learning algorithms were evaluated, including, Naïve Bayes, Logistic Regression, Random Forest, LMT, J48, Multilayer Perceptron, and SMO, using the Weka platform and Scikit-Learn framework. Among these, the LMT model showed the best performance, accurately identifying 98.61% of samples, with a kappa statistic of 0.9722, reflecting strong agreement between predictions and actual results. The other models, Random Forest and Multilayer Perceptron, had moderate success, with accuracy ranging between 50 and 70%, while SMO performed well, achieving 86.11% accuracy and a kappa of 0.7222. Naïve Bayes and Logistic Regression were unable to achieve significant accuracy.Table 1Performance metrics of machine learning models for heat stress classification using three sets of the most significant DETs.The models were trained on USDA-NCCCWA data and tested on public datasets from Redband trout. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Table 1Performance metrics of machine learning models for heat stress classification using three sets of the most significant DETs.The models were trained on USDA-NCCCWA data and tested on public datasets from Redband trout. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Performance metrics of machine learning models for heat stress classification using three sets of the most significant DETs. The models were trained on USDA-NCCCWA data and tested on public datasets from Redband trout. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. We then narrowed the analysis to the top 100 DETs to see how it affected the models (Table 1). This time, SMO came out on top, correctly classifying 94.44% of samples, with a kappa of 0.8889, an improvement over its earlier 86.11% accuracy using 234 transcripts. However, the accuracy of LMT dropped to 73.61%, suggesting that it relied on more data for better results. Random Forest showed a slight boost, with accuracy increasing from 66.67 to 69.44%. J48 and Multilayer Perceptron had modest improvements across both sets of transcripts. Reducing the transcripts from 234 to 100 seemed to enhance the SMO model’s performance but model LMT was less effective, indicating that some models need larger datasets to work optimally. Overall, SMO proved to be the best for distinguishing between control and heat-stressed samples. Finally, we reduced the dataset further to the top 50 transcripts and re-ran all five models (Table 1). Random Forest showed an improvement, achieving 88.89% accuracy with a kappa of 0.78, better than its results with larger sets. LMT reached 83.33% accuracy with a kappa of 0.67, slightly lower than its earlier performance with 234 transcripts. The J48 model’s accuracy dropped to 69.44%, showing consistent but lower accuracy across all transcript sizes. Interestingly, the Multilayer Perceptron did the best with the 50-transcript set, reaching 90.28% accuracy and a kappa of 0.81, a marked improvement from the larger datasets. However, SMO’s performance declined, achieving 72.22% accuracy and a kappa of 0.44, a noticeable drop compared to its earlier results. Taken together, reducing the dataset to 50 transcripts helped the Random Forest and Multilayer Perceptron models, suggesting that a smaller, more focused set of features can improve their heat stress classification. Whereas models J48 and SMO appeared to benefit from a broader dataset, indicating that their accuracy is linked to data complexity. It was previously reported that Random Forest-based feature selection improved classification accuracy by reducing the feature set and focusing on the most relevant variables121. The enrichment analysis of the genes encoding the 50 transcripts identified several pathways and molecular functions significantly associated with the genes (Fig. 4). The collagen binding pathway exhibited the highest fold enrichment (436.32), with significant contributions from the genes hsp47 (alias serpinh1b-1) and serpinh1 (alias serpinh1b-2). Notably, serpinh1b-1 and serpinh1b-2 have recently been identified as potential biomarkers of survival at high temperatures in Atlantic salmon122. These genes are also enriched in the regulation of hydroxylase activity. In our previous work, we found a single retained intron that was consistently differentially used (i.e., upregulated), in response to stress, in a gene encoding prolyl 4-hydroxylase subunit alpha-2 (P4HA2)7,123. This gene catalyzes the hydroxylation of proline residues in newly formed collagen chains, which helps stabilize collagen triple helices across various physiological conditions124. Genes linked to the heat shock protein binding, such as ahsa1a and dnaja1 were also enriched (218.16-fold enrichment). Also, several pathways related to the regulation of endopeptidase activity, such as negative regulation of endopeptidase activity and regulation of proteolysis, were significantly enriched, indicating the broad biological roles of hsp47 and serpinh1b in these processes. Other genes essential for protein folding and quality control mechanisms were enriched. For instance, the analysis showed multiple genes enriched in unfolded protein binding, serine-type endopeptidase inhibition, and protein processing within the endoplasmic reticulum. These genes include, hspbp1, hspa1b, dnajb1a, hspa4l, and dnaja1.Fig. 4Gene enrichment analysis of the unique 50 DETs in response high-temperature. Gene enrichment analysis of the unique 50 DETs in response high-temperature. Using the most significant 50 DETs, we also performed tenfold cross-validation, and 66% and 80% train-test split on the test population to assess how well the model generalizes to new/unseen data (Table 2). The results showed that all models had strong predictive power, with Random Forest showing optimal performance of 100% accuracy and a kappa statistic of 1. This observation demonstrates reliable results were obtained. We then ranked the 50 DETs based on the importance score to identify which transcripts contributed the most to the model’s predictions (Table 3). Twenty DETs had a score ≥ 0.9, suggesting them as the most influential transcripts that are driving/associated with the phenotype. Among the top-ranked transcripts, hsp47 showed strong thermal upregulation, consistent with its established role as a key heat-stress biomarker in teleosts, including salmonids122,125–127. As a collagen-specific molecular chaperone, hsp47 helps preserve muscle structure under heat-induced stress128,129. Similarly, hspa4l, another major chaperone upregulated during heat exposure in salmonids1,130–132, functions as crucial nucleotide exchange factors for Hsp70, enhancing the chaperone machine’s capacity to refold aggregated proteins during proteotoxic stress133. Together, these genes highlight a coordinated molecular response to thermal stress.Table 2Using the top 50 DETs unique to heat stress based on FDR ranking, tenfold cross-validation, and 66% and 80% train-test split on the test population show optimal performance of the Random Forest model in predicting heat stress.The percentage of correctly classified instances ranged from 100%, with Random Forest, to ~ 92% with J48 when performing 60% train-test split. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric.Table 3Importance score of top transcripts contributing to the model’s prediction of the heat stress phenotype.*Ortholog of serpinh1b-1 (GenBank accession: OQ814180) in Atlantic salmon.**Ortholog of serpinh1b-2 (GenBank accession: OQ814182.1) in Atlantic salmon. Table 2Using the top 50 DETs unique to heat stress based on FDR ranking, tenfold cross-validation, and 66% and 80% train-test split on the test population show optimal performance of the Random Forest model in predicting heat stress.The percentage of correctly classified instances ranged from 100%, with Random Forest, to ~ 92% with J48 when performing 60% train-test split. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Using the top 50 DETs unique to heat stress based on FDR ranking, tenfold cross-validation, and 66% and 80% train-test split on the test population show optimal performance of the Random Forest model in predicting heat stress. The percentage of correctly classified instances ranged from 100%, with Random Forest, to ~ 92% with J48 when performing 60% train-test split. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Table 3Importance score of top transcripts contributing to the model’s prediction of the heat stress phenotype.*Ortholog of serpinh1b-1 (GenBank accession: OQ814180) in Atlantic salmon.**Ortholog of serpinh1b-2 (GenBank accession: OQ814182.1) in Atlantic salmon. Importance score of top transcripts contributing to the model’s prediction of the heat stress phenotype. *Ortholog of serpinh1b-1 (GenBank accession: OQ814180) in Atlantic salmon. **Ortholog of serpinh1b-2 (GenBank accession: OQ814182.1) in Atlantic salmon. Validation of minimal biomarker panels in the redband trout population To identify potential markers for heat stress, expression data of the top four and two transcripts were used in tenfold cross-validation analyses (Tables 4 and 5, respectively) to classify heat-stressed and control samples from the Redband trout population. The performance of models across the two figures shows slight variations depending on the dataset (day-specific or aggregated) and evaluation metrics. In Table 4, Random Forest exhibited high classification accuracy (98.61%) across all datasets, with perfect classification (100%) on Days 1, 7, and 28. Performance of J48 was consistent across all time points. The LMT, SMO, and Multilayer Perceptron models also perform well overall on the combined dataset, with perfect accuracy on Days 1–7 but a lower score on Day 28. In Table 5, Random Forest and J48 maintained the same performance when the number of transcripts varied. Using only heat shock genes improved LMT, SMO, and Multilayer Perceptron’s performance on Day 28 (Table 5). Both tables suggest that Random Forest and Multilayer Perceptron outperform other models. Remarkably, the Random Forest completely relied on heat shock genes to predict the stress phenotype across all collection time points as well as the combined dataset. These heat shock genes were differentially expressed in all strains of Redband trout populations at all time points19, as well as in the NCCCWA population, suggesting their potential as universal markers for short- and long-term heat stress responses.Table 4Performance metrics of machine learning models for heat stress classification using the four transcripts coding for PHD finger protein 20, b, heat shock 70 kDa protein 4L, heat shock protein 47, and dnaJ homolog subfamily B member 6.The model’s performance was evaluated by tenfold cross validation across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric.Table 5Performance metrics of machine learning models for heat stress classification using the two transcripts coding for heat shock 70 kDa protein 4L and heat shock protein 47.The model’s performance was evaluated by tenfold cross validation across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Table 4Performance metrics of machine learning models for heat stress classification using the four transcripts coding for PHD finger protein 20, b, heat shock 70 kDa protein 4L, heat shock protein 47, and dnaJ homolog subfamily B member 6.The model’s performance was evaluated by tenfold cross validation across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Performance metrics of machine learning models for heat stress classification using the four transcripts coding for PHD finger protein 20, b, heat shock 70 kDa protein 4L, heat shock protein 47, and dnaJ homolog subfamily B member 6. The model’s performance was evaluated by tenfold cross validation across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Table 5Performance metrics of machine learning models for heat stress classification using the two transcripts coding for heat shock 70 kDa protein 4L and heat shock protein 47.The model’s performance was evaluated by tenfold cross validation across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Performance metrics of machine learning models for heat stress classification using the two transcripts coding for heat shock 70 kDa protein 4L and heat shock protein 47. The model’s performance was evaluated by tenfold cross validation across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. Cross-population validation of biomarker panels Next, we evaluated the performance of the top two (hsp47 and hspa4l) and four (phf20b, hspa4l, hsp47, and dnajb6) classifier across populations to confirm whether the selected transcripts are truly conserved markers. For this purpose, we utilized the NCCCWA fish expression data for top four and two transcripts to train the models to be used as classifiers for heat-stressed and control samples from the Redband trout (Tables 6 and 7). The performance of the models trained by expression data of four transcripts (Table 6) was generally superior to those trained by the expression data of only two heat shock transcripts (Table 7). Random Forest, in Table 6, consistently showed high classification accuracy (94.44–100%) across most days, with strong Kappa statistics (0.67–1.0). In Table 7, Random Forest also performed well overall (93.06%); however, its classification accuracy decreased slightly on Day 28 (77.78%) compared to Table 6. J48 showed robust performance with two transcripts (Table 7). For Multilayer Perceptron, there was some variability observed across days when two transcripts were used (Table 7). Consistent LMT performance was observed in Table 6 with high accuracy (94.44–100%) on Days 3 and 7; however, in Table 7, its performance dropped drastically to 50% accuracy across combined dataset and time points. Similarly, the SMO model in Table 6 maintained strong performance across all subsets (72.22–100%), but the model struggled significantly when only two transcripts were used for training (Table 7). Taken together, the Random Forest and J48 models maintained strong performance with two heat shock transcripts, suggesting that they can effectively capture the stress response even with limited input data. This can benefit large-scale or real-time stress monitoring.Table 6Performance metrics of machine learning models for heat stress classification using the four transcripts coding for PHD finger protein 20, b, heat shock 70 kDa protein 4L, heat shock protein 47, and dnaJ homolog subfamily B member 6.The models were trained on NCCCWA data and tested in Redband trout population across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. The hyphen symbol (–) refer to undefined values for the corresponding metric.Table 7Performance metrics of machine learning models for heat stress classification using the two transcripts coding for heat shock 70 kDa protein 4L and heat shock protein 47.The models were trained on NCCCWA data and tested in Redband trout population across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. The hyphen symbol (–) refer to undefined values for the corresponding metric. Table 6Performance metrics of machine learning models for heat stress classification using the four transcripts coding for PHD finger protein 20, b, heat shock 70 kDa protein 4L, heat shock protein 47, and dnaJ homolog subfamily B member 6.The models were trained on NCCCWA data and tested in Redband trout population across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. The hyphen symbol (–) refer to undefined values for the corresponding metric. Performance metrics of machine learning models for heat stress classification using the four transcripts coding for PHD finger protein 20, b, heat shock 70 kDa protein 4L, heat shock protein 47, and dnaJ homolog subfamily B member 6. The models were trained on NCCCWA data and tested in Redband trout population across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. The hyphen symbol (–) refer to undefined values for the corresponding metric. Table 7Performance metrics of machine learning models for heat stress classification using the two transcripts coding for heat shock 70 kDa protein 4L and heat shock protein 47.The models were trained on NCCCWA data and tested in Redband trout population across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. The hyphen symbol (–) refer to undefined values for the corresponding metric. Performance metrics of machine learning models for heat stress classification using the two transcripts coding for heat shock 70 kDa protein 4L and heat shock protein 47. The models were trained on NCCCWA data and tested in Redband trout population across four collection time points (Day 1, Day 3, Day 7, and Day 28) as well as the combined dataset. Green colors in the heatmaps refer to maximum values, whereas red colors refer to minimum values for the corresponding metric. The hyphen symbol (–) refer to undefined values for the corresponding metric. Conclusion This study offers an in-depth transcriptomic analysis of rainbow trout exposed to five short-term distinct stressors: high temperature, increased salinity, low temperature, low-quality water, and crowding. The results highlighted varying molecular responses, with fewer common molecular markers being regulated across the different stress conditions. Heat stress had the most profound effect on gene expression while crowding caused the least changes. Furthermore, machine learning models demonstrated superior performance using stress-specific features. The Random Forest model achieved optimal accuracy with reduced datasets, particularly leveraging hsp47 and hspa4l as universal markers for heat stress. Conversely, common DETs shared across stressors showed limited predictive power. This study underscores the significance of stressor-specific biomarkers in enhancing the accuracy and biological relevance of predictive models. The study provides a practical framework for improving stress resilience in rainbow trout. The identified biomarkers, particularly hsp47 (serpinh1b-1) and hspa4l, can serve as reliable indicators of heat stress across populations. Their expression could be monitored using qPCR-based assays during high-temperature periods to assess fish stress and guide timely management actions. Integrating these biomarkers into selective breeding and monitoring programs will support sustainable aquaculture and conservation under changing environmental conditions. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1 Supplementary Material 2 Supplementary Material 2 Supplementary Material 3 Supplementary Material 3 Supplementary Material 4 Supplementary Material 4