Wendy Li, Yali Yuan, Xuewen Li, Jieshang Zhou
Introduction Inflammatory bowel disease (IBD) is associated with gut microbial dysbiosis, yet the ecological processes underlying community assembly remain unclear. Methods Here, we applied Sloan’s neutral community model to examine the relative contributions of stochastic and deterministic processes across multiple ecological layers, including metagenomic genes (MGs), molecular functions (MFs), and microbial species (archaea, bacteria, fungi, and viruses), in fecal and mucosal microbiota from healthy controls and ulcerative colitis (UC) patients. Results Across all layers, most MGs, MFs, and species conformed to neutral expectations, indicating a dominant role of stochastic processes in community assembly. However, UC was consistently associated with an increased proportion of neutral MFs and species, accompanied by a reduction in non-neutral components, suggesting weakened selective constraints under disease conditions. Ecological niche further modulated these patterns. Fecal communities harbored significantly higher proportions of non-neutral MFs and species compared to mucosal communities, indicating stronger deterministic processes in feces. Analysis of selection-state transitions revealed extensive changes in selection status in UC, particularly in mucosal environments, where both functional and taxonomic profiles showed marked transition. These changes were primarily driven by the gain and loss of selection rather than directional switching, indicating that UC alters the strength and presence of selection rather than reversing its direction. Discussion Together, these findings provide a multi-layered ecological framework for understanding UC-associated dysbiosis, highlighting increased neutrality and selection rewiring as key features of microbial community assembly under disease conditions.