## 3 Results  
### Changes in the Composition of Bacterial and Fungal Communities  
The bacterial community of the sewage sludge comprised 15 phyla, with Proteobacteria (60%), Bacteroidota (19%) and Firmicutes (13%) being the most prevalent (Table 1). The bacterial communities in fresh earthworm casts consisted of 16 bacterial phyla, with Proteobacteria (67%), Firmicutes (11%) and Bacteroidota (7%) predominating (see Table 1). A total of 21 bacterial phyla were identified in vermicompost samples, with Proteobacteria (58%), Bacteroidota (25%) and Verrucomicrobiota (4%) being the most abundant (Table 1). The passage of the sludge through the earthworm gut resulted in the appearance of three bacterial phyla that were not present in the sewage sludge (Verrucomicrobiota, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Kingdom** & **Phylum** & **Sewage Sludge** & **Cast** & **Vermicompost** \\ \hline Bacteria & Proteobacteria & \(60.13\pm 9.78\) & \(66.86\pm 1.37\) & \(57.91\pm 0.64\) \\ Bacteria & Bacteroidetes & \(18.78\pm 4.22\) & \(7.07\pm 1.05\) & \(25.35\pm 0.64\) \\ Bacteria & Firmicutes & \(13.18\pm 3.19\) & \(11.66\pm 0.99\) & \(2.66\pm 0.18\) \\ Bacteria & Campylobacter & \(3.96\pm 1.28\) & - & - \\ Bacteria & Verrucomicrobiota & - & \(5.08\pm 0.21\) & \(4.50\pm 0.17\) \\ Bacteria & Actinobacteria & - & \(4.94\pm 0.7\) & \(1.91\pm 0.15\) \\ Bacteria & Planctomycotota & - & \(2.42\pm 0.16\) & \(3.22\pm 0.16\) \\ Fungi & Basidiomycota & \(87.80\pm 3.31\) & \(69.78\pm 2.44\) & \(68.53\pm 4.14\) \\ Fungi & Mortierellomycota & \(6.81\pm 4.21\) & \(27.68\pm 2.33\) & \(29.68\pm 4.11\) \\ Fungi & Ascomycota & \(5.32\pm 1.69\) & \(2.54\pm 0.28\) & \(1.80\pm 0.15\) \\ Fungi & Mucoromycota & \(0.06\pm 0.04\) & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Relative abundance of the main bacterial and fungal phyla in sewage sludge, casts and vermicompost from the earthworm _Eisenia andrei_. Only bacterial phyla with an abundance >3% are displayed. Mean and SE (N = 5). Actinobacteriota and Planctomycetota) and the disappearance of one bacterial phylum (Campylobacteria) (Table 1). Moreover, the gut transit significantly decreased the abundance of the bacterial phyla Fusobacteria and Bacteroid, among others (Supplementary Table S1). Ageing of casts during vermicomposting (CAPs) decreased the abundances of the bacterial phyla Firmicutes, Chloroflexi and Verrucomicrobiota, among others, and significantly higher abundances of FCPU426, Fibrobacterota and Bacteroidota, among others (Table 1, Supplementary Table S1). At the genus level, the passage of sludge through the earthworm gut resulted in the appearance of bacterial genera that were not present in the sludge (_Candidatus Lumbriccinola_, _Rhodanobacter_, _Flarobacterium_, _Aeromonas_ and _Chitinibacter_, among others) and the disappearance of bacterial genera (_Acidovorax_ and _Prevotella_, among others) that were present in the sludge (Figure 1A, Supplementary Table S2). Ageing of cast during vermicomposting significantly decreased the abundances of the bacterial genera _Acinetobacter_, _Paenibacillus_ and _Aeromonas_, among others, and significantly increased the abundance of _Porticoccus_, _Massilia_ and _Chitinophaga_, among others (Figure 1B, Supplementary Table S2). At the ASV level, the passage of the sludge through the earthworm gut resulted in a significant decrease in the relative abundance of 34 bacterial ASVs, mainly included in the genus _Bacteroides_, and a notable increase in the relative abundance of 90 bacterial ASVs, mainly belonging to the genus _Rhodanobacter_ (Supplementary Table S3). The cast ageing processes (CAPs) significantly reduced the abundance of 12 bacterial ASVs, mainly included in the genus _Candidatus Lumbriccinola_, and increased the abundance of 35 ASVs, mainly belonging to the genus _Pseudomonas_ (Supplementary Table S3). We found that there were 10 HPBs in the sewage sludge.