Introduction

Endophytic fungi (EFs) are a hyperdiverse group of organisms that during part or all of their life cycle colonize plant tissues (e.g., stem, flowers, leaves, fruits, roots) intra and/or extracellularly without causing symptoms of disease (Jia et al. 2016; dos Reis et al. 2022). These microorganisms are present in almost all plant species in natural ecosystems, where they play key roles in the plant micro-ecosystem, mainly under conditions of biotic or abiotic stress (Rho et al. 2018; Dastogeer 2018; Molina-Montenegro et al. 2023). EFs have co-evolved with host plants synthesizing numerous bioactive compounds that contribute to plant-fungus interactions, providing fitness benefits to host plants (Jia et al. 2016; Rho et al. 2018; Dastogeer 2018; Molina-Montenegro et al. 2023). These characteristics make these microorganisms one of the largest underexploited natural resources for the discovery of novel bioactive metabolites.

The EFs are capable of synthesizing a wide diversity of chemically different metabolites, which include alkaloids, benzopyrones, cytochalasins, steroids, phenols, isocoumarins, terpenoids, xanthones, etc. (Schulz and Boyle 2005; Manganyi and Ateba 2020; Hashem et al. 2023; Shen et al. 2023). Many of these metabolites are bioactive and may have antimicrobial, antioxidant, antiviral, anti-inflammatory, cytotoxic, and immunosuppressive activities (Manganyi and Ateba 2020; Mousa et al. 2021; Mohamed et al. 2022). Furthermore, EFs are capable of synthesizing metabolites similar to those found in plants, which drives the plant-fungus relationship comprehension (Kim et al. 2016). However, numerous challenges arise when studying the diversity of metabolites produced by EFs due to the complexity of crude extracts and the fact that classical methods of extracting and isolating metabolites are time-consuming and laborious. In addition, some bioactive metabolites of interest are only detected in trace amounts (Alhadrami et al. 2021). As an alternative to classical methodologies, metabolomics has emerged as a powerful tool to allow the comprehensive characterization of complex crude extracts and the chemical diversity of EFs metabolites (Alhadrami et al. 2021; Sayed et al. 2022), including small molecules.

Metabolomics is an “omics” technology defined as the study of all metabolites or small molecules in biological systems under specific conditions (Bundy et al. 2008; Patti et al. 2012; Marchev et al. 2021). This approach uses technological advances in analytical chemistry such as mass spectrometry (MS) (Rampler et al. 2021), to measure and compare the metabolites and small molecules present in the systems (Martin et al. 2019). However, although metabolomics provides a more holistic view of the chemical diversity produced by EFs, this approach is recent and depends on expensive equipments and a series of critical steps to obtain and analyze the data, including raw data preprocessing, peak annotation and multivariate statistical analysis.

Studying and understanding the chemical diversity of metabolites synthesized by EFs is extremely important to comprehend their biology, evolution, ecology, and possible biotechnological applications, which has been allowed by metabolomics in a holistic way as an emerging technology. However, critical steps ranging from formulation of hypotheses and objectives to data collection and analysis should be better addressed to study the chemical complexity produced by EFs successfully. In this review, we discussed the chemical diversity of metabolites produced by EFs and its applications, the use of metabolomics to explore chemical diversity in EFs, the inherent challenges, perspectives, limitations, tips and strategies for studying metabolite-producing EFs.

Biosynthesis of primary and secondary metabolites by endophytic fungi

Primary and secondary metabolites are two broad categories of chemical compounds produced by many organisms, including endophytic fungi, which are highly important for their overall fitness and survival. Involved in the basic life processes (i.e., growth, development, and energy production), primary metabolites are essential compounds that comprises carbohydrates, proteins, lipids, and nucleic acids, as well as key intermediates in metabolic pathways like glucose, amino acids, and ATP (adenosine triphosphate) (Alam et al. 2021). Secondary metabolites are not directly involved in primary metabolic processes, but often have specialized functions mainly associated with the defense systems or adaptation of organisms to environmental stresses due to the production of alkaloids, terpenoids, phenolics, and various other classes of compounds with diverse roles (Rashmi and Venkateswara Sarma 2018; Alam et al. 2021). Primary metabolites typically occur in all cells and tissues, and their production is tightly regulated to meet the organism’s basic metabolic needs. However, some key steps of the primary metabolism provide precursors for the synthesis of secondary metabolites (Alam et al. 2021). Mostly synthesized in limited quantities, secondary metabolites are generally produced in specific tissues or under particular conditions in response to environmental factors (e.g., stress, infection, or competition) (Sumarah and Miller 2009). The production of primary metabolites is generally continuous and essentially controlled to maintain the basic metabolic processes of organisms. The synthesis of secondary metabolites is more flexible and responsive to external factors, and its production is often induced by specific cues, such as pathogen attacks or environmental stressors, varying in response to changing conditions, and not produced continuously necessarily (Sumarah and Miller 2009). Moreover, primary metabolites are usually more uniform in structure and function as they play essential roles in the basic cellular processes. On the other hand, secondary metabolites exhibit a wide range of structural diversity and have various functions specific to a particular organism or ecological niche (Schneider et al. 2008; Bielecka et al. 2022). In addition, genomic studies have shown that endophytic fungi possess a larger number of biosynthetic gene clusters than ever expected for the secondary metabolite production, since most gene clusters are silent under laboratory conditions (Rashmi and Venkateswara Sarma 2018).

The main biochemical pathways that guide the biosynthesis of secondary metabolites by endophytic fungi involve polyketide synthases (PKSs), non-ribosomal peptide synthetases (NRPSs), hybrids (PKS-NRPS), terpene synthases (TPSs), terpene cyclases (TCs), and prenyltransferases (PTs) or combinations thereof (Rashmi and Venkateswara Sarma 2018). A relevant chemical group of secondary metabolites produced by endophytic fungi comprises non-ribosomal peptides synthesized by NRPSs enzymes (Yang et al. 2019) that possess modular structure and incorporate various building blocks into the growing peptide chain without the ribosome’s need. Non ribosomal peptide synthesis is an alternative pathway that allows production of polypeptides other than through the traditional translation mechanism. Despite the chemical diversity produced by NRPSs, the standard NRPS structure is composed of three canonical domains: adenylation (A), thiolation (T) or peptidyl carrier protein (PCP), and condensation (C) domains, which constitute a module within NRPS (Creamer et al. 2021). Each module is responsible for the recognition (A domain) and incorporation of a single amino acid into the growing peptide product. Generally, NRPSs possess more than one module, which terminates in a condensation-like (CT) domain that releases the peptide. Occasionally, epimerase (E) and N-methyltransferase (M) domains that convert L- to D-amino acids and N-methylate peptide bonds, respectively, are found within NRPSs. Deviations of the classical NRPS composition are present in hybrid PKS/NRPS (Creamer et al. 2021) and stand-alone monomodular NRPS-like enzymes, since not all canonical domains are presente. In addition, terpenes are an abundant and chemically diverse group of natural products synthesized by endophytic fungi and others, which is biosynthesized from isoprene units derived through the mevalonate and/or methylerythritol pathways that ranges from simple linear hydrocarbon chains to highly complex ring structures (Nazari et al. 2023).

Due to the diversity and complexity of biosynthetic pathways responsible for the production of secondary metabolites from endophytic fungi, Table 1 summarizes some chemically characterized secondary metabolites and putative associated biosynthetic genes/key enzymes determined by sequencing, including genes expressed/underexpressed in specific or mutational conditions.

Table 1 Secondary metabolites from endophytic fungi and associated biosynthetic genes/key enzymes

Endophytic fungi as “hotspots” for discovering bioactive compounds

The discovery of the endophytic fungus Taxomyces andreanae as a taxol producer and related compounds, an anticancer used in the treatment of several types of tumors, placed EFs in the spotlight of search for bioactive metabolites similar to those found in plants (Strobel et al. 1996; Manganyi and Ateba 2020; Zhang et al. 2022; Hashem et al. 2023). It is currently well-known that EFs are a prophylactic source of metabolites from numerous chemical classes and with the most varied applications (Table 2), which characteristics make them “hotspots” of chemical diversity with different biological activities (Fig. 1). In ecology, the term ‘hotspots’ can be defined as geographic areas rich in biodiversity and threatened by habitat loss (Thompson et al. 2021). Here, “biodiversity hotspots” was adapted to “chemical diversity hotspots” in reference to EFs, since these microorganisms represent an important genetic, biological, and biotechnological resource for the discovery of novel biologically active compounds, with unprecedented chemical diversity, to be used in a wide variety of applications from medicine to agriculture, and beyond.

Table 2 Metabolites produced by endophytic fungi from different host plant species
Fig. 1
figure 1

Source: J.B.A.R. (author)

Guttation produced by endophytic fungi. Guttation is a phenomenon that involves the exudation of water and metabolites produced by fungal cells. These exudates are rich sources of mycotoxins, antimicrobials, insecticides, bioherbicides, antiviral, and anticancer agents. In a, b, the release of red/orange exudates from two strains of Epicoccum sp. cultured on potato peptone dextrose agar at 28 °C are shown; In c, brown exudates produced by colonies of Diaporthe sp. grown on potato dextrose agar (PDA) at 30 °C. In d, citrine yellow exudates produced by Penicillium sp. In e, it is shown the diffusion in the culture medium (PDA) of reddish-colored compounds produced by Chaetomium sp. In f, green colored exudate produced by Trichoderma sp. is highlighted. In g, h, and k–o, exudates from different endophytic Fusarium species grown in PDA at 25 °C are shown. In i, j, exudates produced by Diaporthe spp. In p, translucent exudates produced by colonies of Penicillium sp.

Different approaches have been employed to study the diversity of compounds from EFs (Mohamed et al. 2021, 2022; Hassane et al. 2022). Most protocols involve axenic cultivation, followed by obtaining a crude extract, screening based on bioassays (e.g., antimicrobial, antioxidant, antiparasitic activities, among others), isolation and purification steps of the target molecules (Orfali et al. 2017; Farooq et al. 2020; Liu et al. 2021; He et al. 2021). However, fungal extracts are complex and often contain tens to thousands of metabolites (Nischitha and Shivanna 2021a), which complicates the purification process. Studying metabolites produced by EFs in a specific condition simultaneously using classical approaches is quite laborious due to the complexity of the extracts, methodological limitations, laboriousness, and the time required to obtain pure compounds.

Metabolomic based methodologies is an alternative to classical methods and has become a powerfull tool to annotate EFs metabolites (González-Menéndez et al. 2016; Qadri et al. 2017; Toghueo et al. 2020). This new “omics” has been used to study the chemical diversity produced by fungi from the most varied ecosystems and lifestyles, enabling the discovery of new molecules, effects of epigenetic regulation on the metabolome, knowledge of the chemical diversity produced by these microorganisms etc. (Asai et al. 2012a, b, c; Zutz et al. 2013; Qadri et al. 2017; Triastuti et al. 2019; de Amorim et al. 2020; Ameen et al. 2020; Makhwitine et al. 2023). In this sense, we will address strategies in metabolomics research on EFs below: experimental designs, cultivation regimes, extraction methods, analytical methodologies and, data analysis.

Metabolomics applied to studies of endophytic fungi

Metabolomics comprises the study of all metabolites (< 1500 Da) in biological systems (e.g., cell, tissue, organ, organisms) in a specific physiological state (Bundy et al. 2008; Johnson et al. 2016; Marchev et al. 2021). This approach requires modern instrumental analytical methods of high throughput, sensitivity, and resolution, such as mass spectrometry (MS), combined with chemometric methods to measure and compare the metabolites (Johnson et al. 2016; Rampler et al. 2021; Martin et al. 2019). Metabolomics makes it possible to quickly measure thousands of metabolites simultaneously from minimal quantities of samples (Johnson et al. 2016; Rampler et al. 2021; Martin et al. 2019), and, traditionally, can be divided into metabolomics targeted and untargeted metabolomics (Fig. 2) (Roberts et al. 2012). In general, targeted metabolomics aims to qualitatively and quantitatively measure a predefined set of metabolites (Roberts et al. 2012). Recently, targeted metabolomics has been subdivided into widely targeted metabolomics, pseudo-targeted metabolomics, and quasi-targeted metabolomics (Lee et al. 2019; Sun et al. 2021; Wang et al. 2023). Untargeted metabolomics, on the other hand, analyzes all measurable metabolites in a given sample (Lippa et al. 2022).

Fig. 2
figure 2

Workflow for targeted and untargeted metabolomics studies. Figure created in BioRender software

Metabolomics has played crucial roles in elucidating physiological processes in numerous areas of research and development to discover disease state markers, stress response, identification of metabolic profiles, among others (Zutz et al. 2013; Triastuti et al. 2019; Aldholmi et al. 2020; Wei et al. 2020; Ameen et al. 2020; Zhu et al. 2021; Letertre et al. 2021; Katam et al. 2022). In recent decades, this approach has also been successfully employed to explore the chemical diversity of metabolites produced by fungi, including EFs (Table 3).

Table 3 Application of metabolomics in fungal research

Design of experiments to study the chemical diversity of metabolites produced by endophytic fungi

According to the hypotheses and objectives of the research, different workflows are employed to evaluate the chemical diversity and consequently the bioactive compounds produced by endophytic fungi (Fig. 3). As hypotheses and/or objectives precede and guide the choice of the scientific experimentation methods, these workflows are generally complex. In metabolomic studies to explore the chemical diversity or to search for bioactive metabolites produced by EFs, the experimental design requires contextualization of the objectives at all stages, as each stage directly interferes with the results obtained and their interpretations. If the objective of the study aims to compare how the metabolic profile of EFs changes depending on different concentrations of heavy metals, the experimental design may contextualize its objective at each stage as follows: (1) the sample size should be sufficient to reveal differences if they occur; (2) all treatments should preferably possess the same sample number; (3) cultures should be maintained consistently under the same conditions; (4) the extraction methods and solvents used should be capable of extracting the greatest possible amount of metabolites; (5) the chosen analytical method should be capable of highlighting differences if they occur. If any of these steps are not carefully taken into consideration, the objective is not achieved, and biased results are generally generated. If temperature varies between different metal concentrations, for instance, differences in the metabolite profile may arise not only from the effect of metal concentration, but also from temperature variation.

Fig. 3
figure 3

A workflow for studying the chemical diversity and bioactive molecules produced by endophytic fungi. Figure created in BioRender software

The experimental design is, therefore, a critical step to be well structured according to the study’s objectives. Considering the study’s objectives or hypothesis to explore the chemical diversity produced by EFs using metabolomics, four main steps may be still summarized: (1) culture conditions, (2) sample preparation, (3) data collection and processing, 4) and data analysis. Since each of these steps is crucial to the final explanation, different strategies and tools that may be adopted to increase the sample number of metabolites from optimizing cultivation conditions, sample extraction, and data acquisition to choosing analytical methods and bioinformatics platforms, are discussed next.

Enhancement of metabolites production from endophytic fungi

Endophytic fungi are known to synthesize a wide variety of compounds. However, there is an inconsistency between the actual number of biosynthetic gene clusters (BGCs) present in the genome of these microorganisms and the number of compounds detected in any fungal strain under laboratory cultivation conditions (Fisch et al. 2009; Qadri et al. 2017; Ul-Hassan et al. 2012; González-Menéndez et al. 2016; Pillay et al. 2022; Xue et al. 2023). This divergence between the actual number of BGCs and the number of chemical molecules produced by any given fungal strain is attributed to the fact that the majority of BGCs remain silenced, low in expression, or not expressed at all under laboratory conditions (González-Menéndez et al. 2016; Pillay et al. 2022; Xue et al. 2023). Furthermore, the activation of these BGCs is likely to discover a greater number of compounds, including the discovery of new metabolites (Ding et al. 2020). As a result of this fact, there is a need to use different techniques that can induce the activation of these biosynthetic pathways, such as co-culture, One Strain-Many Compounds (OSMAC), epigenetic and molecular modification methods, thus increasing the biosynthetic capacity of these microorganisms (Fig. 4) (Bode et al. 2002; Cichewicz 2009; González-Menéndez et al. 2016; Pillay et al. 2022; Xue et al. 2023).

Fig. 4
figure 4

Main strategies used to increase the biosynthetic potential of endophytic fungi. Figure created in BioRender software and Canva.com

In natural ecossystems, the different species that make up microbial communities establish a series of ecological relationships (e.g., mutualism, commensalism, antagonism, and parasitism) with other microbial species or organisms (e.g., plants, animals, among others) that are mediated mainly by the production of compounds and small molecules (Toghueo et al. 2020; Koza et al. 2022) similarly to metabolite production expected by co-cultivation (Fig. 5). Thus, numerous BGCs are dependent on microbe-microbe or microbe-host interactions to be activated (Toghueo et al. 2020; Koza et al. 2022). The co-cultivation method (Fig. 5) aims to simulate interactions that occur in the environment naturally between microorganisms from the same or different ecological niches (Kim et al. 2021; Boruta et al. 2023), since it consists in growing one or more microbial species together. In addition to simulating ecological stress, including nutrient depletion during competition between species, the co-cultivation method allows the monitoring of metabolites produced over time through visual morphological changes in the species growth (Kim et al. 2021; Boruta et al. 2023) (Fig. 5). In most cases, this approach leads to changes in the biosynthetic profile of the strains analysed, resulting in production of unusual compounds not found in monocultures (Kim et al. 2021; Boruta et al. 2023). Competition for iron, for instance, triggers antibiotic biosynthesis in Streptomyces coelicolor (bacteria) during co-cultivation with Myxococcus xanthus (bacteria) (Lee et al. 2020).

Fig. 5
figure 5

Source: J.B.A.R. (author)

Co-cultivation of different species of endophytic fungi on Potato Dextrose Agar (PDA). In a-c, the co-cultivation of six species of endophytic fungi isolated from Ouratea hexasperma is shown. The white arrows demonstrate the increased production of red pigment by a specific colony as a result of interaction with adjacent colonies. In d, both sides of a specific endophytic fungus colony are shown. In e, f, co-cultivation of this fungus (edge colony) with another endophytic fungus (middle colony) is shown. It is possible to observe that the fungus increases the production of yellow pigments (white arrows in e) and starts to produce a red pigment at the edge of the colony next (white arrows in f). In g, growth inhibition of an endophytic fungus due to the interaction with a saprophytic fungus is shown. In h, co-cultivation of Fusarium sp. (pink colony) and Diaporthe sp. (gray colony) is presented. It is possible to observe exudation of yellow metabolites by the Diaporthe where the colonies meet. In i, co-cultivation of Penicillium sp. and Eremothecium coryli showing the exudation of yellow compounds into the culture medium is indicated by the white arrow

Co-cultivation does not require knowledge in genetics or molecular biology, nor laborious methods, which makes it an advantageous method because of the simplicity and practicality. Different strategies for co-cultivation that includes co-cultivation in solid or liquid media (mixed fermentation), and the choice of the co-cultivated microorganisms (e.g., fungus-fungus, fungus-bacteria, and bacteria-bacteria) that may or not belong to the same ecological niche, are widely explored.

Similar to co-culture, the OSMAC approach is a relatively simple and effective technique used to explore the biosynthetic potential of microorganisms from the most diverse habitats (Gao et al. 2020; Schwarz et al. 2021; Pinedo-Rivilla et al. 2022; Hebra et al. 2022), including endophytic fungi (Gao et al. 2020; Wei et al. 2021; da Silva et al. 2023). As the OSMAC’s main idea, each microbial strain has the potential to produce many compounds, but subsets of these compounds are produced only under specific conditions (Bode et al. 2002). Thus, OSMAC involves combination and alteration of one or more cultivation parameters (e.g., carbon, nitrogen, and micronutrient sources; pH; temperature; light regime; addition of enzyme inhibitors; incubation time; O2 and CO2 tension; addition of solvents, heavy metals, precursors and other small molecule elicitors). Changes in cultivation conditions cause activation of silent BGCs or overexpression of BGCs that were underexpressed, resulting in production of a greater diversity of compounds (Bode et al. 2002). The efficiency of this approach was demonstrated by the increased production of griseofulvin derivatives produced by endophytic fungi from the host plant Moquiniastrum polymorphism when cultivated in culture media of malt peptone extract and Wickerham broth (Farinella et al. 2021). A species of endophytic Penicillium was capable of producing different types of compounds under combination of different cultivation media, many of which were specific to each combination evaluated (da Silva et al. 2023). Co-cultivation combined with OSMAC increased the biosynthetic production of compounds by microbial strains under environmental conditions capable of influencing the microbial interactions prior established, activating biosynthetic pathways that were initially silenced (Zutz et al. 2013).

Among the inducing strategies, epigenetic chemical regulation is considered a powerful approach to generate a greater number of compounds biosynthesized by fungi (González-Menéndez et al. 2016; Qadri et al. 2017; Toghueo et al. 2020). Epigenetic regulation involves alteration of the level of chromatin condensation to express silenced genes, which does not require prior knowledge in genomic content, resulting in the biosynthesis of previously unexpressed compounds. Generally, small molecules act as inhibitors of methyltransferase, histone deacetylase, and histone acetyltransferase, generating alterations in the structure of DNA, histones, and proteasomes, which activates cryptic BGCs (Table 4) (González-Menéndez et al. 2016; Qadri et al. 2017; Toghueo et al. 2020). Fermentation by Aspergillus calidoustus and Aspergillus westerdijkiae with vorinostat, an inhibitor of histone deacetylases (HDACs), for instance, induced changes in the metabolic profile of both species, with induction and repression of the biosynthesis of specific metabolites (Aldholmi et al. 2020). Moreover, addition of hydroxamic suberoylanilide (SAHA) and sodium valproate (VS), histone deacetylase (HDACs) inhibitors, caused different responses in the biosynthetic profile of the endophyte Botryosphaeria mamane (Triastuti et al. 2019). SAHA induced the production of eight metabolites, while VS induced the biosynthesis of two metabolites. In addition to the simplicity of the method, epigenetic regulation mediated by regulatory molecules can be used in conjunction with other strategies to stimulate the synthesis of metabolites, including coculture, OSMAC, and transformation methods (Zutz et al. 2013; Triastuti et al. 2019; Aldholmi et al. 2020; Ameen et al. 2020). However, alteration in the metabolic profile vary depending on the fungal species, type of regulatory molecule, and concentration (Zutz et al. 2013; Triastuti et al. 2019; Aldholmi et al. 2020; Ameen et al. 2020).

Table 4 Epigenetic modifiers used to induce the biosynthesis of metabolites in fungal species

In addition, molecular approaches that include gene deletion or induction of mutants are valuable strategies to stimulate the production of compounds and activate BGCs of interest in fungi (Guzman-Chavez et al. 2018; Ding et al. 2020; Jo et al. 2023). Deletion of the hdaA gene in Penicillium chrysogenum strain Fes1701 induced a significant change in its metabolic profile, resulting in the bioactive indole alkaloid meleagrin synthesis (Ding et al. 2020). In other strain of P. chrysogenum, deletion of the hdaA gene caused a decrease in pigment production and overexpression of the sorbicillinoid biosynthetic gene cluster, producing overproduction of associated compounds (Guzman-Chavez et al. 2018). The plasma-induced mutant of Aspergillus unguis was able to synthesize four compounds not observed previously in the wild-type strain, one of them characterized as a novel aspergillusidone G (Yang et al. 2018). Thus, different molecular approaches have been efficiently employed to stimulate the biosynthesis and search for novel compounds. However, genomic knowledge, laborious methodologies and expensive equipments are essential.

Sample preparation and obtaining crude extracts

In metabolomics studies to investigate fungal metabolites, the sample preparation method is considered one of the most important steps due to its intrinsic sensitivity, since even small changes in procedures may deeply influence on the recovery of types and levels of metabolites, and in the biological interpretation of data consequently (Mohd et al. 2022). The choice of sample preparation and extraction method is crucial to define the number, type, and abundance of metabolites detected (Fig. 6). Therefore, an efficient, robust, simple, and reproducible method to demonstrate real occurrences and/or changes in the cellular metabolism is desirable. Generally, the workflow for sample preparation involves: (1) metabolic arrest by quenching; (2) sample collection, and separation of intra- and extracellular metabolites, and (3) extraction of metabolites.

Fig. 6
figure 6

Variation in the metabolomic profile according to different extraction methods employed. Each extraction method reflects the metabolic profile accessed effectively. The combination of different extraction strategies, solvents, temperature, sonication conditions, and extraction time result in different metabolic profiles. Figure created in BioRender software and Canva.com

Quenching is a rapid and sudden disruption of various metabolic pathways within cells on a timescale, maintaining stable metabolic contents, and reducing the degradation rates of investigated metabolites (Mohd et al. 2022). Briefly, quenching basically consists of cooling the samples in order to reduce or interrupt cellular metabolism. In microbial metabolomics research, the main quenching method uses ice-cold methanol (Mohd et al. 2022) by adding this solvent (60%–80%) (−80 to −20 °C) to the medium in which cells are grown to rapid stop the metabolic processes (Mohd et al. 2022). However, this approach is mainly used in bacterial metabolomic studies (Mohd et al. 2022), and hardly employed in metabolomic studies of filamentous fungi (Li et al. 2022). After disruption of metabolic processes, the next step comprises cell separation from the culture medium followed by metabolite extraction. To separate cells from the culture medium, centrifugation or gauze filtration methods are mainly used (Phan and Blank 2020; Mohd et al. 2022; Nzimande et al. 2022; Makhwitine et al. 2023).

The physical properties and chemical structure of the metabolites investigated should not be altered by extraction methods, which also should maximize the recovery of the maximum amount of metabolites. These methods are grouped into physical and chemical methods (Mohd et al. 2022; Li et al. 2022; Gopčević et al. 2022). Physical methods include the use of an ultrasonic bath, maceration with glass beads, freezing and thawing cycles, among others. (Mohd et al. 2022). Chemical methods mainly use polar and non-polar organic solvents, non-aqueous inorganic solvents, and combinations of both ones (Asai et al. 2012b, c; Qadri et al. 2017; Triastuti et al. 2019; Pacheco-Tapia et al. 2022). To increase extraction efficiency, physical and chemical methods can be combined (Mohd et al. 2022; Li et al. 2022; Gopčević et al. 2022; Makhwitine et al. 2023). In Table 5 are summarized some extraction methods commonly used in fungal metabolomics studies.

Table 5 Methods used in fungal metabolomics studies

The choice of the extraction method depends on the study’s objective, which may include a combination of different strategies for extracting metabolites efficiently. In general, the main extraction method used for metabolomics studies in fungi comprises the liquid–liquid extraction employing ethyl acetate (EtOAc) (Asai et al. 2012b, c; Qadri et al. 2017; Triastuti et al. 2019; Pacheco-Tapia et al. 2022). However, other solvents and combinations of solvents are used according to the objectives established (Phan and Blank 2020; Makhwitine et al. 2023) as shown in Fig. 7. EtOAc, for instance, was used to extract the extracellular metabolites from a fermented broth by the endophytic fungus A. unguis, while methanol was used to extract intracellular metabolites (Yang et al. 2018). Other approaches include combining solvents with physical extraction methods. Using ethanol (EtOH:H2O; 7:2), methanol (MeOH:H2O; 7:2), and a chloroform/MeOH/water mixture (2:5:2) at different temperatures and sonication conditions, Phan and Blank (2020) quantified intracellular metabolites from Ustilago maydis. To study the metabolome of the endophyte P. chrysogenum, the extraction method selected consisted of adding methanol to the fermented broth, followed by incubation overnight on a rotary shaker at 150 rpm (Makhwitine et al. 2023). Currently, there is no standard extraction method to be recommended, since they vary greatly and depend on the sample nature and research objectives. However, the selected extraction method should prioritize the main compounds to meet the study’s objectives effectively.

Fig. 7
figure 7

Main solvents used for metabolite extraction from fungal cultures. Figure created in BioRender software

Instrumental analysis methods used for metabolomic studies of endophytic fungi

The main analytical methods used in metabolomics studies of fungi extracts are gas chromatography/mass spectrometry (GC–MS), liquid chromatography/mass spectrometry (LC–MS), nuclear magnetic resonance spectroscopy (NMR), and nuclear magnetic resonance spectroscopy/mass spectrometry (NMR–MS) (David 2008; Zutz et al. 2013; Asai et al. 2012c; Qadri et al. 2017). Table 6 summarizes some of the advantages and limitations of these analytical platforms. However, capillary electrophoresis/mass spectrometry (CE–MS) (Ibrahim et al. 2016a) and matrix-assisted laser desorption ionization mass spectrometry (MALDI–MS) (Chen et al. 2021) have also been employed.

Table 6 Advantages and disadvantages of the main analytical platforms commonly used in metabolomics studies

GC–MS is used to analyze volatile metabolites or metabolites that are easily volatilized after derivatization reaction (Qadri et al. 2017; Nzimande et al. 2022; Makhwitine et al. 2023). This approach possesses good repeatability and reproducibility and, is used in metabolomic analysis of various components that includes alcohols, aldehydes, amino acids, fatty acids, among others (Fiehn 2016; Qadri et al. 2017; Nzimande et al. 2022; Makhwitine et al. 2023). GS–MS was successfully employed to analyze fractions of crude extracts obtained from the fermented broth by the endophyte Alternaria alternata, and revealed the presence of 48 compounds (Nzimande et al. 2022). The main compounds were cyclotrisiloxane octamethyl, propaninitrile, pyrrolol[1,2-a]pyrazine-1,4-dione, hexahydro-3-(2-methyl propyl), diethylethoxy(2-ethoxyethyloxy), coumarin, 3,4-dihydro-4,5,7-trimethyl-4,5,7-trimethyl-2-chromanone, and 1,2-cyclobutanedicarbonitrile (Nzimande et al. 2022). Also, GC–MS was used to study volatile organic compounds (VOCs) produced by Muscodor yucatanensis, and demonstrated the presence of more than 40 compounds, including trans-3-dodecene, tau-gurjunene, benzene propanoic acid, 3,5-bis(1,1-dimet), 1-chloroheptacosane, and 2-hexyl-1-octanol as the main ones (Qadri et al. 2017). Moreover, GC–MS analysis demonstrated the presence of more than 110 compounds synthesized by the endophyte Penicillium chrysogenum, with some of the identified compounds known to exhibit antiviral activity (Makhwitine et al. 2023). However, GC–MS analysis has some disadvantages, since non-volatile compounds require derivatization (Bollenbach and Tsikas 2022).

LC–MS possesses numerous advantages, including simple sample preparation, high sensitivity, and high qualitative and quantitative capabilities (Gathungu et al. 2020). Thousands of peaks are detected by LC–MS in metabolomics studies (Nischitha and Shivanna 2021a). Each of the peaks can correspond to a detected ion with a mass-to-charge ratio (m/z) and a certain retention time that characterizes the metabolite. Moreover, with the development of high-performance liquid chromatography (HPLC) and ultra-performance liquid chromatography (UHPLC), peak resolution has been widely improved (Behnoush et al. 2015). Due to the high-resolution generated to detect most metabolites, LC–MS is the main technique to study the metabolic profile of fungi (Zutz et al. 2013; Mafezoli et al. 2018; Pacheco-Tapia et al. 2022). Four crude extracts of EFs from the host plant Alisma orientale analyzed by LC–MS revealed the presence of more than 50 compounds per extract, with a predominance of metabolites belonging to different chemical classes (flavonoids, non-flavonoids, phenolic acids, and flavonolignans). LC–MS analysis performed on the EFs Curvularia protuberata and Penicillium citrinum demonstrated the presence of 2352 and 2500 compounds, respectively, which were separated by positive and negative ion modes (Nischitha and Shivanna 2021a). Furthermore, LC–MS enabled the identification of some compounds known to exhibit antimicrobial activities. It is worth noting that despite the high resolution and sensitivity of this technique, overlapping peaks may occur, making decovolution necessary during the data processing stages.

NMR and NMR-MS are generally the analytical methods of choice when structural characterization of unknown compounds is required (Bingol and Brüschweiler 2016; Markley et al. 2017; Grienke et al. 2019; Gathungu et al. 2020). This analytical method is based on the interaction of a magnetically active nuclei with an applied external magnetic field, and is highly advantageous because of the high reproducibility, accurate quantification, simple preparation, measurable analytes in various solvents, clear identification of unknown metabolites, and complete detection of metabolites (Bingol and Brüschweiler 2016; Markley et al. 2017; Gathungu et al. 2020). NMR, for instance, was used to elucidate the structure of bipolarisenol produced by the endophyte Bipolaris sorokiniana (Khan et al. 2015), and four new chromium derivatives produced by the endophyte Phomopsis sp. (Huang et al. 2016). However, NMR-based methods have low sensitivity, which limits their applications in metabolomics (Markley et al. 2017).

Finally, the advantages and disadvantages of the different analytical tools should be considered in metabolomics research. A single tool cannot characterize and quantify efficiently thousands of metabolites produced by the fungal metabolism, requiring in some cases the combination of different methods to achieve the research objectives. In addition, other factors must be considered, which include errors associated with the platform used, implementation of internal standards, blanks (culture medium and solvents), quality controls (QC), which in metabolomics experiments of crude fungal extracts can be a mixture of all samples to be tested, and random sample injections.

Processing and analysis of metabolomics data from endophytic fungi

Data obtained in metabolomics experiments contains a large amount of important biological information from biomolecules (González-Menéndez et al. 2016; Nischitha and Shivanna 2021a). Interpreting these data involves inferring the mass and abundance of the biomolecules injected into the device. However, raw data may not provide a clean and reliable metabolite spectra (Lommen 2009; Katajamaa et al. 2006; Smith et al. 2006). Therefore, the raw data should be preprocessed to reduce the noise and to promote the baseline correction, peak detection and deconvolution, and data normalization as summarized in Fig. 8. Table 7 provides some online and open-source software as well as workflows for data analysis in metabolomics studies.

Fig. 8
figure 8

Main data processing steps in fungal metabolomics studies. Figure created in BioRender software

Table 7 Software for data conversation, pre-processing, statistical analysis and database used in metabolic studies

Briefly, tandem MS datasets are captured into binary files or databases by the software that controls the instruments (Chambers et al. 2012). However, the file format provided by different analytical platforms differs depending on the supplier (Kessner et al. 2008; Holman et al. 2014; Chambers et al. 2012). Thus, access to primary data can critically affect subsequent steps and the comparability of analytical platforms because some tools and workflows are designed for specific types of file formats. Therefore, in metabolomics studies, one of the first steps is file format conversion. To this end, numerous tools have been developed (Sturm et al. 2008; Kessner et al. 2008; Chambers et al. 2012; Holman et al. 2014), with the MS Convert tool, available on the ProteoWizard platform (Kessner et al. 2008; Holman et al. 2014), as the most tool employed. MS Convert is a command-line tool used for mass spectrometry data format conversion (Holman et al. 2014) that accepts raw data from several commercial companies and developers, including AB SCIEX (file format: WIFF; T2D), Agilent (file format: MassHunter;.d directories), Bruker (file format: fid;.d directories; xmassa; xml), Thermo (file format: raw), Waters (file format: raw directories), HUPO PSI (file format: mzML), ISB Seattle Proteome Center (file format: mzXML), Matrix Science ( file format: mgf), Yates/MacCoss Laboratories (file format: ms2; cms2; bms2), and Steen & Steen Laboratory (file format: mz5). Output files include mzML, mzXML, mz5, mgf, text, ms1, cms1, ms2, and cms2 formats.

After the file format conversion, the next step is the data preprocessing. Among the software developed, the XCMS (Smith et al. 2006) and MZmine (Katajamaa et al. 2006) are considered powerful tools for pre-processing, including deconvolution of analytical signals, noise filtering, detection and alignment of chromatographic peaks, baseline correction and gap filling and quantification of data from experiments analyzed by LC–MS and GC–MS. However, the processing in this software appears to underestimate GC–MS data (Ma and Qi 2021), with the MSDIAL software as an interesting alternative to be considered (Tsugawa et al. 2015).

Next, statistical analysis is applied after data pre-processing. Single variable or multivariable analyses are commonly used to evaluate groups as classical methods, with multivariate analysis as the most used in metabolomic studies of fungi (van Tilburg Bernardes et al. 2020; Swift et al. 2021; Castaño et al. 2022; Kandasamy et al. 2023). These analyses are generally employed to evaluate changes in the metabolic profiles between groups, and are divided into supervised and unsupervised analyzes (van Tilburg Bernardes et al. 2020; Swift et al. 2021; Castaño et al. 2022; Kandasamy et al. 2023). The major unsupervised analysis comprise Principal Component Analysis (PCA) and Hierarchical Clustering Analysis (HCA), and the supervised ones include Partial Least Squares Discriminant Analysis (PLS-DA) and Orthogonal Partial Least Squares Discriminant Analysis that is based on orthogonal signal correction (OPLS-DA) (Xia et al. 2015). PCA, for example, can be used to discriminate the metabolic profile between samples under different treatments (Du et al. 2021). PLS-DA and OPLS-DA can be employed to distinguish samples under different treatments and show the potential metabolites that contribute to these differences (Du et al. 2021; Maserumule et al. 2023; Singh et al. 2023). The main platform used for this type of analysis in metabolomics studies is MetaboAnalyst (Xia et al. 2015). In addition to these analyses, other statistical analysis (one factor), biomarker analysis, enrichment analysis, pathway analysis, functional meta-analysis of MS peaks, MS peaks to pathways, and network analysis, are included in this platform. Moreover, other tools are summarized in Table 7 in addition to MetaboAnalyst, as previously shown.

The Molecular Networking (MN) is a useful data analysis workflow for untargeted MS/MS-based metabolomics studies, since it provides means of identifying known compounds/molecular families, putatively novel molecular families, and evaluate differences associated with changes in culture conditions, among others (Ernst et al. 2019; Fan et al. 2019; Xu et al. 2021; Beniddir et al. 2021). MN organizes the MS/MS spectra of metabolites present in an extract according to their fragment similarities, which can be visualized by suitable software such as Cytoscape (Fan et al. 2019). MN uses the GNPS platform (Wang et al. 2016) to integrate a publicly available spectral library and the experimental MS/MS spectra for comparisons. GNPS offers a user-friendly workflow and numerous tools for analyzing MS/MS data, including MolNetEnhancer and Spec2Vec (Ernst et al. 2019; Huber et al. 2021). MolNetEnhancer integrates GNPS molecular network results, molecular mining tools (MN and MS2LDA), in silico annotation (NAP and DEREPLICATOR), and automated chemical annotation (Ernst et al. 2019). Thus, this approach allows annotation of multiple compounds, providing a comprehensive view of chemodiversity within a metabolome (Liu et al. 2022). It is worth noting that the MN created in the GNPS workflow are based on cosine scoring. Cosine-based methods are very good at revealing almost identical spectra, but are not as suitable for dealing with molecules with multiple local chemical modifications (Huber et al. 2021). The Spec2Vec, integrated into the GNPS workflow, can be an alternative, as it considers fragmentary relationships within a spectral dataset to derive abstract spectral embeddings that can be used to assess spectral similarities (Huber et al. 2021). There is also the SIMILE tool, which produces structural connections inferred from spectral alignment in MN (Treen et al. 2022). This tool makes it possible to classify spectral alignments based on p-values in order to explore the structural relationships between compounds and improve the chemical connectivity obtained with MN (Treen et al. 2022).

Other tools can also be used to exploit the data obtained from metabolomic studies of endophytic fungi or molecules isolated from these microorganisms, such as in silico bioactivity prediction tools. This type of approach has been considered promising for rapid, low-cost screening to discover potentially bioactive molecules and their mechanisms of action (Keiser et al. 2007; Gfeller et al. 2014; Gu et al. 2023). Currently, there are numerous protocols used to predict bioactivity in silico, which can be classified as approaches based on molecular similarity (Nickel et al. 2014), network-based models (Wang and Zeng 2013), and advanced machine learning methods (Pahikkala et al. 2015). An example of such a tools is the Swiss Target Prediction web server, which makes it possible to combine 2D and 3D similarity measurements of molecules with known ligands and map predictions between and within organisms based on target homology (Gfeller et al. 2014). There are also other in silico prediction tools, such as ChemMapper (Gong et al. 2013), SuperPred (Nickel et al. 2014), PharmMapper (Wang et al. 2017), and DrugBank (Wishart et al. 2006). Each of these tools has advantages and disadvantages, and the choice of tool depends on the objectives of the study. Furthermore, in silico bioactivity prediction does not replace biological assays, but serves as a quick guide for the search for new compounds.

Eco-Metabolomics of interaction between endophytic fungi and host plant

Endophytic fungi are an important component of the plant microecosystem and perform key functions for physiological, biological, and adaptive processes of host plants (Baron and Rigobelo 2021). The mechanisms of interaction between endophytes and host plants are complex and generally involve production of compounds by both fungus and plant, which act as effectors of a multidimensional interaction (Alam et al. 2021). Therefore, the colonization of plant tissue by endophytic fungi does not occur merely through chemotaxis, but depends on a complex and specific relationship, which is the result of the coevolution of these two groups of organisms (Alam et al. 2021). Plants secrete chemical compounds that are recognized by endophytic fungi (Tripathi et al. 2022; Hashem et al. 2023). This most often results in the production of specialized enzymes and compounds by endophytic fungi that are recognized by the host plant and act to mediate the colonization process (Tripathi et al. 2022; Hashem et al. 2023). Once inside the plant tissue, endophytic fungi can act directly on the fitness and physiology of their host through the production of numerous secondary metabolites (Alam et al. 2021; Tripathi et al. 2022). The plant, in turn, offers the fungus a habitat with stable environmental conditions and nutrients (Alam et al. 2021). However, it is worth highlighting that most of the metabolic pathways and compounds that mediate and/or originate from this interaction are unknown mainly due to methodological limitations.

Recently, a new disciplinary area within metabolomics has emerged, eco-metabolomics. This area of knowledge is focused on the application of metabolomics techniques to ecology aiming at characterizing the biochemical interactions of organisms at different spatio-temporal scales (Nagler et al. 2018; Peters et al. 2018; Wong et al. 2020). Therefore, the application of metabolomics to study the different interactions between species provides not only a comprehensive view of metabolic pathways involved, but also helps explain the mechanisms underlying the interactions (Gupta et al. 2022).

Many studies on interaction between EFs and host plant to decipher and/or understand ecological relationships have been published using metabolomics (Szűcs et al. 2018; Plaszkó et al. 2022; Poveda et al. 2022; Ma et al. 2023). The use of untargeted metabolomics (LC–MS) combined with metagenomics correlated the structure of the root mycobiome of Armoracia rusticana with significant changes in its metabolome (Plaszkó et al. 2022). Also, the concentration of kaempferol flavonoid glycosides positively correlated with the abundance of specific fungal taxa, while indole and glutathione isothiocyanate phytoalexins were negatively correlated with other fungal taxa (Plaszkó et al. 2022). Ma et al. (2023) used metabolomics to understand the symbiotic relationship between soil–plant–fungi and secondary metabolites in Fagopyrum dibotrys, demonstrating positive and negative correlations between certain fungal taxonomic groups with specific classes of compounds. These findings reinforce the importance of metabolomics to study the interaction between endophytes and host plants, aiming at elucidating and understanding the processes of endophytic community assembly, the environmental filter effect exerted by the host plant, and the effects of the EFs community on plant physiology, among other ecological aspects.

Final considerations

The exploration of metabolite production by EFs holds tremendous potential for a wide range of applications from medicine to agriculture, and beyond. Currently, EFs, with their vast genetic diversity and ability to produce an array of bioactive compounds, are an invaluable resource for addressing some of the most pressing challenges worldwide. The potential benefits from these multifaceted microorganims comprise life-saving antibiotics and antifungal agents, and new solutions to combat drug-resistant pathogens, with sustainable alternatives to traditional chemical pesticides and fertilizers in agriculture, enabling environmentally friendly and resilient practices. Furthermore, the commercial applications of fungal metabolites extend to various biotechnological innovations, offering solutions for a cleaner environment and reduced carbon footprint. As promising research continues to advance, the metabolite production potential by EFs tends to increase consistently. However, it is essential to focus on some associated challenges that includes optimization of the production methods in adittion to ensure sustainable sourcing. Finally, the EFs metabolite-producing capabilitiy represent a new era of scientific discovery and innovation to minimize environmental damages coupled with new drugs for a wide variety of human and animals needs.