Introduction

As a consequence of rapid development in the foodservice industry and the continued rise in standards of living, vast amounts of food waste have been generated. For example, in China, food waste comprises about 56% of municipal solid waste, making it the majority contributor [1]. Traditional disposal of food waste is either in landfills or via incineration; however, these disposal options have many drawbacks such as secondary pollution from leaching, gas leakage, dioxins, and heavy metals [2]. The physical and chemical characteristics of food waste (e.g., high moisture content, high organic to ash ratio, easily decayed) make it a potential high-quality candidate for biological treatment [2]. Therefore, a reasonable, efficient, and eco-friendly disposal method for food waste is becoming a major worldwide concern.

Composting, an environmentally-friendly technology, is considered to be an effective organic waste management strategy for food waste where a biochemical process converts organic matter (OM) into relatively stable humus-like substances which can then be used as a soil additive or organic fertilizer [3, 4]. Moreover, composting is an ideal method for food waste treatment because of its simple process and easy operation [5]. However, food waste composting also has some disadvantages. One of them is the loss of nitrogen, mainly in the form of ammonia (NH3). Komilis and Ham [6] reported that about 65% of the initial nitrogen can be volatized as NH3 during food waste composting. NH3 emissions not only reduce the fertilization value of compost, but also cause environment problems such as odor, acidification, and eutrophication of ecosystems [7]. Nonetheless, many studies have shown that the reduction of NH3 loss is possible during composting, particularly with additives [8,9,10,11]. For example, Wang et al. [8] reported that NH3 emissions was reduced by 23.3–40.% via struvite formation, Al-Jabi et al. [9] reported that zeolite could reduce nitrogen losses by 40% of the initial total nitrogen (TN) and Chan et al. [10] reported that zeolite could reduce NH3 emissions by 18% during food waste composting.

Peat is a heterogeneous mixture of decomposed plant materials, microbial remains, and their secondary metabolites that have accumulated in a water-saturated environment due to be inhibited decay under acidic and anaerobic conditions [12]. Peat has a very high affinity for NH3 and can absorb 2.5% of its dry weight in NH3 [13, 14]. For example, Witter and Kirchmann [14] reported that peat, as an adsorbent, reduced overall NH3 losses by 59% when placed in the spent air-stream during the first 8 days of manure decomposition. Additionally, peat has a high air space volume and can retain large amounts of water, which could provide a suitable habitat for microorganisms during composting [12]. Finally, peat is convenient to use and has been widely used in horticulture and agriculture [15, 16]. But peat is a finite resource, and as demand has increased in recent years, price has also risen. Farrell and Jones [17] reported that food could partially replace peat and up to 75% substitution of peat by catering waste-derived composts would be unaffected for the sunflower growth. For these reasons, adding peat into food waste composting for nitrogen conservation should be very effective as well as might produce high-quality compost which have potential to replace peat. However, to our knowledge, there is no study that assessed the impact of peat additions on food waste composting process.

Microbial population, mainly bacteria and fungi, is of great importance for the successful biodegradation of organic waste during composting. Numerous studies have investigated bacteria community dynamics due to their large surface area, fast population growth rate, strong metabolism function, and resistance to high temperature that those experienced during the composting process [18,19,20]. The relationship between bacterial communities and environmental factors has been studied during composting process. For example, Wang et al. [19] reported that bacterial community were influenced by oxidation reduction potential (ORP), moisture and temperature in cow manure composing and Wang et al. [21] reported that the most critical driving factor for bacterial succession was pH in food waste composting. Meantime, fungi also play a significant role in OM decomposition and carbon cycling, especially cellulolytic and lignolytic degradation [22, 23]. However, fungal community succession dynamics and the relationship between fungal community structure and physicochemical parameters during food waste composting remains unclear.

Therefore, in this study, we aimed to: (1) investigate the potential effects of peat addition on nitrogen conservation and maturity of compost; (2) reveal fungal community composition dynamics during the composting process; and (3) assess associations between fungal community and physicochemical parameters in food waste composting.

Materials and methods

Composting materials

A synthetic food waste for the experiment was prepared by mixing potatoes, carrots, ground pork, steamed rice and cooked soybean as in Yu and Huang [24]. Sawdust was used to regulate the C/N ratio to 25, and the initial moisture content of compost substrate was adjusted to ~ 65% using deionized water. All raw materials above were purchased from a local grocery store. Food items were chopped into pieces of approximately 5 mm in diameter using a food processor to obtain uniform particle size and then mixed well before proceeding into the compost reactions. The peat used in this study was Canada Growing mix (https://m.tb.cn/h.VXPMPlz). A control (P0—without peat) and four peat addition treatments (P5, P10, P15, P20—with 5, 10, 15, 20% peat addition, respectively) were used to evaluate the effects of peat on food waste composting. Each treatment had three replicates. The detailed composition of composting raw materials is shown in Table 1. Peat addition percentages was determined by initial dry mass of food waste. Selected physical and chemical properties of the synthetic food waste, sawdust, and peat were measured (Table 2).

Table 1 Composition of raw composting materials (kg, fresh weight)
Table 2 Properties of the synthetic food waste, sawdust, and peat used in the study: values are the mean of triplicates (dry weight), values in parentheses are standard deviation (n = 3)

In-vessel composting system and analytical methods

The in-vessel composting system used was a cylindrical composting reactor. The schematic diagram of the in-vessel composting system is illustrated in Fig. 1. The reactor was made of a high density polyethylene column (5 mm thickness) with a working volume of 30 L (280 mm diameter and 500 mm height). To prevent conductive and reflective heat loss, a layer of 30 mm rubber aluminum foil heat-insulating material was wrapped around the reactor. Small holes were drilled at the bottom of the containers to allow for water leaching. Aeration was provided from the reactor bottom at a flow rate of 100 L/h during the entire composting process via aerator pump. The experiment was operated for 42 days.

Fig. 1
figure 1

Schematic diagram of the composting system used in the experiment

Temperature variation was monitored and recorded every 15 min via thermometer (SIN-RC-4, China) placed in the center of the reactor throughout the composting process. Ambient temperature was monitored and logged every 15 min. To evaluate NH3 emissions, NH3 was trapped in boric acid (2%) and then titrated against H2SO4 (0.01 mol/L). The composting materials in each reactor was removed, weighted and thoroughly mixed manually in a large vessel on days 0, 3, 7, 14, 21, 28, 35, and 42 before sampling. Subsequently, ~ 150 g of well-mixed compost from each reactor was collected and divided into two parts. One half of the sample was stored at 4 °C for physicochemical parameter analyses and the other at −20 °C for DNA extraction.

Moisture content (MC) was determined via drying at 105 °C until samples reached a constant mass. Dried samples were ignited at 550 °C in a muffle furnace for 6 h to determine OM content. The pH, electrical conductivity (EC), and seed germination index (GI) were analyzed by using a 1:10 (w/v) aqueous extract of the fresh compost samples with deionized water. The pH and EC were measured using a pH-meter and a conductimeter, respectively. The germination test was measured using cabbage seeds according to Yang et al. [25] and calculated using the following formula (1):

$$GI(\% ) = \frac{{\left[ {Seed\,germination\,of\,treatment \times Root\,length\,of\,treatment} \right]}}{{\left[ {Seed\,germination\,of\,control \times Root\,length\,of\,control} \right]}} \times 100$$
(1)

Ammonium (\({\text{NH}}_{4}^{ + }\)) was extracted with 2 mol/L KCl (1:20, w/v), then \({\text{NH}}_{4}^{ + }\) was determined using the indophenol blue method followed by colorimetry [26]. Total carbon (TC) and TN were determined using an elemental analyzer (CHN-O-Rapid, Germany). Loss of nitrogen was calculated according to the formula as below (2) [27]:

$$N\,loss\,(\% ) = 100 - 100\frac{{X_{0} N_{t} }}{{X_{t} N_{0} }}$$
(2)

where X0 and Xt are the ash content at time = 0 and time = t, N0 and Nt are the nitrogen content at time = 0 and time = t.

DNA extraction, metagenomics sequencing and analysis

DNA extraction from fresh compost samples for metagenomic sequencing was conducted with the QIAamp Fast DNA Stool Mini Kit (Qiagen, Germany), following the manufacturer’s instructions. The fungal community of the samples was characterized by amplicon sequencing of the fungal internal transcribed spacer using fungal primers ITS1F (5′-GATTGAATGGCTTAGTGAGG-3′) and ITS2R (5′-CTGCGTTCTTCATCGAT-3′). Compost samples were sequenced using the Illumina HiSeq 2000 platform (Illumina, Inc., USA) at Shanghai Genergy Biotechnology Co., Ltd. DNA libraries were prepared following manufacturer’s instructions. Cluster generation, template hybridization, isothermal amplification, linearization, blocking, and denaturing and hybridization of the sequencing primers were performed according to the workflow indicated by the provider. Flexbar was used to trim adapters [28], and a rarefied operational taxonomic unit (OTU) table was generated using QIIME [29]. Consensus sequences were constructed for each taxonomic cluster, and OTUs were constructed by clustering these consensus sequences at 97% identity. ITS gene sequences were assigned using the UNITE Database [30]. All of this was finished by Shanghai Genergy Biotechnology Co., Ltd, Shanghai, China.

Statistical analysis

Means and standard deviations of triplicate measurements were calculated, and data were analyzed with one-way ANOVAs with p < 0.05 considered significant. The least significance difference test at 5% probability was used to determine the significance of the difference in the mean values. The physicochemical data were analyzed using IBM SPSS Statistics 19.0 for Windows (SPSS Inc., Chicago, IL, USA), and the fungal community analysis were performed in R version 3.6.0 (R Foundation for Statistical Computing, Vienna, Austria).

Results and discussion

Changes in temperature, pH and electrical conductivity

Temperature, one of the most important factors of composting, influences the succession and evolution of microbiological communities throughout food waste composting [31, 32]. Temperature profiles (Fig. 2a) in all treatments showed a similar dynamic pattern with time which was in line with those of most aerobic composting studies and underwent three typical phases: mesophilic, thermophilic, and cooling [33]. After composting started, temperature increased sharply and all treatments reached the thermophilic phase (> 50 °C) on the second day of incubation and lasted for 8 days, except for P20, which reached the thermophilic phase on day 1 and remained for 10 days. Among them, the control reached the peak temperature of 68.1 °C on day 2 of composting. However, treatments P5, P10, P15, and P20 reached peak temperature (69.7, 70.4, 72.2, and 73.2 °C, respectively) on day 4. The rapid rose of temperature at the beginning of composting was attributed to the rapid biodegradation of easily available OM and the duration of thermophilic phase of all treatments was enough to obtain a sanitation product. Adding peat elevated the peak temperature of composting, possibly due to the increasing air space and improving aerobic conditions of composting mixture by peat, which enhanced the capability of microbes to degrade OM during composting, especially for treatment P20, in which higher peat might provide the optimum condition as well as more nutrient substances (e.g., nitrogen) for microorganisms to the growth and reproduction during the early phase of composting. These biological processes lead to the release of metabolic heat hence heightened temperature in these treatments [31, 34]. After 21 days of composting, the temperature of all treatments dropped to ambient temperature, indicating the exhaustion of easily degradable OM and the composting entered the curing phase.

Fig. 2
figure 2

Changes in temperature (a), pH (b) and EC (c) during food waste composting time. P0—Control, P5—5% Peat, P10—10% Peat, P15—15% Peat, P20—20% Peat. Values are mean and standard deviations (± SD, n = 3)

The pH changes of all treatments throughout the composting process were apparent (Fig. 2b). The initial pH values in all treatments were acidic which might be attributed to organic acids produced by microorganisms before composting [35, 36]. The addition of peat had no significant effect on the initial pH (p > 0.05). Moreover, pH changes had similar trends over all treatments. In the first 3 days of composting, pH values of all treatments increased rapidly, likely due to the volatilization and consumption of organic acids under high temperature and the production and accumulation of \({\text{NH}}_{4}^{ + }\) [32, 35, 37]. Then, pH values remained constant until the day 28 of composting. After then, pH decreased across all treatments, which might be attributed to the microbial nitrification processes that resulted in the reduction of \({\text{NH}}_{4}^{ + }\) and the production of \({\text{NO}}_{3}^{-}\) as well as the release of H+ [38]. However, final pH values were significantly different among treatments (p < 0.01). Similar pH trends were observed where different supplemental carbon sources were added to sewage sludge composting [39].

Electrical conductivity (EC) also showed similar trends across all treatments, except P20 (Fig. 2c). We observed rapid increases in EC during the initial stage due to the production and accumulation of soluble components (e.g., \({\text{NH}}_{4}^{ + }\)) from OM degradation [8, 40]. After the first week, EC gradually decreased until the end of composting except for a small increase on day 21. Decreases in EC were mainly caused by the degradation and reduction of soluble components, e.g., the volatilization of organic carbon and the humification of composting materials transformed salt and micro-molecular organic acids to macro-molecular humus [41]. Final EC values were 1.24, 1.19, 1.13, 1.27, and 1.12 mS/cm in treatments P0, P5, P10, P15, and P20, respectively, which were all below 4 mS/cm and have no harm to plants [11]. Adding peat had no significant effects on EC values throughout the food waste composting process (p > 0.05).

Nitrogen dynamics during composting

Ammonia (NH3) is an inevitable byproduct of composting and is undesirable because it results in environmental pollution and a decreases compost quality [7, 10]. As shown in Fig. 3a, only a small amount of NH3 was detected in all treatments during the first 3 days of composting, which were the results of relatively low \({\text{NH}}_{4}^{ + }\) concentration and high MC. Then, NH3 emissions in all treatments sharply increased under high temperature and high pH conditions in the following week, exacerbated by rapid aerobic degradation (ammonification) of organic nitrogen compounds [10, 42]. Only a small amount of NH3 was released when temperature dropped to ambient and easily degradable OM has been exhausted. NH3 emissions dynamic with time were significantly paralleled with temperature dynamic with time (p < 0.01).

Fig. 3
figure 3

Changes in ammonia emissions (a), cumulative ammonia emissions (b), ammonium (c), and total nitrogen (d) during food waste composting time. P0—Control, P5—5% Peat, P10—10% Peat, P15—15% Peat, P20—20% Peat. Values are mean and standard deviations (± SD, n = 3)

Most NH3 was emitted during the first 10 days (Fig. 3b), accounting for more than 70% total NH3 emissions amount. This high proportion was probably due to quantities of easily degradable nitrogenous OM being degraded by microorganisms in the early stages of composting. Similar results were reported by Awasthi et al. [43] with biosolid composting. Total NH3 emissions were 12.05, 11.82, 10.75, 9.19, and 9.85 g in treatments P0, P5, P10, P15, and P20, respectively. Compared to the control, adding 5–20% peat reduced NH3 emissions by 1.91–23.73% during food waste composting. Overall, our results indicate that the addition of peat can reduce NH3 emissions effectively. One possible reason is that peat has an extremely high affinity for NH3 and a good absorption capacity to absorb NH3. Peat, as an absorbent, has been proved that it was effective in reducing NH3 emissions in manure decomposition [14]. Another possible reason is that peat has an outstanding cation exchange capacity which is beneficial for absorbing a wide range of cations such as ammonium. Of all treatments, the highest reduced NH3 loss was found in P15 (23.73%), suggesting that 15% peat is the optimal addition to reduce NH3 emissions during food waste composting.

Concentrations of \({\text{NH}}_{4}^{ + }\) in all treatments increased quickly after the start of composting (Fig. 3c), which is mainly attributed to the active degradation of OM accompanied by the ammonification during the thermophilic phase [10]; and then, decreases in \({\text{NH}}_{4}^{ + }\) occur because of NH3 emissions under high temperature and high pH conditions during the subsequent period [37]. However, the content of \({\text{NH}}_{4}^{ + }\) increased again on day 21, potentially caused by the ammonification coincided with OM degradation and the temperature spike between day 14 and 21. After day 21, the concentration of \({\text{NH}}_{4}^{ + }\) decreased until the end of composting. The reduction of \({\text{NH}}_{4}^{ + }\) concentration might be due to the volatilization of NH3 and the nitrification processes during composting. Compared to the control, adding 5–20% peat retained more \({\text{NH}}_{4}^{ + }\) concentration during the cooling phase of composting.

TN content of all treatments increased rapidly initially (Fig. 3d). This may have been caused by the rapid degradation of OM and subsequent net loss of composting mass in the form of CO2 [10]. TN content then decreased across all treatments, mainly attributable to net losses of nitrogen in the form of NH3. Finally, TN content increased again until the end of composting. Increases of TN in the final stage were likely due to the net loss of composting mass, the nitrification process, and the assimilation of microorganisms. Final TN contents were 2.15, 2.34, 2.45, 2.51, and 2.31% in treatments P0, P5, P10, P15, and P20, respectively. Therefore, compared to the control, treatments with peat increased the final TN content by 7.44–16.74% after composting. Moreover, the addition of peat had a significant effect on final TN content (p < 0.01), and the final TN content in the control was lower than treatments with peat (p < 0.05). At the end of composting, the loss of nitrogen was 49.19, 38.40, 36.26, 31.06, and 36.33% in treatments P0, P5, P10, P15 and P20, respectively. Adding peat significantly increased the final TN content and reduced the nitrogen loss during food waste composting. On the one hand, peat could reduce NH3 volatilization by adsorbing \({\text{NH}}_{{3}} {\text{/NH}}_{4}^{ + }\) during composting [14]. On the other hand, the cellular structure of peat has an enhanced water holding capacity, creating a favorable microenvironment for nitrifying bacteria and ammonia-assimilating microorganisms that could convert \({\text{NH}}_{{3}} {\text{/NH}}_{4}^{ + }\) to nitrate or organic nitrogen and ultimately resulting in nitrogen-rich compost [39].

Change in C/N ratios and seed germination indices during composting

Carbon to nitrogen ratios (C/N) is one of the most widely used parameters that confirm the rate of composting processes as well as end product maturity [10, 37]. The C/N in all treatments dropped sharply when the composting started (Fig. 4a), which was due to the rapid degradation of OM and the mineralization rate of organic nitrogen lower than that of organic carbon [25]. After the first week, the C/N in treatments P0, P5, and P20 increased and lasted for 21 days, while increase of C/N in treatments P10 and P15 only lasted for 14 days. After that, C/N in all treatments decreased until the end of composting. Final C/N in all treatments was 18.34, 17.19, 16.63, 16.43, and 17.40, respectively, which were within the standard measurement (< 20) that indicates maturity of the compost [44]. Peat had a significant effect on the final C/N and the C/N in the control was significantly higher than adding 5–15% peat treatments during composting (p < 0.05).

Fig. 4
figure 4

Changes in C/N ratios (a) and germination indices (b) during food waste composting time. P0—Control, P5—5% Peat, P10—10% Peat, P15—15% Peat, P20—20% Peat. Values are mean and standard deviations (± SD, n = 3)

Seed germination indices (GI) is a more direct indicator for compost maturity since it directly tests whether the finished compost is inhibitory to plants or not [44, 45]. The changes of GI in all treatments over time are shown in Fig. 4b. In the early stages of composting, the GI of all treatments was relatively low. This phenomenon was attributable to high concentrations of volatile organic acids and \({\text{NH}}_{4}^{ + }\) inhibiting plant growth [45, 46]. On day 28, the GI of treatments P15 and P20 were 81.53% and 84.56%, respectively, which exceeded 80% and was commonly considered non-toxic and mature [46]. The result indicated that adding 15–20% peat could shorten compost maturity time. The possible reason was that adding 15–20% peat provided a favorable microenvironment for the growth and reproduction of microorganisms, which accelerated OM degradation and ultimately facilitated compost maturity. Final GI in treatments P0, P5, P10, P15, and P20 were 99.90, 98.67, 121.12, 108.07, and 103.59%, respectively, and all exceeded 80%. Peat had no significant effect on final GI values during composting (p > 0.05).

The dynamics of fungal community composition during composting

A total of 1,185,035 raw pairs of fungal community were obtained from composting samples. After filtering, a total of 1,027,185 reads were obtained and clustered into 188 different fungal OTUs based on 97% nucleotide similarity. The Shannon index across samples decreased initially and then increased in all treatments except for fluctuations in P20 (Table 3), and the Shannon index ranged from 0.1002, 0.0982, 0.0687, 0.2383, and 0.2146 to 0.6847, 0.7716, 1.7790, 0.9264, and 0.7047 in treatments P0, P5, P10, P15, and P20, respectively. That Shannon index reached the maximum at the mature phase was because fungi are the main decomposers of the refractory OM during composting [47]. Additionally, the result indicated that adding 5–15% peat increased the variation scope in fungal diversity and adding peat elevated the fungal diversity, especially the mature phase, which might be attributed to the variation of physicochemical parameters during composting. This result was similar to other authors [48, 49], who found that fungal diversity variation were influenced by physicochemical variation and the properties of applied additives.

Table 3 The Shannon index of fungal OTU with the number of sequences sampled

The change of top ten fungal OTUs of relative abundances (RAs) throughout the composting process are shown in Fig. 5 and these ten fungal OTUs were accounted for 91.35–99.96% of the entire representative of OTUs in all samples. Basidiomycota, a fungal phylum playing an important role in lignocellulose degradation, was the predominant phylum, and their RA was above 60% in all samples except for P10 at day 42 when Ascomycota was the dominant phylum accounting for 87.01% of the assemblage. The second most abundant phylum was Ascomycota. Similar results were reported by Li et al. [50], where pine leaf biochar were added into pig manure compost. Composting feedstock could affect the fungal community and their RAs because the physical and chemical characteristics in the substrate have a significant impact on the environment [51]. In the first 21 days of composting, the richest fungus was the unclassified_Tremellomycetes (52.71–99.15%) in all samples (Fig. 5), and the second most abundant fungus was Vishniacozyma spp., which belongs to Basidiomycota phyla. At the end of composting, the main fungus was still unclassified_Tremellomycetes (62.59–77.12%) in treatments P0, P5, and P20. However, in treatments P10 and P15, the predominant fungi were Scedosporium spp. (72.43%) and Coprinopsis spp. (64.88%), respectively. The second most dominant fungus were Scopulariopsis spp. (21.01%), Scedosporium spp. (35.64%), unclassified_Tremellomycetes (35.64%), unclassified_Tremellomycetes (12.48%) and Unclassified_Ascomycota (19.78%), respectively, in treatments P0, P5, P10, P15, and P20. Ma et al. [47] reported that adding matured compost increased the proportion of Scedosporium spp. during sewage sludge composting. Coprinopsis spp. was one of the richest genera in compost [50]. Scedosporium spp. can secrete proteases [52], and Coprinopsis spp. can degrade cellulose [53], both of which could promote OM degradation during composting. The result indicated that adding 5–15% peat might promote OM degradation by altering fungal community at matured stage of composting.

Fig. 5
figure 5

The change of top ten fungal OTUs of relative abundances during food waste composting. P0, P5, P10, P15, and P20 represent different treatments, and 3, 7, 14, 21, and 42 represent the corresponding sampling day

The effect of peat on the fungal community during composting

We used nonmetric multidimensional scaling (NMDS) at the total OUT level to test the influence of different amounts of peat on the fungal community structure during food waste composting through time (Fig. 6). Bray–Curtis dissimilarities in all treatments were from 0.09, 0.05, 0.02, 0.02, and 0.26 to 0.46, 0.41, 0.21, 0.53, and 0.87, respectively, on day 3, 7, 14, 21, and 42, which indicated that the fungal OTUs composition in all treatments have the maximum dissimilarity at the end of composting. Therefore, we speculated that adding peat obviously affected fungal OTUs composition in the maturation phase of composting. This result was proved by the change of fungal community composition at phylum and genus levels. That might be because fungal community was influenced by pH value (Fig. 6b) and pH value have the most significant different in the maturation phase during composting. Meanwhile, NMDS results suggested that samples tended to cluster together with composting time at the OTU level (Fig. 6a), suggesting a fungal community succession pattern. PERMANOVA also indicated that composting time had a significant effect on OTU diversity and abundance (p < 0.001). The result was similar to Gu et al. [20], where they reported that time influenced fungal variation during chicken manure composting. This was mainly because fungal community was influenced by physicochemical parameters that alter with compost time [22, 54]. However, PERMANOVA showed that adding peat had no significant influence on fungal community succession throughout composting (p > 0.05). That the fungal community was highly dependent on composting time might explain this lack of correlation [55]. A Mantel-test showed a significant correlation between fungal OTU composition and physicochemical parameters (p < 0.001).

Fig. 6
figure 6

Nonmetric multidimensional scaling (NMDS) analysis showing fungal community dissimilarity at the total OTU level (a) and canonical correlation analysis (CCA) biplot showing the association between the physicochemical parameters and OTUs (b) during food waste composting

Canonical correlation analysis (CCA) showed that physicochemical parameters had significant influence on OTU diversity and abundance (p < 0.001). CCA1 explained 23.14% of the variation in OTU composition (p < 0.001), and CCA2 explained 17.83% of the variation (p < 0.05). Among all selected physicochemical parameters, pH value, MC, and GI had the most significant influence on fungal community succession (p < 0.001). Wang et al. [22] reported that pH value and MC had significant effects on fungal communities in cow manure composting. Zhao et al. [54] reported that fungal composition was positively correlated with GI and had contribution to composting stability and safety during sludge composting. However, TN and \({\text{NH}}_{4}^{ + }\) had no significant effect on fungal community succession during composting (p > 0.05). The result indicated that there might be no direct correlation between fungal community succession and nitrogen conservation during composting. It is well known that fungal populations play a pivotal role in OM degradation and carbon cycle during composting [23]. Zhao et al. [54] also reported that fungal community might affect the function and succession of bacterial strains, but not directly participate in or have less contribution to degrading OM. Therefore, we need to further study the variation of bacterial community of composting in the future.

In conclusion, the present study has confirmed the positive impact of peat on nitrogen conservation during food waste composting. Adding peat elevated the peak temperature of composting, lowered final pH value, reduced ammonia emissions and increased the final total nitrogen content. Compared to the control, adding 5, 10, 15, and 20% peat decreased ammonia emissions by 1.91, 10.79, 23.73, and 18.26%, respectively, during 42 days of composting. Moreover, adding peat increased fungal community diversity especially during maturation phase. The most two abundant phyla were Basidiomycota and Ascomycota in all treatments throughout the composting process. At the end of composting, in treatments with adding 10 and 15% peat, the richest fungi were Scedosporium spp. and Coprinopsis spp., respectively. Simultaneously, canonical correlation analyses showed that pH value, moisture content, and seed germination index had significant association with fungal community composition. The study also showed that fungal community and nitrogen conservation had no direct significant relation during composting. Overall, the results suggest that the addition of peat could efficiently enhance nitrogen conservation through reduction of ammonia emissions and 15% peat addition is the optimal formula for food waste composting.