## 5 Conclusions  
This study explored the changes in microbial communities in sewage sludge during vermicomposting. The influence of earthworms during vermicomposting is clearly demonstrated, as the most significant changes in microbial diversity and composition occurred during earthworm ingestion and digestion processes (GAPs), driving posteriorly further microbial changes during cast ageing processes (CAPs). The changes in microbial composition and structure also led to alterations in functional diversity. Bacterial biosynthesis pathways were enriched, while pathogenic fungal guilds were eliminated. The resulting vermicompost was almost pathogen-free and also had properties that promote plant growth and the decomposition of organic matter. The assessment of bacterial and fungal communities during vermicomposting could help to better understand the mechanisms involved, as well as to determine which pathogens or pollutants could be targeted. Moreover, this approach could help to establish vermicomposting as an environmentally friendly way of managing sewage sludge or even transforming it into organic fertilizer. **Supplementary Materials:** The following supporting information can be downloaded at: [[https://www.mdpi.com/article/10.3390/app14177894/s1](https://www.mdpi.com/article/10.3390/app14177894/s1)]([https://www.mdpi.com/article/10.3390/app14177894/s1](https://www.mdpi.com/article/10.3390/app14177894/s1)), Figure S1: Rarefaction curves indicating the number of bacterial and fungal amplicon sequence variants (ASVs) detected in each sample of sludge and cast and vermicompost produced by the earthworm _[PERSON]_, Figure S2: Changes in alpha diversity of bacterial and fungal communities of sludge, cast and vermicompost from the earthworm _[PERSON]_. Estimated richness (number of observed ASVs and Chao 1) and phylogenetic diversity (Faith) indexes are shown, Figure S3: Changes in beta diversity of bacterial and fungal communities of sludge, cast and vermicompost from the earthworm _[PERSON]_. Beta-diversity was measured as principal coordinate analysis of Jaccard, weighted and unweighted unifrac distances. Different capital and lowercase letters indicate significant differences between sludges and casts in PCoA 1 and PCoA 2 respectively (paired Wilcoxon test, FDR corrected), Table S1: Differential abundance in bacterial and fungal phyla of sludge and casts and vermicomposts of earthworm species _[PERSON]_ analyzed using negative binomial models as implemented in the package DESeq2 [39]. Positive and negative log2 FoldChange indicate significant increase and decrease in abundance of cast over sludge and cast over vermicompost, Table S2: Differential abundance in bacterial and fungal genera of sludge and casts and vermicomposts of earthworm species _[PERSON]_ analyzed using negative binomial models as implemented in the package DESeq2 [39]. Positive and negative log2 FoldChange indicate significant increase and decrease in abundance of cast over vermicompost, Table S4: Full taxonomy and identity of shared bacterial and fungal ASVs present in sludge, cast and vermicompost samples, Table S5: Full taxonomy and identity of bacterial and fungal ASVs present only in sludge, cast or vermicompost samples, Table S6: Bacterial pathways predicted by PICRUST2. Conceptualization, J.D. ; formal analysis, A.G.-R. and M.A. ; investigation, A.G.-R. and M.A. ; writing--original draft, A.G.-R., M.A. and J.D. All authors reviewed and edited the final version. All authors have read and agreed to the published version of the manuscript. This research received funding from the Spanish Ministerio de Ciencia e Innovacion (PID2021-124265 OB-100), the Xunta de Galicia (Grant number ED431C 2022/07) and the MCIN/AEI and European Union Next Generation_EU (project TED2021-129437B-100). AG acknowledges support from the European Union Next Generation_EU Programme-funded project (project TED2021-129437B-100) through the award of a predoctoral research contract. Not applicable.