Microbial, functional, and virulence biomarkers associated with familial risk of Crohn’s disease and ulcerative colitis Authors: Gerard Serrano-Gómez, Soler Zaida, Marc Pons-Tarín, Luis Mayorga, Tarrat-Castells Maria, Borruel Natalia, Guarner Francisco, Chaysavanh Manichanh Published: 2026 ABSTRACT BackgroundFirst-degree relatives of patients with inflammatory bowel disease (IBD) carry elevated disease risk and offer a unique window into preclinical gut microbiome alterations. We investigated whether familial IBD risk is associated with intermediate, disease-specific, or shared gut microbiome configurations in both Crohn’s disease (CD) and ulcerative colitis (UC), the two main form of IBD.MethodsUsing shotgun metagenomics, we analysed fecal samples from CD (n = 68) and UC (n = 77) patients, their healthy first-degree relatives (CD-HFDRs, n = 37; UC-HFDRs, n = 30), and unrelated healthy controls (HCs, n = 497), integrated species-level taxonomy, MetaCyc functional pathways, and virulence factor gene (VFG) profiling, with differential abundance analyses adjusted for relevant covariates.ResultsHFDRs exhibited preserved alpha diversity but intermediate dysbiosis relative to patients and HCs. CD-HFDRs shared CD-associated taxonomic alterations, including depletion of Faecalibacterium prausnitzii, and enrichment of adherence- and invasion-associated VFGs, with 16 of 18 HFDR-enriched VFGs also elevated in CD patients. CD-HFDR functional pathway profiles nonetheless closely resembled those of HCs, revealing a dissociation between taxonomic and functional dysbiosis. Random forest classifiers distinguished HFDRs from HCs with strong performance: species- and VFG-based models achieved an AUCs of 0.966 in CD, and 0.946 in UC. Top predictive features were depletion of F. prausnitzii and enrichment of the E. coli adhesin gene fdeC. UC-HFDRs showed subtler alterations but comparable classifier performance.ConclusionsIBD first-degree relatives harbour a transitional gut microbiome between health and disease, more pronounced in CD, with F. prausnitzii depletion and pathobiont virulence genes emerging as robust microbiome-based risk indicators.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40364-026-00950-y. Introduction Identifying individuals at risk of inflammatory bowel disease (IBD) before clinical onset remains a central and unresolved challenge in gastroenterology. Genome-wide association studies[1, 2] and familial analyses [3] have identified a strong heritable component to IBD, with heritability estimates higher in Crohn’s disease (CD) than in ulcerative colitis (UC). Moreover, first-degree relatives of CD patients have an approximately eight-fold increased disease risk, whereas familial risk in UC is more modest, consistent with lower heritability and later onset [4–8]. However, genetics alone cannot fully account for the sharp rise in IBD incidence observed globally over recent decades, and the gut microbiome has emerged as a particularly compelling candidate. Studies examining the gut microbiome of healthy first-degree relatives of CD patients (CD-HFDRs) have revealed subclinical microbial alterations preceding clinical disease onset. This at-risk population offers a unique and underexplored window into the pre-disease state: individuals who share genetic and environmental background with IBD patients, yet remain clinically unaffected. Siblings of CD patients display a biologically relevant dysbiosis in mucosal microbial communities [9], and specific gut microbiome compositional signatures in healthy relatives have been prospectively associated with future CD onset [10]. Comparisons between patients with quiescent CD and their HFDRs have further refined our understanding of disease-associated microbial shifts by controlling for shared genetic and environmental background [11]. Yet critical gaps remain. First, existing studies have focused almost exclusively on CD relatives, leaving the pre-disease microbiome landscape of UC relatives largely unexplored, a significant omission given the distinct pathophysiology and epidemiology of UC. Second, prior work has relied predominantly on 16S rRNA amplicon sequencing, which provides taxonomic snapshots but lacks the resolution to capture microbial functional capacity, metabolic pathways, or virulence potential. Whether the microbiome of IBD relatives harbors functionally relevant alterations, including enrichment of virulence factors implicated in epithelial invasion, immune evasion, or barrier disruption, remains largely unknown. In the present study, we investigated whether the gut microbiome of first-degree relatives of IBD patients harbors microbial species, functional pathways, or virulence factors that may predispose them to the future onset of both CD and UC, using shotgun metagenomic analysis. Methods Study cohort To study the microbiome influence and transmissibility in IBD, we performed a metagenomic analysis of fecal samples from IBD patients, their HFDR and HC, integrating two previously published cohorts from our group [12, 13]. The study was conducted in accordance with the Declaration of Helsinki, with approval from the Ethics Committee of Vall d’Hebron University Hospital, Barcelona. It included 34 CD (n = 68 fecal samples with more than two time points available for some individuals), and 33 UC (n = 77 fecal samples, with more than two time points available for some individuals) patients, 37 and 30 HFDR of CD and UC patients, respectively; and 497 HC (Supplementary Table S1). Data generation Shotgun DNA metagenomes of all fecal samples were generated as previously described [12]. Briefly, a frozen aliquot (200 mg) of each sample was suspended in 250 µl of 4 M guanidine thiocyanate, 500 µl of 5% N-lauroyl sarcosine, and 40 µl of 10% N-lauroyl sarcosine. Mechanical disruption of the microbial cells with beads was applied, and nucleic acids were recovered from the lysates through ethanol precipitation. For IBD patients and their HFDR, DNA shotgun library was prepared and sequenced using the Illumina HiSeq platform, providing an average of 4.12 Gb of sequence data per sample, while for HC DNA shotgun library was prepared and sequenced using the Illumina NovaSeq6000 platform, yielding an average of 5 Gb of sequence data per sample. Microbiome profiling and statistical analysis Metagenomic sequencing reads were processed for quality control and decontamination using KneadData v0.7.4 (https://huttenhower.sph.harvard.edu/kneaddata). Reads aligning to the human genome or shorter than 50% of the original input read length were removed. Taxonomic profiling of the metagenomic data was performed using MetaPhlAn v4.0.3 [14], which identifies microbial species based on unique single-copy marker genes, and therefore does not return unmapped or unintegrated reads. The rel_ab_w_read_stats parameter was used to report the number of reads assigned to each detected clade. Functional profiling (microbial metabolic pathway potential) of the samples was conducted using HUMAnN v3.6 [15], using the UniRef90 database [16] to identify reads that did not align to HUMAnN’s custom pan-genome database, which provided MetaCyc [17] pathways. Stratified taxonomic profiles from MetaPhlan4 were collapsed into species before further analyses. Alpha diversity was assessed using the Chao1 and Shannon indices. Dysbiosis scores were calculated as the median unweighted UniFrac distance of any given sample to the full plane of healthy individuals. Differential abundance (DA) analysis to find differences at species level between the microbiome of IBD, HFDR, and HC was performed with ANCOMBC2 [18]. Briefly, ANCOMBC2 implements a mixed-effects linear regression algorithm which uses raw microbiome profiling absolute abundance data to estimate unknown sampling fractions as well as to correct for inter-sample variation bias without losing statistical power and controlling for false discovery rate (FDR). Six different models were built (CD/UC vs. HFDR, CD/UC vs. HC and HFDR vs. HC), accounting for age, gender, and BMI as fixed effects and, when possible, for individual ID, timepoint, and affected relative (only in the CD/UC vs. HFDR models) as random effects. ANCOMBC2 also allows for the detection of structural zeros, which are species identified as being absent in at least one of the comparison groups by the algorithm. Differentially abundant species identified through the structural zeros were only considered if they passed a 0.001 abundance and 0.1 prevalence threshold in the non-zero group. In the rest of the cases, species with FDR(q) < = 0.05 were considered differentially abundant. Unmapped and unintegrated reads of HumanN3.6 MetaCyc output and pathways below 0.001 abundance and 0.1 prevalence (pathways representing less than 0.1% of the total sample abundance in at least 10% of the samples) were removed. Samples were directly sum-normalized to copies per million (CoPM), as HumanN normalizes hits by gene length by default, and log2-transformed, adding a pseudocount equal to the minimum non-zero value for each sample to avoid zero values, before statistical modelling. DA analysis to find differences at pathway potential level between the microbiome of CD/UC, HFDR, and HC was performed with linear mixed-effects models as implemented in the nlme R package v.3.1–162 (lme function) (https://CRAN.R-project.org/package=nlme). Three different models were built (CD/UC vs. HFDR, CD/UC vs. HC, and HFDR vs. HC), accounting for age, gender, and BMI as fixed effects and, when possible, for individual ID, timepoint, and affected relative (only in the CD/UC vs. HFDR models) as random effects. Only pathways with FDR(q) < = 0.05 and absolute log2FC > = 1 were considered differentially abundant. Virulence factor genes profiles were obtained by mapping decontaminated metagenomic sequences to the DNA sequences of the core dataset from the Virulence Factor Database (VFDB) [19] using Bowtie2 v2.5.1 [20]. Reads with < 80% alignment with the reference sequence or with q-score < 30 were removed. The resulting counts were filtered with a 0.001 abundance and 0.1 prevalence threshold for each condition and then sum-normalized to CPM before removal of unmapped reads. To find differences at VFG, DA analysis level was performed with linear mixed-effects models as implemented in the nlme R package accounting for age, gender, and BMI as fixed effects and, when possible, for individual ID, timepoint and affected relative (only in the CD/UC vs. HFDR models) as random effects. Only VFG with FDR < = 0.05 and absolute log2FC > = 1 were considered differentially abundant. Random forest classifiers were trained to distinguish HFDRs from unrelated HCs using bacterial species, potential pathways, virulence factor genes (VFGs), or combinations of these features as predictors. Matching for age, gender, and BMI was performed between CD-HFDRs and healthy controls prior to model training. The CD models were subsequently trained using the full set of 37 CD-HFDRs and a matched subset of 37 unrelated healthy controls. Similarly, the UC models were trained using 30 UC-HFDRs and a corresponding matched subset of 30 unrelated healthy controls. In both cases, predictors consisted of all features identified as differentially abundant between HFDRs and HCs. All models were trained using the caret package in R (package version 6.0–94), with repeated 5-fold cross-validation (100 repetitions). The default number of trees was set to 500 (ntree = 500), and the optimal number of variables considered at each tree split was set to 2 (mtry = 2), as this configuration yielded the best discriminative performance based on the area under the ROC curve. Matching of HCs to HFDRs based on age, sex, and BMI was performed using the R “e1071” package. Results Characteristics of the cohorts The study included fecal samples from patients with Crohn’s disease (CD, n = 68), ulcerative colitis (UC, n = 77), healthy first-degree relatives of CD (CD-HFDRs, n = 37) and UC patients (UC-HFDRs; n = 30), and healthy non-related controls (HCs, n = 497). Age and BMI differed significantly across groups (P < 0.001 and P = 0.003, respectively), with CD patients being younger and having lower BMI compared to other groups. Sex distribution was comparable across all groups. Smoking status varied (P < 0.001), with a higher proportion of current smokers among CD patients and CD-HFDRs, consistent with the well-established association between smoking and CD susceptibility. Given their potential to influence the gut microbiome composition, these variables were included as covariates in the downstream analyses. First-degree healthy relatives of IBD patients display partial microbiome deviation from healthy controls To assess microbiome differences among IBD patients, HFDRs, and HCs, we first calculated Chao1 and Shannon diversity indices. Consistent with previous studies, CD patients showed reduced alpha diversity compared with all other groups, and UC patients showed lower diversity than HC. In contrast, CD-HFDRs and UC-HFDRs did not differ significantly from each other or from HC (Fig. 1A–B). Fig. 1Diversity and global composition alterations in HFDRs of CD and UC patients. Boxplots of alpha diversity analysis, using the Chao1 (A) and Shannon (B) diversity indices. No difference in alpha diversity was observed between HC and the HFDR groups. P-values were calculated using the Mann-Whitney’s U test. All individual points and all significant comparisons (P < 0.05) between groups are shown. (C) Boxplots of the dysbiosis score (using unweighted UniFrac distance) of each group. P-values were calculated using the Wilcoxon’s rank-sum test. All individual points and all significant comparisons (P < 0.05) between groups are shown. (D) Density plot representing the distribution of dysbiosis scores across the groups Diversity and global composition alterations in HFDRs of CD and UC patients. Boxplots of alpha diversity analysis, using the Chao1 (A) and Shannon (B) diversity indices. No difference in alpha diversity was observed between HC and the HFDR groups. P-values were calculated using the Mann-Whitney’s U test. All individual points and all significant comparisons (P < 0.05) between groups are shown. (C) Boxplots of the dysbiosis score (using unweighted UniFrac distance) of each group. P-values were calculated using the Wilcoxon’s rank-sum test. All individual points and all significant comparisons (P < 0.05) between groups are shown. (D) Density plot representing the distribution of dysbiosis scores across the groups Inter-individual variation was then evaluated using an unweighted UniFrac-based dysbiosis score (defined as the median unweighted UniFrac distance of each sample to the full set of healthy control samples). Dysbiosis in CD-HFDRs and UC-HFDRs was significantly lower than in the affected relatives but higher than in HCs (Fig. 1C-D). Although CD patients exhibited greater dysbiosis than UC patients, no such difference was observed between their respective HFDRs. Species-level differential abundance analysis positions the microbiome of HFDRs as intermediate between IBD patients and un-related healthy controls To identify species driving microbiome differences among HFDRs, IBD patients, and HCs, we performed species-level differential abundance analyses controlling for relevant confounders (see Methods). In CD, extensive microbial variation was observed across groups, with numerous differentially abundant species identified in pairwise comparisons between CD-HFDRs, CD patients, and HCs. Notably, a substantial proportion of these differences involved structural zeros (species that are consistently present in one group but undetectable in another), highlighting the presence of compositionally distinct microbial communities rather than merely quantitative shifts (Table 1; Fig. 2A, Supplementary Tables S2-S7). Differentially abundant species were classified into three patterns: those shared between CD-HFDRs and CD patients, those shared between CD-HFDRs and HCs, and those specific to CD-HFDRs alone. Species common to both CD-HFDRs and CD included the depletion of Faecalibacterium prausnitzii, while species shared between CD-HFDRs and HCs included the absence of taxa enriched in CD patients, such as Escherichia coli, as well as the preservation of key fiber-degrading species. Table 1Species-level differential abundance patterns in CD and UCDiseaseComparison / signature categoryNo. of DA speciesStructural zeros (n)Key features / representative taxa CD CD-HFDR vs. HC18138Broad microbial shifts associated with familial riskCD-HFDR vs. CD254245Strong divergence between HFDR and affected relativesCD vs. HC257206Extensive CD-associated dysbiosis Shared CD-HFDR / CD 3829Depletion of Faecalibacterium prausnitzii (FDR = 2.42 × 10⁻⁴; log₂FC = −1.45) Shared CD-HFDR / HC 135127CD-enriched taxa (Escherichia coli, Enterocloster bolteae, E. clostridioformis, Faecalimonas umbilicata); depletion of Ruminococcus bromii and Eubacterium rectale CD-HFDR-specific 7676HFDR-unique alterations distinct from both CD and HCIntermediate abundance in CD-HFDR124–Gradual shifts toward CD-like profiles across all signature groups UC UC-HFDR vs. HC25586Moderate microbial divergence associated with familial riskUC-HFDR vs. UC117117Differences driven entirely by presence/absenceUC vs. HC6949Limited UC-associated dysbiosis Shared UC-HFDR / UC vs. HC 4330Depletion of Prevotella copri clades B and C Shared UC-HFDR / HC vs. UC 1616UC-specific alterations absent in HFDR and HC UC-HFDR-specific 3333HFDR-unique microbial signaturesIntermediate abundance in UC-HFDR16–Subtle intermediate patterns across groups Table 1Species-level differential abundance patterns in CD and UCDiseaseComparison / signature categoryNo. of DA speciesStructural zeros (n)Key features / representative taxa CD CD-HFDR vs. HC18138Broad microbial shifts associated with familial riskCD-HFDR vs. CD254245Strong divergence between HFDR and affected relativesCD vs. HC257206Extensive CD-associated dysbiosis Shared CD-HFDR / CD 3829Depletion of Faecalibacterium prausnitzii (FDR = 2.42 × 10⁻⁴; log₂FC = −1.45) Shared CD-HFDR / HC 135127CD-enriched taxa (Escherichia coli, Enterocloster bolteae, E. clostridioformis, Faecalimonas umbilicata); depletion of Ruminococcus bromii and Eubacterium rectale CD-HFDR-specific 7676HFDR-unique alterations distinct from both CD and HCIntermediate abundance in CD-HFDR124–Gradual shifts toward CD-like profiles across all signature groups UC UC-HFDR vs. HC25586Moderate microbial divergence associated with familial riskUC-HFDR vs. UC117117Differences driven entirely by presence/absenceUC vs. HC6949Limited UC-associated dysbiosis Shared UC-HFDR / UC vs. HC 4330Depletion of Prevotella copri clades B and C Shared UC-HFDR / HC vs. UC 1616UC-specific alterations absent in HFDR and HC UC-HFDR-specific 3333HFDR-unique microbial signaturesIntermediate abundance in UC-HFDR16–Subtle intermediate patterns across groups Species-level differential abundance patterns in CD and UC Fig. 2Species-level differential abundance analysis. Heatmap of the log2-transformed normalized abundance of the microbial species shared between HFDRs and HCs and between HFDRs and CD patients (A) or UC (B). For plotting purposes, unknown species and structural zero species not passing a threshold of 1% abundance and 10% prevalence in the non-structural zero group were removed. (C-D). PCoA of CD/UC patients, CD/UC-HFDRs, and HCs using Bray-Curtis distance and all species information Species-level differential abundance analysis. Heatmap of the log2-transformed normalized abundance of the microbial species shared between HFDRs and HCs and between HFDRs and CD patients (A) or UC (B). For plotting purposes, unknown species and structural zero species not passing a threshold of 1% abundance and 10% prevalence in the non-structural zero group were removed. (C-D). PCoA of CD/UC patients, CD/UC-HFDRs, and HCs using Bray-Curtis distance and all species information In UC, differential abundance patterns were more limited, with fewer species distinguishing UC-HFDRs, UC patients, and HCs (Table 1; Fig. 2B, Supplementary Tables S8-S13). Species shared between UC-HFDRs and UC included the depletion of Prevotella copri clades, an alteration also observed in CD-related comparisons, suggesting a degree of microbial disruption common to both IBD subtypes. In contrast, relatively few species were shared between UC-HFDRs and HCs, indicating a less clearly preserved healthy microbial signature in this group compared to CD-HFDRs. Across CD- and UC-HFDRs, many taxa displayed intermediate abundances between IBD patients and HCs, a pattern more pronounced in CD than in UC. Principal component analyses confirmed significantly different microbial composition across all three groups in both the CD (PERMANOVA, R2 = 0.054, P = 0.001) and UC (PERMANOVA, R2 = 0.023, P = 0.001), with greater overall compositional separation observed in CD than in UC (Fig. 2CD). Overall, these results support the interpretation that HFDRs harbor a microbiome in an intermediate or transitional state between health and IBD, a gradient that is more pronounced in CD than in UC, and that may reflect differences in the heritability and pathophysiology of these two disease subtypes. Pronounced functional dysbiosis in Crohn’s disease contrasts with broadly preserved metabolic profiles in ulcerative colitis To assess how taxonomic differences translate into functional potential, we performed MetaCyc pathway differential abundance analyses across groups, adjusting for relevant confounders (see Methods). In the CD cohort, this analysis identified 95 and 107 differentially abundant pathways between CD-HFDRs and CD patients, and between HCs and CD patients, respectively. Strikingly, only five pathways were differentially abundant between CD-HFDRs and HCs, indicating that despite harboring taxonomic alterations intermediate between health and disease, CD-HFDRs retain a functional metabolic profile largely indistinguishable from that of unrelated healthy individuals. CD patients, by contrast, displayed markedly altered functional profiles, characterised by increased representation of metabolic pathways likely driven by the enrichment of pathobionts (Fig. 3, Supplementary Tables S14-S16). Fig. 3Barplots summarizing taxonomic (right) and functional (left) dysbiosis in Crohn’s disease and ulcerative colitis and their healthy first-degree relatives. The amount of differentially abundant features is more pronounced in CD and their HFDRs than in UC, both at taxonomic and functional levels Barplots summarizing taxonomic (right) and functional (left) dysbiosis in Crohn’s disease and ulcerative colitis and their healthy first-degree relatives. The amount of differentially abundant features is more pronounced in CD and their HFDRs than in UC, both at taxonomic and functional levels Pathway pattern analysis further reinforced this functional divergence: 85 pathways were shared between CD-HFDRs and HCs (Supplementary Table S17), only two pathways were specific to CD-HFDRs (Supplementary Table S18), and no pathways were shared between CD-HFDRs and CD patients. This pattern indicates that the microbiome of CD-HFDRs is functionally far closer to that of HCs than to CD patients, despite sharing certain taxonomic features with the latter. In UC, functional differences were markedly limited across all pairwise comparisons, with few differentially abundant pathways identified between UC-HFDRs, UC, and HCs (Supplementary Tables S19-S20). This pattern of broad functional preservation across UC groups stands in sharp contrast to the pronounced functional dysbiosis observed in CD, and may reflect fundamental differences in the microbial mechanisms underlying these two IBD subtypes. The virulence gene repertoire of HFDRs partially mirrors that of IBD patients and is distinct from that of unrelated healthy controls To assess microbial virulence potential across groups, metagenomic reads were mapped against the Virulence Factor Database (VFDB). CD patients showed the highest abundance VFGs, followed by CD-HFDRs, who exhibited increased VFG richness compared with HCs but levels comparable to those of UC-HFDRs. UC patients also displayed higher VFG potential relative to HCs, though less consistently (Fig. 4AB). Differential abundance analysis highlighted distinct virulence profiles across groups. In CD, 116 VFGs differed between CD patients and CD-HFDRs (114 enriched in CD), and 181 VFGs differed between CD patients and HCs (168 enriched in CD). These CD-enriched VFGs primarily associated with effector delivery systems, adherence, invasion, and metabolic factors, and were largely attributed to Escherichia coli/Shigella (Supplementary Tables S21-S22). Between CD-HFDRs and HCs, 28 VFG were differentially abundant (18 enriched in CD-HFDRs, 10 in HCs). VFGs enriched in CD-HFDRs mirrored those elevated in CD patients, dominated by adherence and invasion functions, while HC-enriched VFGs were predominantly associated with biofilm formation (Fig. 4C). Notably, 16 of the 18 VFGs enriched in CD-HFDRs relative to HCs were also elevated in CD versus HCs, indicating that the intermediate microbiome state of CD-HFDRs extends beyond taxonomic and functiona composition to encompass virulence potential. Fig. 4Distinct virulence gene profiles between groups. (A) Boxplots of the amount of virulence factor genes (VFG) found in each group. P-values were calculated using the Wilcoxon’s rank-sum test. All individual points and all significant comparisons (P < 0.05) between groups are shown. (B) Density plot representing the distribution of VFG diversity across the groups. (C) Representation of virulence factor genes enriched in CD-FDHRs compared to healthy controls. (D) Representation of virulence factor genes enriched in UC-FDHRs compared to healthy controls. VF genes were grouped by microorganisms of provenance and coloured by their function, according to the Virulence Factor Database (VFDB) Distinct virulence gene profiles between groups. (A) Boxplots of the amount of virulence factor genes (VFG) found in each group. P-values were calculated using the Wilcoxon’s rank-sum test. All individual points and all significant comparisons (P < 0.05) between groups are shown. (B) Density plot representing the distribution of VFG diversity across the groups. (C) Representation of virulence factor genes enriched in CD-FDHRs compared to healthy controls. (D) Representation of virulence factor genes enriched in UC-FDHRs compared to healthy controls. VF genes were grouped by microorganisms of provenance and coloured by their function, according to the Virulence Factor Database (VFDB) In UC, no VFGs were differentially abundant between UC-HFDRs and UC patients, suggesting greater functional convergence between these groups than observed in the CD cohort. Comparison of UC patients with HCs revealed 40 differentially abundant VFGs (34 enriched in UC, predominantly E. coli-associated adherence/invasion genes; six enriched in HCs). Between UC-HFDRs and HCs, 28 VFGs were differentially abundant, of which 27 were enriched in UC-HFDRs (Supplementary Tables S23-S24; Fig. 4D). Strikingly, 15 of these UC-HFDRs-enriched VFGs overlapped with those of CD-HFDRs relative to HCs, highlighting shared virulence potential in at-risk individuals across IBD subtypes, a finding that may point toward common microbial mechanisms of disease predisposition in both CD and UC. Combining microbiome species and VFGs signatures accurately discriminate IBD- HFDRs from unrelated HC To evaluate the predictive potential of microbial species, metabolic pathways, and virulence factor genes for distinguishing IBD-HFDRs from unrelated HCs, we trained a series of random forest classifiers using features identified as differentially abundant in the preceding analyses as predictors. In the absence of an external validation cohort, model performance was assessed using a repeated 5-fold cross-validation approach (100 repetitions). For the discrimination of CD-HFDRs from HCs, the species-based model achieved strong predictive performance, with 84% accuracy, with 81% sensitivity, and 87% specificity, and an area under the receiver operating characteristic curve (AUC) of 0.881. Consistent with the limited functional dysbiosis observed in CD-HFDRs, the pathway-based model performed poorly, yielding only 59% accuracy, 57% sensitivity, and 62% specificity, with an AUC of 0.642. In contrast, the model trained using VFGs data also performed strongly, achieving 81.2% accuracy, 100% sensitivity, and 62.5% specificity, with an AUC of 0.914, the highest AUC among individual models for CD. For the discrimination of UC-HFDRs from HCs, the species-based model achieved 81.6% accuracy, 77.1% sensitivity, and 86.1% specificity, and an AUC of 0.915. In contrast to the CD cohort, the pathway-based model performed substantially better in UC, reaching 75% accuracy, 76.3% sensitivity, and 73.7% specificity, with an AUC of 0.832, consistent with the more limited but detectable functional differences observed in UC-HFDRs. The VFG-based model achieved 76.7% accuracy, with 100% sensitivity and 53.3% specificity, and an AUC of 0.923, again the highest AUC among individual models for UC. A combined model incorporating both microbial species and VFGs as predictors outperformed all single-feature models. For CD-HFDR versus HC, it achieved 93.2% accuracy (92.4% sensitivity, 94% specificity, AUC of 0.966), and for UC-HFDR versus HC, 88.6% accuracy, (86.7% sensitivity, 90.6% specificity, AUC of 0.946) (Fig. 5). Fig. 5Performance (AUC) and top contributing predictors of the random forest classifier. The models were built using species and VFGs as predictors to distinguish between CD-HFDRs and HCs (left) and between UC-HFDRs and HCs (right) Performance (AUC) and top contributing predictors of the random forest classifier. The models were built using species and VFGs as predictors to distinguish between CD-HFDRs and HCs (left) and between UC-HFDRs and HCs (right) Across both CD and UC classifications, the top contributing feature to model performance was Faecalibacterium prausnitzii, consistent with its central role in IBD-associated dysbiosis. The second most important predictor was VFG045349, corresponding to the fdeC adhesin of E. coli, an adhesin involved in host cell attachment and a plausible mediator of early mucosal colonisation in genetically susceptible individuals (Fig. 5). The prominence of both a commensal depletion marker and a pathobiont virulence gene among the top predictors underscores the multidimensional nature of microbiome-based risk in individuals predisposed to IBD, and supports the value of integrating taxonomic and virulence-associated features in predictive models. Discussion The present findings indicate that familial risk for IBD is associated with measurable yet incomplete gut microbiome restructuring, with the extent and nature of these alterations differing substantially between Crohn’s disease and ulcerative colitis. In Crohn’s disease, the large number of differentially abundant species and structural zeros highlights a profound ecological reorganization in affected individuals. High-risk HFDRs share a subset of these alterations without fully recapitulating the disease-associated microbiome. The presence in HFDRs of characteristic CD-associated features, such as depletion of Faecalibacterium prausnitzii, alongside the retention of taxa typically lost in CD suggests partial convergence toward a disease-like state rather than severe dysbiosis. Consistent with prior work, HFDRs therefore represent a unique at-risk cohort in which microbiome overlaps with, but remains distinct from, that of CD patients [21]. In ulcerative colitis, microbial differences were more limited, implying that UC-associated dysbiosis is either less extensive or more context-dependent than that observed in CD, corroborating previous findings [22]. UC patients and their high-risk HFDRs shared only a limited set of microbial changes, without evidence of profound ecological reorganization. This restricted overlap may partly reflect diet- or lifestyle-related influences rather than disease-driven remodeling, while more substantial community disruption appears to arise primarily in the context of established disease, consistent with diet-microbiome-inflammation relationships observed in UC [23]. Across both conditions, the frequent observation of intermediate species abundances in HFDRs supports a model in which the gut microbiome reflects a transitional ecological state shaped by genetic susceptibility and shared environmental exposures. This intermediate configuration may represent a permissive background that increases vulnerability to IBD but requires additional triggers, such as inflammation, environmental insults, or immune dysregulation, for progression to clinically manifest disease [21]. The more pronounced intermediate pattern in CD-HFDR relative to UC-HFDR is most consistent with a stronger genetic influence on microbiome composition in Crohn’s disease, supported by the established involvement of CD-associated risk loci in host–microbe interactions [1]. Functional and virulence analyses reveal that CD microbiomes are extensively dysbiotic, with marked enrichment of metabolic pathways and virulence factor genes, particularly those involved in adherence, invasion, and effector systems, largely contributed by E. coli and Shigella. First-degree relatives of CD patients display an intermediate state, with functional profiles largely similar to healthy controls but modestly enriched for virulence genes mirroring CD patterns. This suggests that the intermediate microbiome in CD-HFDR extends beyond taxonomy to include potential pathogenic functions [24]. By contrast, UC microbiomes showed minimal functional alterations, with few differentially abundant pathways or virulence genes, and UC-HFDRs closely resemble both UC patients and HCs. Notably, a subset of virulence factors was shared between CD-HFDRs and UC-HFDRs relative to HCs, indicating common risk-associated microbial functions across IBD-susceptible individuals, albeit far more pronounced in the CD context. Random forest classification corroborated these findings. Species-only and VFG-only models both performed strongly, while pathway-only models, particularly in CD, were comparatively weaker, reinforcing the greater discriminative power of taxonomic and virulence-based signals. The superior discriminatory power achieved by combining species and VFG data further suggests that increased IBD risk in HFDR is partially encoded in microbiome composition. Additionally, the identification of Faecalibacterium prausnitzii and the fdeC adhesin VFG as key contributors to both the CD and UC prediction models indistinctively highlights the importance of F. prausnitzii depletion and E. coli virulence traits in the context of IBD. These results raise the possibility that pathoadaptive strains such as adherent-invasive E. coli [25], colonize not only IBD patients but also their HFDRs. Strain-level profiling in future studies will be required to test this hypothesis directly. Several limitations should be acknowledged. This study is cross-sectional, so causal relationships between intermediate microbiome features in HFDR and subsequent disease onset cannot be inferred. Although covariates including age, BMI, and smoking habit were accounted for, unmeasured lifestyle or dietary factors may have contributed to the observed patterns. Sample sizes for HFDR, particularly in UC, were modest, which may have limited detection of subtle taxonomic or functional changes. Fecal metagenomes provide a proxy for gut microbial composition but may not fully capture mucosal communities, and functional inferences reflect encoded potential rather than measured activity. Differences in sequencing platforms across cohorts may introduce residual technical variability despite normalization. With respect to the predictive modelling, we used repeated cross-validation to assess model performance, which is appropriate for internal validation and discovery in high-dimensional datasets such as metagenomes. However, we acknowledge that this approach does not fully address external generalizability. In particular, an independent validation strategy using a separate CD or UC cohort not included in model training would have been preferable and would have provided stronger evidence for robustness and transferability of the classifier. Collectively, these findings support a model in which first-degree relatives of IBD patients harbor a gut microbiome in a transitional ecological state between health and disease. While overall microbial diversity remains largely preserved, HFDRs exhibit intermediate community composition and virulence potential, reflecting partial convergence toward disease-associated profiles. This gradient is most pronounced in Crohn’s disease, where CD-HFDRs show depletion of anti-inflammatory taxa and modest enrichment of virulence functions, consistent with a stronger genetic influence on microbiome configuration. In ulcerative colitis, functional and virulence perturbations are comparatively limited, suggesting less extensive microbial remodeling in this context. Together, these results indicate that functional and virulence differences reinforce a continuum of dysbiosis from health to familial risk to clinically manifest disease, providing a framework for understanding how subclinical microbial alterations may contribute to IBD susceptibility. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1