BackgroundSubclinical intramammary infection (IMI) represents a significant problem in maintaining dairy cows’ health. Disease severity and extent depend on the interaction between the causative agent, environment, and host. To investigate the molecular mechanisms behind the host immune response, we used RNA-Seq for the milk somatic cells (SC) transcriptome profiling in healthy cows (n= 9), and cows naturally affected by subclinical IMI fromProtothecaspp. (n= 11) andStreptococcus agalactiae(S. agalactiae;n= 11). Data Integration Analysis for Biomarker discovery using Latent Components (DIABLO) was used to integrate transcriptomic data and host phenotypic traits related to milk composition, SC composition, and udder health to identify hub variables for subclinical IMI detection.ResultsA total of 1,682 and 2,427 differentially expressed genes (DEGs) were identified when comparingProtothecaspp. andS. agalactiaeto healthy animals, respectively. Pathogen-specific pathway analyses evidenced thatPrototheca’s infection upregulated antigen processing and lymphocyte proliferation pathways whileS. agalactiaeinduced a reduction of energy-related pathways like the tricarboxylic acid cycle, and carbohydrate and lipid metabolism. The integrative analysis of commonly shared DEGs between the two pathogens (n= 681) referred to the core-mastitis response genes, and phenotypic data evidenced a strong covariation between those genes and the flow cytometry immune cells (r2= 0.72), followed by the udder health (r2= 0.64) and milk quality parameters (r2= 0.64). Variables withr≥ 0.90 were used to build a network in which the top 20 hub variables were identified with the Cytoscape cytohubba plug-in. The genes in common between DIABLO and cytohubba (n= 10) were submitted to a ROC analysis which showed they had excellent predictive performances in terms of discriminating healthy and mastitis-affected animals (sensitivity > 0.89, specificity > 0.81, accuracy > 0.87, and precision > 0.69). Among these genes,CIITAcould play a key role in regulating the animals’ response to subclinical IMI.ConclusionsDespite some differences in the enriched pathways, the two mastitis-causing pathogens seemed to induce a shared host immune-transcriptomic response. The hub variables identified with the integrative approach might be included in screening and diagnostic tools for subclinical IMI detection.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40104-023-00890-9.