Introduction

The Lamiaceae family (mint family) encompasses a broad range of aromatic plants that are widely distributed but particularly prevalent in the Mediterranean region1. Lamiaceae plants have been used extensively as home remedies and to enhance the taste and aroma of foods since ancient times2. The mint family has long been used for decades in cosmetics and conventional medicine as antiseptics, carminatives, expectorants, and sedatives2, in addition to its potential antioxidant and anti-inflammatory properties3,4. Herbs within Lamiaceae are recognized for their diverse chemical composition, particularly their essential oils, which contribute to their aroma and biological activities5. In addition to essential oils, Lamiaceae plants are rich in non-volatile secondary metabolites vis. hydroxycinnamic acids (e.g., rosmarinic acid, salvianolic acid isomers, caffeic acid), flavonoids (e.g., naringenin, apigenin, luteolin, quercetin), phenolic abietane diterpenoids (e.g., carnosol, carnosic acid, rosmanol), and other phenolics6,7. Owing to their rich and diverse phytochemical composition, Lamiaceae plants exhibit many biological activities, including antioxidant, antibacterial, antiviral, and antifungal effects8,9. In particular, the antimicrobial activity is especially pronounced in their essential oils10. This generally highlights the broad biological potential of plants, as evidenced by continuous reporting of various biological activities of different medicinal plants and/or their derived metabolites including, but not limited to, antioxidant, anti-inflammatory, enzyme inhibitory, and cytotoxic effects11,12.

Rosemary (Salvia rosmarinus Spenn., previously known as Rosmarinus officinalis L.) and oregano (Origanum vulgare L.) are mint family plants widely grown in many diverse regions worldwide13. Traditionally, these plants have long been used in relieving colds and coughs, and as immunomodulators owing to their pronounced antimicrobial and anti-inflammatory activities14. These traditional uses highlight their therapeutic importance, which has motivated the exploration of sustainable sources of their active constituents. In this regard, our earlier work underscored the potential of the different distillation by-products as promising antibacterial, antioxidant, and anti-inflammatory resources15.

This study aims to compare the MS-based phytochemical profiles of these Lamiaceae species in correlation to their antimicrobial, antioxidant, and anti-inflammatory activities, given the interconnected relationship between oxidative stress, inflammation, and microbial infection, which collectively play a crucial role in the development of many diseases and often overlap in both cause and consequences16. Furthermore, this study seeks to underpin chemical constituents responsible for well-characterized biological effects using chemometric tools. To achieve such a goal, multivariate data analysis (MVA) represented by partial least squares analysis (PLS) was employed to identify relationships between metabolite profiles and associated biological activities for the first time in Lamiaceae and discern the metabolites contributing the most and the least to the studied biological activities. Given that S. rosmarinus Spenn. and O. vulgare L. are also widely used in traditional hygienic practices, mainly in aqueous preparations in the form of infusions or decoctions, antibacterial activity was additionally evaluated for the aqueous extracts to better represent their ethnopharmacological applications.

Materials and methods

Plant material

The aerial parts of S. rosmarinus Spenn. and O. vulgare L. were acquired from the Medicinal, Aromatic, and Poisonous Plants Experimental Station (MAPPES), Faculty of Pharmacy, Cairo University (Giza, Egypt) in June 2022 (early summer), before the flowering stage. Plants were authenticated supervisors and managers of the MAPPES. Voucher specimens were deposited at the Herbarium of the Pharmacognosy Department, Faculty of Pharmacy, Cairo University (specimens’ numbers: S. rosmarinus Spenn.; 18.4.24-F, and O. vulgare L.; 17.4.24-F).

Preparation of plant extracts for biological evaluation

Shade-dried, pulverized plants (100 g, each) were extracted separately by maceration till exhaustion using 80% methanol in water to yield alcoholic extracts of S. rosmarinus Spenn. (RO) and O. vulgare L. (OV). After extraction, the solutions were filtered through Whatman No.1 filter paper and then concentrated under reduced pressure at 40 °C using a rotary evaporator (R-210 evaporator, Büchi, Switzerland) to yield (19.5 g RO, 17.5 g OV). The samples were stored in airtight dark containers and kept in a refrigerator at 4 °C till further assays.

Aqueous extracts of S. rosmarinus Spenn. (Aq.RO) and O. vulgare L. (Aq.OV) were prepared following the same procedure, using distilled water instead of methanol. The resulting yields were 7 g for Aq.RO and 10.5 g for Aq.OV. These aqueous extracts were used exclusively for evaluating antimicrobial activity.

Preparation of extracts and UPLC-ESI–QTOF-MS analysis conditions

Dried pulverized plants (30 mg of each powder) were mixed separately in 2 mL 80% HPLC grade methanol with 10 µg/mL umbelliferone (an internal standard), using a Turrax mixer (11000 RPM) for five 20-sec periods, then centrifuged at 3000g (4 °C, 15 min) to exclude plant debris, followed by filtration using a 22 μm pore-size filter (Agilent, USA).

An ACQUITY UPLC system (Waters, Milford, MA, USA) was used for UPLC-ESI-QTOF-MS analysis. Chromatographic separation was carried out by injection of alcoholic extracts (3.1 µL) on HSS T3 column (100 × 1.0 mm, particle size 1.8 μm; Waters) at a temperature of 40 °C, where mobile phase A was 0.1% formic acid in water, and mobile phase B was acetonitrile. The flow rate was maintained at 0.15 mL min⁻¹, with the following gradient program: 0–1 min, 5% B; 1–11 min, linear increase from 5% to 100% B; 11–19 min, 100% B; 19–20 min, decrease from 100% to 5% B; and finally, 20–25 min, 5% B. The analytical parameters of the instrument used were previously detailed17. The system was coupled to 6540 Agilent Ultra-High-Definition Accurate Mass Q-TOF LC/MS (Palo Alto, CA, USA) using an electrospray ionization (ESI) source in both positive and negative ion modes. The operating conditions were applied as described by Baky et al.17, with a fragmentation voltage of 100 V. The Mass Hunter Workstation software (Agilent Technologies) was used for handling data acquisition. Compounds were assigned by comparing retention times (Rt), exact masses, and characteristic fragmentation patterns (MS2), as well as the candidates’ molecular formula (with 10 ppm mass accuracy limit), and data previously reported in other works of literature.

Antibacterial activity evaluation

Bacterial strains and culture conditions

Antibacterial activity of the aqueous and hydroalcoholic extracts of S. rosmarinus Spenn. and O. vulgare L. was carried out against two standard bacterial strains: Methicillin-resistant Staphylococcus aureus (MRSA) ATCC 43,300 as Gram-positive bacteria, and the Gram-negative bacteria Escherichia coli ATCC 25,922. The used bacterial strains were available in the stock culture in the Microbiology and Immunology Department, Faculty of Pharmacy (Girls), Al-Azhar University, Giza, Egypt. Nutrient agar, Mueller-Hinton agar, LB broth, and tryptic soy broth were purchased from Oxoid (Hampshire, UK). All reagents and chemicals for buffers were purchased from Sigma-Aldrich Co. (St. Louis, MO, USA).

Minimum inhibitory concentration (MIC) assessment using the broth microdilution method

For anti-microbial susceptibility testing, minimum inhibitory concentrations (MICs) were determined by the broth microdilution method according to the Clinical and Laboratory Standards Institute (CLSI) against standard strains of E. coli and MRSA18. The extracts were prepared in dimethyl sulfoxide (DMSO) at final concentrations ranging from 512 µg/mL to 16 µg/mL. MICs were carried out in triplicate (n = 3), and doxycycline was used as a reference drug control.

Biofilm Inhibition assay

The biofilm formation inhibition assay was conducted against MRSA isolates to evaluate the biofilm formation inhibition potential of the tested samples. The biofilm formation inhibition was determined by measuring the absorbance of the adherent biofilms following treatment and comparing these values with those obtained from the untreated controls. A 100 µL of bacterial suspension (1.5 × 108 CFU) in trypticase soy broth supplemented with 1% glucose was added to each well of flat-bottom microtiter plates. Then 100 µL of ¼ MIC of each extract was added to the corresponding well. In each microtiter plate, 6 wells were assigned for positive and negative controls. After incubation at 37 °C for 24 h, the microtiter plates were decanted and washed three times with 250 µL of sterile phosphate-buffered saline (PBS) pH 7.2, fixed by drying for 1 h at 60 °C, then stained with 200 µL of 0.1% w/v crystal violet, and kept at room temperature for 15 min. Finally, the microtiter plates were washed with distilled water, dried, filled with 200 µL of 33% acetic acid, and transferred (150 µL) to a new plate. A microplate reader (Tecan Elx800, USA) was used to measure the optical densities at 630 nm, as performed by Badawy et al.19. The results were represented as a biofilm formation inhibition percentage, calculated using the following equation:

$$\: \% \:Inhibition\:of\:biofilm\:formation\: = \:1 - \frac{{Optical\:density\:of\:sample\:}}{{Optical\:density\:of\:control\:\left( {untreated} \right)}}\: \times \:100$$

The assay was performed in triplicate ± SD (n = 3).

RNA extraction and qRT-PCR-based relative gene expression analysis

The effectiveness of extracts (RO/Aq.OV) to inhibit expression of the agrA, icaA gene was assessed using quantitative real-time PCR.

MRSA was cultured overnight at 37 °C in LB broth with and without extracts at a concentration of ¼MIC. The total RNA of the cultured MRSA was extracted and converted to DNA using the First High Pure RNA Isolation Kit (Roche Diagnostics GmbH, Germany) and QuantiTects Reverse Transcription Kit (Qiagen, USA), respectively, following the procedure of Saleh et al.20.

AgrA and icaA virulence genes were amplified using qRT-PCR in accordance with the instructions provided by One-Step Kit (Bioline, UK). The StepOne RT-PCR thermal cycler (Applied Biosystem, USA) was used to set up the qRT-PCR analysis.

The forward and reverse gene-specific PCR primers for AgrA, and icaA were (5′-GGA GTG ATT TCA ATG GCA CA-3′; 5′-ATC CAT TTT ACT AAG TCA CCG ATT-3′), and (5′-CAATACTATTTCGGGTGTCTTCACTCT-3; 5′-CAAGAAACTGCAATATCTTCGGTAATCAT-3′), respectively21. The relative expression values of each gene were normalized to the value of the housekeeping gene 16 S rRNA. The forward and reverse primers used for 16 S rRNA were 5′-TGT CGT GAG ATG TTG GG-3′, and 5′-TGT CGT GAG ATG TTG GG-3′, respectively21. 2−∆∆CT method was used to calculate the results22. The results were reported as means ± SD of triplicate measurements.

Antioxidant activity evaluation

In vitro antioxidant activity of methanolic extracts of S. rosmarinus Spenn. and O. vulgare L. was evaluated using 2,2-diphenyl-1-picrylhydrazyl (DPPH) and ferric-reducing antioxidant power (FRAP) assays. Color change of reaction mixtures resulting from the antioxidant activity of the extracts was monitored using a UV spectrophotometer (UV-1601 PC, Shimadzu, Kyoto, Japan), as follows:

2,2-Diphenyl-1-picrylhydrazyl assay (DPPH) assay

The free radical scavenging effect of the samples was evaluated as per the method previously described by Karaçelik et al.23. The reaction was performed by mixing the sample with DPPH at room temperature (25 °C) and incubating the mixture in the dark for 30 min. The absorbance was then recorded at 516 nm. Quenching of the color intensity of the DPPH indicates the scavenging activity of the extracts. The free radical scavenging activities were expressed as percent inhibition using the equation:

$$Inhibition\:\left( \% \right) = \frac{{Absorbance\:of\:control - Absorbance\:of\:sample}}{{Absorbance\:of\:control}} \times 100$$

The measurements were performed in triplicate, and the results are presented as mean ± SD.

FRAP assay

The ferric ion-reducing capacity of alcoholic extracts was measured kinetically following the method described by Benzie and Strain24. The FRAP reagent was prepared by mixing 300 mM sodium acetate trihydrate buffer (pH 3.6), 10 mM TPTZ (2,4,6-tripyridyl-s-triazine) dissolved in 40 mM hydrochloric acid, and 20 mM ferric chloride at a ratio 10:1:1 υ/υ/υ, respectively. Freshly prepared FRAP reagent (1.5 mL) was added to 50 µL of each extract (concentration = 0.1 mg/mL). Over three minutes, the absorbance change (resulting from the production of a ferrous ion blue color) was monitored at 593 nm. The results were expressed as µmol/L FeSO4.7H2O equivalent/mg of each extract.

Anti-inflammatory activity evaluation

COX-II Inhibition assay

Cyclooxygenase II (COX-II) Inhibitor Assay Kit from Abcam (the USA): ab211097 was used to evaluate the samples’ inhibitory activity. The reaction conditions and method comply with the manufacturer’s guidelines, using 10-fold serial dilutions (100, 10, 1, 0.1, 0.01 µg/mL). The process is based on detecting prostaglandin G2, a metabolite from arachidonic acid developed by COX-II activity, fluorometrically. Spectrofluorometer Tecan Spark (Tecan Group Ltd., Switzerland) was used to measure the fluorescence of the samples (Ex/Em = 535/587 nm) kinetically for 5–10 min at 25 °C. The IC50 was determined by plotting % inhibition of enzyme activity against sample concentrations. All sample assays were performed in triplicate.

Tumor necrosis factor-alpha (TNF-α) and nuclear factor kappa-B (NFқb) quantification

The macrophage cell line RAW 264.7, used for the in vitro anti-inflammatory assay, was obtained from the American Type Culture Collection (Manassas, Virginia, USA). The cells were cultivated in Dulbecco’s Modified Eagle’s medium (DMEM) with 10 µg/mL insulin, 1% penicillin-streptomycin, and 10% fetal bovine serum at 37 °C. The reagents were all of molecular biology grade.

The levels of tumor necrosis factor-alpha (TNF-α) and nuclear factor kappa-B (NF-κB) were quantitatively assessed in lipopolysaccharide (LPS) stimulated RAW 264.7 macrophages using enzyme-linked immunosorbent assay (ELISA) kits (human TNF-α ELISA Kit, Abcam, USA: ab181421; human NF-κB p100/NFKB2 ELISA Kit, Abcam, USA: ab288581). All procedures were conducted according to the manufacturers’ protocols. For both assays, absorbance was measured at 450 nm using a microplate reader (BIOLINE ELISA Microplate Reader for TNF-α; ROBONIK P2000 ELISA Reader for NF-κB). The equivalent concentrations were determined from standard curves, and all measurements were carried out in triplicate.

Statistical analysis

All experiments were performed in triplicate, and the results are expressed as mean ± standard deviation (SD). Data was analyzed using GraphPad Prism version 8.0.1 (GraphPad Software Inc., California, USA). Statistical differences between two independent groups were assessed using an unpaired t-test. For analyses involving more than two groups, one-way ANOVA was applied, followed by Tukey’s post hoc test for multiple comparisons. A p-value < 0.05 was considered statistically significant.

Multivariate data analysis

The data processing software MZmine 3.3 (available at https://github.com/mzmine/mzmine3) was employed for peak detection, deconvolution, deisotoping, and alignment of the imported mzXML files25. This workflow produced an aligned peak list, which served as the basis of a detailed data matrix incorporating information from all samples (in triplicate). The negative ESI mode demonstrated greater sensitivity for a broader range of expected metabolite classes compared to the positive ESI mode26. The data matrix included columns detailing the scan number, retention time (tR), mass-to-charge ratio (m/z), and peak intensity of the eluted compounds. Subsequently, the dataset was exported to SIMCA-P (version 14.1, Umetrics, Ume, Sweden) for Pareto scaling before multivariate analysis (MVA).

Partial least squares (PLS) analysis was applied to establish associations between bioactivities and the UPLC-QTOF-MS/MS dataset of annotated metabolites. Significant metabolites contributing to bioactivity were identified using variable importance in projection (VIP) scores derived from the PLS model. Additionally, Pearson’s correlation coefficient (r) was calculated for correlation analysis, and a correlogram was generated to visually represent the strength of the correlations between metabolites and the evaluated bioactivity. This visualization was created using the MetaboAnalyst 5.0 platform (https://metaboanalyst.ca/). The thresholds for interpreting correlation coefficients were defined as follows: negligible correlation for r < 0.3, weak correlation for r = 0.3–0.5, moderate correlation for r = 0.5–0.7, strong correlation for r = 0.7–0.9, and very strong correlation for r = 0.9–1.027.

Results and discussion

UPLC–QTOF-MS/MS metabolite profiling of Salvia rosmarinus Spenn. and Origanum vulgare L. extracts

To identify the metabolites likely to mediate the aforementioned antimicrobial, antioxidant, and anti-inflammatory effects, UPLC–QTOF–MS/MS was used in both ionization modes (positive and negative) to provide comprehensive detection of metabolites in S. rosmarinus Spenn. and O. vulgare L. extracts. Base peak chromatograms (BPC) of S. rosmarinus Spenn. and O. vulgare L. extracts are presented in Fig. 1. The analysis resulted in the detection of 164 compounds within 25 min. UPLC run, of which 92 were detected in both extracts, including hydroxycinnamic acid derivatives, flavonoid derivatives, benzoic acid derivatives, terpenes, and organic acids, as summarized in Table 1. The chemical structures of the major classes of metabolites are shown in Fig. 2. Details of the assigned metabolites are discussed in the following subsections.

Fig. 1
figure 1

Base peak chromatogram (BPC) of rosemary (RO) and oregano (OV) extracts analyzed by UPLC–QTOF-MS/MS in both negative (A) and positive (B) ion modes.

Table 1 Identified metabolites in S. rosmarinus Spenn. And O. vulgare L. extracts via UPLC–QTOF–MS/MS in negative/positive ionization modes. All molecular formulae were assigned with a mass accuracy limit of ± 10 Ppm & the bolded fragments represent the base peak ions.
Fig. 2
figure 2

Chemical structures of the major classes of metabolites identified in the rosemary & oregano extracts. The numbers listed refer to the identified metabolites listed in Table 3. (A) Caffeic acid dimers, (B) caffeic acid trimers, (C) caffeic acid tetramer, (D) flavones, (E) flavanones, (F) abietane diterpenoids, (G) triterpenoids, (H) fatty acids.

Hydroxycinnamic acid derivatives

Twenty-eight hydroxycinnamic acid derivatives of caffeic, coumaric, ferulic acids, and danshensu (salvianic acid A or α-hydroxy dihydrocaffeic acid C9H10O5) were detected. These derivatives showed common major fragment ions at m/z 197 for deprotonated danshensu, m/z 179 for caffeate, m/z 161 for caffeoyl, and m/z 135 for decarboxylated caffeate in MS2 spectra (Fig. 3).

Fig. 3
figure 3

Fragmentation pattern of Salvianolic acid K.

Depsides, i.e., hydroxycinnamic acid dimers or oligomers linked via ester bonds, are characteristic chemomarkers of the Lamiaceae family28. They are recognized as bioactive phenolics for their antioxidant, antiallergic, immunomodulatory, and antimicrobial activities29. Twelve depsides were identified herein, with salvianolic acid D (cpd. 7) detected for the first time in RO, and both salvianolic acid K (cpd. 15) and cleroden J (cpd. 33) in O. vulgare.

Salvianolic acid D and rosmarinic acid are caffeic acid dimers. Salvianolic acid D (cpd. 7, m/z 417.0791 [M-H], [C20H17O10]) showed a base peak in MS2 spectra at m/z 219 [M-H-198] signifying the loss of a danshensu moiety (Supplementary Fig. 1S)30. Rosmarinic acid-O-hexoside (cpd. 16, m/z 521.1285 [M-H], [C24H25O13]), rosmarinic acid (cpd. 18, m/z 359.0766 [M-H], [C18H15O8]) and methylrosmarinic acid (cpd. 30, m/z 373.0917 [M-H], [C19H17O8]) shared the same fragment ions at m/z 197 and 179 in MS2 spectra, corresponding to deprotonated danshensu and caffeate moieties, respectively (Supplementary Fig. 2–4 S)31.

Cleroden J (cpd. 33, m/z 553.1339 [ M-H], [C28H25O12]) was detected in O. vulgare L. for the first time and has previously been isolated from other species within the same family32. The spectrum was dominated by a base peak at m/z 135, corresponding to the decarboxylated caffeic acid fragment [caffeic acid–H–CO2]. Additional product ions were observed at m/z 521 arising from the loss of a methoxy group [M–H–OCH3], and at m/z 477, corresponding to subsequent decarboxylation [M–H–OCH3–CO2]. A further significant ion at m/z 179 [C9​H7​O4] confirms the presence of caffeic acid units within the structure (Supplementary Fig. 5S).

Caffeic acid trimers vis. salvianolic acids A and K were identified. Salvianolic acid K (cpd. 15, m/z 555.1129 [M-H], [C27H23O13]) revealed daughter ions at m/z 511 [M-H-44] and 357 [M-H-198] after the losses of carboxyl group and danshensu moieties (Supplementary Fig. 6S), respectively33. The fragmentation pattern of this compound is presented as a representative example of the.

Salvianolic acid B and sagerinic acid are caffeic acid tetramers (rosmarinic acid dimers). Salvianolic acid B1 is formed by oxidative cyclization of two rosmarinic acid molecules, giving a 1,2-dihydronaphthalene ring structure, while sagerinic acid is formed by dimerization of 2 rosmarinic acid molecules and cyclobutane ring formation34. Salvianolic acid B (cpd. 20, m/z 717.1437 [M-H], [C36H29O16]), produced a base peak ion at m/z 359 [C18H15O8] representing rosmarinic acid, and the less abundant product ions that indicate sequential losses of two danshensu: at m/z 519 [M-H-198], and m/z 321 [M-H-198-198] (Supplementary Fig. 8S)35.

Sagerinic acid (cpd. 21, m/z 719.1602 [M-H], [C36H31O16] ) generated a base peak fragment ion at m/z 359 [M-H-360], resulting from molecular splitting [M/2], corresponding to rosmarinic acid and another ion with lower intensity at m/z 197 [C9H9O5] corresponding to the danshensu moiety (Supplementary Fig. 9S)34.

Flavonoids

Flavonoids comprised the major class of secondary metabolites in the alcoholic profiles of both S. rosmarinus Spenn. and O. vulgare L., where a total of 56 flavonoid derivatives were detected in this study. These included representatives of flavanones, flavonols, and flavones, among which five compounds in O. vulgare L. (nepitrin; cpd. 60, hispidulin-O-rutinoside; cpd. 63, luteolin-O-pentosyl-acetyl-hexoside; cpd. 64, luteolin caffeoylhexoside; cpd. 67, and acacetin-O-rutinoside; cpd. 71) and one compound in S. rosmarinus Spenn. (quercetin coumaroylhexoside; cpd. 96) were identified for the first time in these species. The elution of flavonoids appeared to follow a decreasing polarity sequence in chromatograms. So firstly, at the Rt range (9.44–11.92 min.), flavonoid diglycosides were detected. Apigenin-6,8-di-C-hexoside (cpd. 52, m/z 593.1491 [M-H], [C27H29O15]) was annotated after showing the losses of 120 amu (m/z 473) and 90 amu (m/z 503), indicative of a C-linked hexoside internal cleavage, and the losses of 240 (-2 × 120) amu (m/z 353) and 210 (-120-90) amu (m/z 383) that also indicate the internal cleavages that occur in both C-linked hexoside (Supplementary Fig. 10S)36. Rutin, quercetin-O-rutinoside, (cpd. 92, m/z 611.1602 [M + H]+, [C27H31O16]+) was confirmed by the MS2 spectra, which displayed fragment ions at m/z 465 and m/z 303, denoting the loss of a deoxyhexose sugar [M + H-146]+ followed by the loss of a hexose sugar [M + H-146-162]+, respectively (Supplementary Fig. 11S)37. Luteolin-O-rutinoside (cpd. 56, m/z 593.1495[M-H], [C27H29O15]) yielded a characteristic base peak of m/z 285 for the luteolin fragment after the loss of 308 (-162-146) amu of the rutinoside moiety (Supplementary Fig. 12S) Luteolin-O-pentosyl-hexoside (cpd. 61, m/z 581.1498 [M + H]+, [C26H29O15]+), showed a base peak ion in the MS2 spectra at m/z 287 [M + H-162-132]+, suggesting the respective losses of hexose and pentose (Supplementary Fig. 13S). Apigenin-O-rutinoside (cpd. 62, m/z 579.1693 [M + H]+, [C27H31O14]+) represented major fragment ions at m/z 433 [M + H-146]+ and 271 [M + H-146-162]+, indicating the loss of a deoxyhexose sugar followed by a hexose sugar, respectively (Supplementary Fig. 14S)38.

Flavonoid monoglycosides were identified in the following section of the chromatographic elution at Rt range of 9.85–12.08 min. Nepitrin (6-methoxyluteolin-O-hexoside) (cpd. 60, m/z 479.1183 [M + H]+, [C22H23O12]+) displayed a prominent product ion in MS2 at m/z 317 appeared after the loss of a hexose [M + H-162]+ moiety and another fragment at m/z 302 appeared after the losses of a hexose and methyl group [M + H-162-15]+ (Supplementary Fig. 15S). Apigenin-O-hexoside (cpd. 65, m/z 433.1128 [M + H]+, [C21H21O10]+) and apigenin-O-hexuronide (cpd. 66, m/z 447.0921 [M + H]+, [C21H19O11]+) are monoglycoside flavones, both demonstrated a similar base peak ion at m/z 271 [C15H11O5]+, corresponding to apigenin aglycone after the losses of hexose and hexuronide moieties, respectively, and minor daughter ions at m/z 153 and 109 resulting from Retro Diels Alder (RDA) reactions (Supplementary Fig. 16S, 17 S). Homoplantaginin (Hispidulin-O-hexoside) (cpd. 75, m/z 463.1235 [M + H]+, [C22H23O11]+ ) showed a base peak ion at m/z 301 [M + H-162]+ after the loss of a hexose moiety and another fragment ion at m/z 286 [M + H-162-15]+ was produced due to the loss of a hexose followed by methyl moiety, that matched characteristic fragments of hispidulin (Supplementary Fig. 18S).

Flavonoid aglycones were detected in the chromatograms after Rt (10.48 min.). Eriodictyol (cpd. 103, m/z 287.0553 [M-H], [C15H11O6]) gave fragment ions resulting from aglycone C-ring RDA cleavages, showing a base peak ion at m/z 135 (1,3B), a major fragment ion at m/z 151 (1,3A) and minor fragment ions at m/z 107 and m/z 125 for (1,3A-CO2) and (1,4A), respectively (Supplementary Fig. 19S)39 Similarly, apigenin aglycone (cpd. 77, m/z 269.0451 [M-H], [C15H9O5]), demonstrated the MS2 data that illustrated the RDA fragment ions at m/z 151 (1,3A ), m/z 149 (1,4B+2H), m/z 117 (1,3B) and 107 (1,3A-CO2) due to C-ring cleavage in addition to other fragment ions resulting from small losses vis. m/z 225 and m/z 201 consecutive to CO2 and C3O2 losses (Supplementary Fig. 20S)38,39. Isorhamnetin; O-methyl-quercetin, (cpd. 97, m/z 315.0506 [M-H], [C16H11O7]) was identified based on the distinctive MS2, where the loss of a methyl group (30 amu) was noted to produce a base peak ion at m/z 300 and minor fragment ions at m/z 271 and m/z 243 corresponding to the loss of CO2 and CO2 + CO groups, respectively (Supplementary Fig. 21S)40. Hydroxygenkwanin (cpd. 82, m/z 299.0554 [M-H], [C16H11O6]) was suggested as on dissociation produce fragment ions at m/z 284 [M-H-15] denoting the loss of a methyl, m/z 256 [M-H-15-28] indicating the losses of methyl and CO groups, m/z 227 [M-H-15-28-29] inferring the losses of methyl, CO and CHO groups and m/z 151 (1,3A-CH3) and m/z 133 (1,3B) due to RDA cleavage of C-ring (Supplementary Fig. 22S)41. Sakuranetin (cpd. 107, m/z 285.0760 [M-H], [C16H13O5]) had a characteristic MS2 showing major fragment ions at m/z 165 and 119 resulting from RDA cleavage of the C-ring at (1,3A) and (1,3B), respectively (Supplementary Fig. 23S)7. Salvigenin (cpd. 90, m/z 329.1019 [M + H]+, [C18H17O6]+) showed fragment ions at m/z 314 [M + H-15]+ corresponding to the loss of a methyl group, m/z 296 [M + H-15-18]+ indicating the a further loss of water molecule and a minor fragment ion at m/z 268 [M + H-15-18-28]+ due to the collective loss of methyl, water and CO groups (Supplementary Fig. 24S)42,43.

Terpenes

A total of 42 metabolites belonging to monoterpenes, diterpenes, sesquiterpenoids, and triterpenes were detected and mainly eluted at the middle and late sections of the chromatogram (Rt =8.4–22.4 min.). Abietenes are phenolic diterpenes of limited distribution in some species of the Lamiaceae family44. These compounds have various biological actions, including antioxidant, anti-inflammatory, and anti-microbial properties45. Hydroxy-O-methylrosmanol (cpd. 116, m/z 375.1803 [M-H], [C21H27O6]) generated a major fragment ion at m/z 299 [M-H-44-31-1] after the losses of CO2 and OCH3 and molecular rearrangement, besides the daughter ions at m/z 345 [M-H-30] [C20H25O5] for the rosmanol fragment, in addition to m/z 331 [M-H-44] and m/z 316 [M-H-44-15] attributed to the losses of CO2 and CH3, respectively (Supplementary Fig. 25S)46. Rosmadial (cpd. 130, m/z 343.1544 [M-H], [C20H23O5]) gave fragments at m/z 315 [M-H-28] for a loss of CO, and m/z 299 [M-H-44] suggesting a cleavage of CO2 (Supplementary Fig. 26S)47. Tetrahydro-hydroxyrosmariquinone (cpd. 133, m/z 301.1802 [M-H], [C19H25O3]) was assigned after revealing product ions; m/z 283 [M-H-18], 273 [M-H-28], and 258 [M-H-43] following the losses of H2O, CO, and (CH(CH3)2), respectively (Supplementary Fig. 27S) and in accordance with previous reported data47. Carnosic acid (cpd. 137, m/z 331.1904 [M-H], [C20H27O4]) revealed a major fragment ion at m/z 287 [M-H-44] after decarboxylation that was followed by the loss of an isopropyl group (CH(CH3)2) yielding a fragment ion at m/z 244 [M-H-44-43] (Supplementary Fig. 28S). O-methylcarnosic acid (cpd. 138, m/z 345.2063 [M-H], [C21H29O4]) on fragmentation showed two major ions at m/z 301 and m/z 286, corresponding to the losses of CO2 [M-H-44] and a successive loss of methyl group [M-H-44-15], and fragment ion with low intensity at m/z 271 resulted from the further loss of a methyl group [M-H-44-15-15] (Supplementary Fig. 29S)48.

Six pentacyclic triterpenes were identified in alcoholic extracts of S. rosmarinus Spenn. and O. vulgare L., among them oleanolic acid, ursolic acid, and corosolic acid, which possess documented anti-inflammatory and antioxidant properties49. Asiatic acid (cpd. 143, m/z 487.3416 [M-H], [C30H47O5]) showed characteristic fragment ions in its MS2 spectra at m/z 469 [M-H-18] after dehydration, m/z 441 [M-H-46] corresponding to the loss of HCOOH, and m/z 409 [M-H-46-32] by the respective losses of HCOOH and CH3OH (Supplementary Fig. 30S).

Antibacterial activity

Evaluation of minimum inhibitory concentrations (MIC) and biofilm formation Inhibition

The extracts exhibited variable antibacterial activities against MRSA and E. coli Table 2. The methanolic extract of S. rosmarinus Spenn. and the aqueous extract of O. vulgare L. exhibited the strongest antibacterial activities (MIC = 64 µg/mL against both strains).

Table 2 MIC inhibitory test of methanolic And aqueous extracts of S. rosmarinus Spenn. And O. vulgare L. against MRSA And E. coli.

Biofilm development presents a significant challenge in microbial infections because of its role in increasing resistance. Therefore, the most active extracts were tested for their ability to inhibit biofilm formation in MRSA. In our study, RO and Aq.OV, which showed the strongest antibacterial activity, were further examined for their antibiofilm formation activity. RO and Aq.OV extracts showed significant inhibition at ¼ MIC, reducing biofilm formation by 54.9 ± 2.3% and 61.4 ± 0.6%, respectively, and an unpaired t-test confirmed a statistically significant difference between them (p = 0.0091). Based on established criteria50, a plant extract achieving a biofilm inhibition level greater than 50% is generally regarded as indicative of good antibiofilm activity. Accordingly, the inhibition levels observed in our study indicate that these extracts may represent promising alternatives to conventional antibiotics for managing MRSA infections, especially in biofilm-associated cases where standard therapies often fail due to the protective biofilm51.

Reduction of IcaA and AgrA gene expression levels

The icaA and agrA are important genes that play crucial roles in virulence and biofilm development in MRSA; the icaA gene is responsible for biofilm formation and the agrA gene is responsible for quorum sensing of MRSA52. The icaA was downregulated by 30% and 60% after treatment of MRSA with ¼ MIC of RO and Aq.OV extracts, respectively. Similarly, the agrA gene was also downregulated by 43% and 70% after treating MRSA with ¼ MIC of RO and Aq.OV extracts, respectively (Fig. 4). For both icaA-1 and agrA genes, Tukey’s multiple comparisons test demonstrated statistically significant differences among all groups (RO extract, Aq.OV extract, and control) (p < 0.0001). These results are consistent with the observed antibiofilm activity, indicating that the extracts interfere with critical genetic regulators essential for biofilm formation.

Fig. 4
figure 4

Inhibition of icaA-1 gene responsible for biofilm formation and agrA gene accountable for quorum sensing in MRSA. RO; Salvia rosmarinus, Aq.OV; Aqueous extract of Origanum vulgare. Data are represented as the mean ± SD of three independent assays. Statistical analysis was performed using one-way ANOVA, followed by Tukey’s post hoc test was performed to calculate the statistical significance (p < 0.0001). As compared to RO (@), Aq.OV (#), and control (*).

Antioxidant activity

The antioxidant activity was assessed using complementary in vitro assays based on different mechanisms, including the DPPH radical scavenging assay and the FRAP reducing power assay.

The results revealed that the methanolic extract of S. rosmarinus Spenn. exhibited a significantly stronger radical scavenging capacity in the DPPH assay (IC50 = 6.56 ± 0.035 µg/mL) compared to the methanolic extract of O. vulgare L. (IC50 = 17.60 ± 0.333 µg/mL (Unpaired Student’s t-test, p < 0.0001) (Table 3). In contrast, O. vulgare L. exhibited a significantly higher reducing capacity in the FRAP assay (188.61 ± 24.06 µmol/L) compared to S. rosmarinus Spenn. (122.78 ± 2.09 µmol/L) (Unpaired Student’s t-test, p = 0.0004) (Table 3).

Table 3 Antioxidant activity of methanolic extracts of S. rosmarinus Spenn. And O. vulgare L. using 2,2-diphenyl-1-picrylhydrazyl (DPPH) And ferric-reducing antioxidant power (FRAP) assays.

Anti-inflammatory activity

Inflammation is a complex biological response that serves as both an indicator of pathological disturbances and a contributor to disease progression as a result of sustained disruption of inflammatory regulation53. Pro-inflammatory cytokines, such as TNF-α, are released in response to inflammatory stimuli, which activate NF-κB signaling and subsequently induce the expression of COX-II53. In this study, the anti-inflammatory activity of the methanolic extracts of S. rosmarinus Spenn. and O. vulgare L. was evaluated through COX-II inhibition, as well as the suppression of TNF-α and NF-κB, using ibuprofen as a standard. S. rosmarinus Spenn. extract demonstrated strong anti-inflammatory potential, as evidenced by its COX-II inhibitory effect (IC50 = 11.09 ± 0.46 µg/mL), which was comparable to ibuprofen (IC50 = 8.79 ± 0.37 µg/mL), with no statistically significant difference between them (Tukey’s post hoc test, p < 0.595). In parallel, S. rosmarinus Spenn. extract significantly suppressed key inflammatory mediators, reducing TNF-α and NF-κB levels to 0.385 and 0.31 fold, respectively, of the control values that were close to those achieved by ibuprofen, with significant differences observed for TNF-α (p = 0.0013) and NF-κB (p = 0.0102). Conversely, O. vulgare L. extract exhibited noticeably weaker anti-inflammatory effects across all tested markers, showing significantly lower efficacy than ibuprofen (p < 0.0001) (Table 4).

Table 4 Anti-inflammatory activity of S. rosmarinus Spenn. And O. vulgare L. methanolic extracts.

Multivariate data analysis and Pearson’s correlation study

The PLS model, as a supervised approach, was adopted to determine the relationship between the identified metabolites (Table 1) and the results of the biological investigations of S. rosmarinus Spenn. and O. vulgare L. extracts, utilizing the UPLC–QTOF–MS/MS dataset as X variables and the Y variables were the antibacterial activity represented as 1/MIC values against E. coli and MRSA strains, the antioxidant activity represented as 1/IC50 values of DPPH radical scavenging and the values of the ferric ion reducing capacity of the extract (FRAP), and the anti-inflammatory activity represented by the down-regulation levels of the inflammation biomarkers calculated as 1/COX-II, 1/NF-кB, and 1/TNF-α.

The PLS Model was validated by the quality of fitness and prediction of Y. The autofit of the PLS model demonstrated excellent fit (R2Y cum = 0.996) and predictive capability (Q2 cum = 1), suggestive of a strong model with no overfit. The PLS biplot, which combines score and loading charts, was used to visually represent the relation between the samples and variables contributing to differentiation across the extracts (Fig. 5). The proximity of the X and Y variables to the sample clusters signifies their degree of contribution to the defining traits of each cluster. Figure 5 illustrates that the S. rosmarinus Spenn. extract was segregated from the O. vulgare L. extract by the first latent variable (LV1). This may be attributed to differences in metabolite abundances.

Fig. 5
figure 5

PLS scores-loadings biplot describing the correlations of the identified metabolites in rosemary; RO and oregano; OV extracts and their studied bioactivities. In zoom, the detected compounds are annotated as metabolites.

Moreover, the bacterial inhibition activity and the DPPH free radical scavenging activity were positioned alongside the S. rosmarinus Spenn. extract, signifying their superior activities relative to the O. vulgare L. extract. Notably, diterpenes (i.e., oridonin, carnosic acid, hydroxyrosmanol, rosmic acid, dimethoxyrosmanol, rosmadial, and tetrahydro-7-hydroxyrosmariquinone), triterpenes (i.e., asiatic acid, corosolic acid, and 3-oxours-12-en-20,28-olide), hydroxycinnamic acids (i.e., yunnaneic acid F, salvianolic acid K, and rosmarinic acid), and flavonoid derivatives (i.e., nepitrin, isorhamnetin, and hesperetin) were found to be enriched in the S. rosmarinus Spenn. extract. This demonstrates their beneficial effects on the DPPH free radical scavenging and bacterial inhibitory activities in S. rosmarinus Spenn. extract. The strong antibacterial and DPPH free radical scavenging actions of these metabolites can be attributed to the existence and quantity of phenolic hydroxyl groups54. In contrast, the O. vulgare L. extract had minimal projection towards those Y variables, positioned on the positive side of the latent variable (LV1). This observation indicated a lesser correlation of the O. vulgare L. extract with the examined bioactivities. These findings are aligned with results from the evaluation of the antibacterial activity study and evaluation of the free radical scavenging activity (DPPH assay), where S. rosmarinus Spenn. extract showed stronger bacterial inhibition than O. vulgare L. extract (Table 2). Also, S. rosmarinus Spenn. extract exhibited the highest scavenging capacity of DPPH· radical with the lowest IC50 value, followed by O. vulgare L. extract, indicating strong antioxidant activity of the extract (Table 3).

However, antioxidant activity investigated as ferric ion reducing capacity (FRAP) was positioned alongside the O. vulgare L. extract, signifying their superior activities relative to S. rosmarinus Spenn. extract. These findings indicated that O. vulgare L. extract exhibited an antioxidant activity due to their enrichment in benzyl derivatives (i.e., hydroxyphenol hexoside, hydroxyphenol hexoside derivative, and origanine B or C), hydroxycinnamic acids (i.e., lithospermic acid derivative), and organic acids and esters (i.e., oxoadipic acid, corchorifatty acid F, malic acid, and citric acid) were found to be enriched in the O. vulgare L. extract. The enrichment of these compounds may account for their notable ferric ion-reducing capacity and overall antioxidant activity. These constituents are known for their redox properties, free radical scavenging ability, and metal ion chelation, which collectively contribute to the observed antioxidant potential8. Regarding the anti-inflammatory activity of both extracts assessed by inhibiting COX-II activity and modulating NF-кB, and TNF-α pathways, those Y variables showed proximity to the extract of S. rosmarinus Spenn., indicating a direct correlation. O. vulgare L. exhibited less projection, suggesting less correlation. S. rosmarinus Spenn. extract is richer in flavonoid derivatives (i.e., luteolin-acetyl-O-hexuronide, apigenin, dimethylquercetin, and cirsimaritin), hydroxycinnamic acids (i.e., salvianolic acid B and lithospermic acid), and diterpenes (i.e., rosmanol, hydroxy-O-methylrosmanol, hydroxyrosmadial, and carnosol), which are well recognized for their anti-inflammatory effects55. These findings are consistent with the anti-inflammatory activity of the extracts, where the S. rosmarinus Spenn. extract showed stronger anti-inflammatory activity than the O. vulgare L. extract (Table 4). Previous reports highlighted the importance of flavonoid derivatives and diterpenes as anti-inflammatory metabolites. For instance, carnosic acid and carnosol exert anti-inflammatory effects primarily by inhibiting the NF-κB, MAPK, STAT3, and NLRP3 inflammasome pathways, leading to reduced expression of pro-inflammatory cytokines such as TNF-α, IL-1β, and IL-6. They also activate SIRT1, which further suppresses inflammation by downregulating these signaling cascades56. Additionally, flavonoids such as luteolin and apigenin have been proven to exhibit anti-inflammatory effects mainly by inhibiting the transcriptional activity of NF-κB without affecting its upstream signaling. They also slightly reduce JNK activation and suppress the expression of pro-inflammatory chemokines, contributing to their overall anti-inflammatory action57.

The correlation analysis was confirmed by calculating Pearson’s correlation coefficient (r ≥ 0.7), with statistical significance set at p < 0.05 and a false discovery rate (FDR) < 0.08. A correlogram (Fig. 6) was generated to visualize the strength of correlations among the variables. Notably, the analysis focused on metabolites with a PLS variable importance in projection (VIP) score of 1 or higher (Fig. 7), leading to the selection of 66 annotated metabolites (Fig. 6). The correlogram revealed strong positive correlations between the examined anti-microbial activity, DPPH radical scavenging activity, and hydroxycinnamic acid derivatives, diterpenes, triterpenes, and flavonoid derivatives, mainly present in S. rosmarinus Spenn. extract, namely, oridonin, carnosic acid, hydroxyrosmanol, rosmic acid, dimethoxyrosmanol, rosmadial, tetrahydro-7-hydroxyrosmariquinone, asiatic acid, corosolic acid, 3-oxours-12-en-20,28-olide, Yunnaneic acid F, salvianolic acid K, rosmarinic acid, nepitrin, isorhamnetin, and hesperetin. The antimicrobial activities of carnosic acid and rosmarinic acid are well-documented in the literature and appear to involve multiple complementary mechanisms. Carnosic acid has been reported to act as a potential quorum-sensing inhibitor, thereby suppressing bacterial virulence and biofilm formation. Additionally, its lipophilic nature allows it to incorporate into bacterial membranes, leading to membrane destabilization, increased permeability, and potential cell lysis58. Similarly, rosmarinic acid exerts its antibacterial effects primarily through membrane disruption, inhibition of efflux pumps, interference with essential bacterial enzymes, and suppression of biofilm formation, with particularly pronounced activity against Gram-positive bacteria. These mechanisms collectively support the strong antimicrobial potential of these phenolic compounds, particularly in targeting persistent and resistant bacterial strains59. Additionally, benzyl derivatives, organic acids & esters, and hydroxycinnamic acids are mainly present in O. vulgare L. extract exhibited strong positive correlations with the antioxidant activity investigated as FRAP, including hydroxyphenol hexoside, hydroxyphenol hexoside derivative, origanine B or C, lithospermic acid derivative, cleroden J, oxoadipic acid, and corchorifatty acid F. Lithospermic acid has been proven to possess significant antioxidant activity, primarily through its ability to scavenge free radicals. By neutralizing reactive oxygen species (ROS), it plays a crucial role in protecting cellular components from oxidative damage. These documented mechanisms highlight its potential as a therapeutic agent against oxidative stress-related diseases, reinforcing its value as a key natural antioxidant in plant-based systems60. Also, the investigated anti-inflammatory activities were strongly positively correlated with flavonoid derivatives, diterpenes, and hydroxycinnamic acids. Pearson’s correlation coefficient analysis strongly supported the PLS analysis findings.

Fig. 6
figure 6

Pearson’s correlation between the metabolites and the antibacterial, antioxidant, and anti-inflammatory activities. Intensity of colors (blue and red) indicates correlation coefficients. The numbers listed on both axes refer to the identified metabolites listed in Table 1.

Fig. 7
figure 7

Variable Importance in the Projection (VIP) plot of the PLS model for the top contributing metabolites to bioactivities (VIP ≥ 1).

Conclusion

This study provides the first evidence linking specific metabolites to some of the most important pharmacological effects of two Lamiaceae species, Salvia rosmarinus and Origanum vulgare. While S. rosmarinus Spenn. exhibited superior anti-inflammatory and radical scavenging activities, O. vulgare L. showed a stronger reducing power. PLS and Pearson’s correlation coefficients confirmed the strong positive correlation between different hydroxycinnamic acids derivatives (i.e., Yunnaneic acid F, salvianolic acid K, and rosmarinic acid), diterpenes (i.e., oridonin, carnosic acid, hydroxyrosmanol, rosmic acid, dimethoxyrosmanol, rosmadial, and tetrahydro-7-hydroxyrosmariquinone), triterpenes (i.e., asiatic acid, corosolic acid, and 3-oxours-12-en-20,28-olide), and flavonoid derivatives (i.e., nepitrin, isorhamnetin, and hesperetin) mainly present in S. rosmarinus Spenn. extract with strong antibacterial and DPPH radical scavenging activities. Moreover, the anti-inflammatory activity was positively correlated with flavonoid derivatives (i.e., luteolin-acetyl-O-hexuronide, apigenin, dimethylquercetin, and cirsimaritin), diterpenes (i.e., rosmanol, hydroxy-O-methylrosmanol, hydroxyrosmadial, and carnosol), and hydroxycinnamic acids (i.e., salvianolic acid B and lithospermic acids). The antioxidant activity evaluated as FRAP reducing power was positively correlated with benzyl derivatives (i.e., hydroxyphenol hexoside, hydroxyphenol hexoside derivative, and origanine B or C), organic acids and esters (i.e., oxoadipic acid, corchorifatty acid F, malic acid, and citric acid), and hydroxycinnamic acids (i.e., lithospermic acid derivative and cleroden J). This study can be applied to a wide range of medicinal plants, driving a deeper exploration of the correlation between bioactivities and metabolite composition. In turn, this paves the way for a profound understanding of mechanisms of action, pharmacokinetics, and structure-activity relationships, and advances the development of herbal medicine practice. Bioinformatic tools also enable this approach to be expanded toward other therapeutic targets.