Bioinformatics AdvancesSystems BiologyPeer-reviewed journal article
NeighborFinder: an R package inferring local microbial network around a species of interest
Mathilde SolaiD, Adrien Paravel, Sandrine AugeriD, Jean‐Marc ChateliD, Florian Plaza OñateiD, Emmanuelle Le ChatelieriD, Marion Leclerc, Patrick VeigaiD, Clémence FriouxiD, Mahendra MariadassouiD, Magali BerlandiD
Abstract
1MotivationUnderstanding interactions from microbiome data is a central aspect in microbial ecology, as it provides insights into ecosystem stability, disease mechanisms, and can be used to design synthetic communities. Current network inference tools reconstruct global networks from co-abundance data, which means they capture the overall correlation structure for the entire set of taxa considered. These approaches are computationally intensive and suboptimal when the focus is on the local neighborhood of specific taxa of interest. ResultsWe introduce NeighborFinder, a local network inference method that enables the targeted discovery of direct neighbors around a species of interest. Using cross-validated multiple linear regression with[l] 1 penalty and microbiome-specific filters, our approach infers interpretable species-centered interactions, with F1 score [≥] 0.95 on simulated cohorts ranging from 250 to 1000 samples. This method is well-suited for large metagenomic datasets and is particularly valuable for exploratory studies where the targeted hypotheses outweigh the need for global community structure. The approach complements existing methods by being a biologically intuitive and computationally efficient. Availability and ImplementationThe R package is freely available on GitHub: https://github.com/metagenopolis/NeighborFinder. The data and source code used to calculate performances and produce the use case example in this paper can be found respectively at: https://doi.org/10.57745/UPITJ0 and https://doi.org/10.57745/HJLWW4. Supplementary informationSupplementary data are available
- organism: human
- organism: bacteria (other)
- assay: metagenomics
- research focus: software / tool
- research focus: benchmarking
- approach: statistical model
- approach: machine learning (classical)
- approach: simulation
In-depth summary
Claude Opus 5.5 · xhigh effort · 8 Nov 2026 · from the full text of version 2 (25 Mar 2026) · CC BY 4.0
R package NeighborFinder infers a focal species' co-abundance neighbors via repeated cross-validated ℓ1 regression, reaching F1 ≥ 0.95 on simulated cohorts of 250 to 1000 samples.
Existing co-abundance network tools, mostly Graphical Gaussian Models, reconstruct the whole taxon network, paying heavily in computation and statistical power when only one species' neighborhood (e.g. a pathogen or probiotic) is of interest. NeighborFinder targets that local neighborhood directly, giving fast, interpretable neighbor lists that can inform design of consortia promoting or inhibiting a species.
Key results
SuggestedOn simulated microbiomes with known interaction networks, NeighborFinder recovers a focal species' direct neighbors with high precision and recall across realistic cohort sizes.
F1 score ≥ 0.95 on simulated cohorts of 250 to 1000 samples; simulations mirrored eight shotgun metagenomic cohorts (n=347 to n=1084); per-species F1 averaged over species and cohorts, scanning prev_level 15% to 35%, top filtering 5% to 30% plus 100%, 10 RNG seeds. · Abstract; 3.2.1. Simulation strategy; 3.2.2 Evaluation procedure
SuggestedBest prevalence and coefficient-filtering settings depend on sample size: large cohorts tolerate low prevalence thresholds, whereas small cohorts need stringent prevalence filtering to keep accuracy.
Simulations n=100 to n=1000 (Figure S1): many combinations give F1 ≥ 0.9 at large n; suggested setting for n=1000 is prev_level=0.15 with filtering_top=30. At n=50 (Figure S2), prev_level ≥ 0.4 is required for F1 above 0.7. · 3.3 Determining the best combination of…
ShownLocal inference is fast: a single-core NeighborFinder run is far quicker than full-network reconstruction with SPIEC-EASI on the same human gut datasets.
Running time < 1 minute for up to 1 100 samples; in the eight-dataset application, SPIEC-EASI (4-core parallelization) was 37 times slower than NeighborFinder (single core); execution-time details in Figure S3. · 2 Introduction; 4.2 Application example; 5 Discussion
SuggestedA consensus across eight human gut datasets yields a compact neighborhood for B. longum, B. dentium and B. thetaiotaomicron, with edges consistent with literature on polysaccharide complementarity and cross-feeding.
Edges kept if detected in at least 4 of the 8 datasets (9 edges). B. thetaiotaomicron linked to Bacteroides ovatus (complementary glycoside hydrolases/PULs for hemicelluloses) and B. vulgatus; B. longum to Anaerostipes hadrus (plausible cross-feeding); B. dentium to Streptococcus anginosus (shared oral niche). · 4.2 Application example; Tables
SuggestedA SPIEC-EASI consensus misses most NeighborFinder-detected neighbors, which the authors attribute to the lower power of global inference for a single neighborhood.
SPIEC-EASI was run on each dataset and a consensus of the eight inferred networks was built; it missed 6 of the 9 edges found by NeighborFinder, including every neighbor of B. thetaiotaomicron. · 4.2 Application example
Methods, data and reproducibility
Species abundances are prevalence-filtered, scaled to count-like values and mclr-normalized; the focal species is regressed on all others via cross-validated ℓ1-penalized regression (glmnet::cv.glmnet) over 10 RNG seeds, keeping the top 30% of coefficients per run (default) and edges seen in at least half the runs, summarized by median coefficient.
- Eight independent shotgun metagenomic cohorts used as simulation templates, plus eight independent human gut datasets used for the three-species application example · human gut (use-case datasets); template cohort host not stated · n = 8 cohorts (n=347 to n=1084) for simulation; 8 gut datasets for the use case · 10.57745/HJLWW4 (use-case data and code)
- Simulated microbiome abundance datasets with known interaction networks, generated to resemble each real cohort, for parameter and performance evaluation · simulated (modeled on shotgun metagenomic cohorts) · n = n=50 and n=100 to n=1000 samples · 10.57745/UPITJ0 (performance data and code)
- Methods & tools
- NeighborFinder (R package: apply_neighborfinder, get_count_table, cvglm_to_coeffs_by_object), glmnet::cv.glmnet (cross-validated ℓ1-penalized regression), mclr normalization, SPIEC-EASI, Shotgun metagenomic sequencing
- Code
- https://github.com/metagenopolis/NeighborFinderhttps://metagenopolis.github.io/NeighborFinder/articles/NeighborFinder_technical_report.htmlhttps://metagenopolis.github.io/NeighborFinder/articles/NeighborFinder_vignette.htmlhttps://doi.org/10.57745/UPITJ0https://doi.org/10.57745/HJLWW4
- Data & accessions
- https://doi.org/10.57745/UPITJ0https://doi.org/10.57745/HJLWW4
- Assay conditions & compute
- NeighborFinder runs in under 1 minute for up to 1 100 samples; in the application example, SPIEC-EASI with 4-core parallelization was 37 times slower than single-core NeighborFinder (execution times in Figure S3).
- Reproducibility gaps
- No software versions or environment files are given; cohort details, the simulation procedure and SPIEC-EASI settings appear only in Supplementary Material, not in the main text.
Limitations (5)
- Like other Graphical Gaussian Model-based approaches, the method assumes linear relationships, which may poorly capture interaction types such as amensalism or parasitism. · stated by the authors
- Relatively few negative edges are detected (as with global methods), limiting the ability to flag putative competition or inhibition between taxa. · stated by the authors
- Because environment is not modeled explicitly, some edges may reflect taxonomic relatedness or shared habitat rather than interaction, e.g. B. dentium and Streptococcus anginosus both living in the oral cavity. · stated by the authors
- Real-data evaluation lacks ground truth: SPIEC-EASI missing 6 of 9 edges is read as lower power, but NeighborFinder false positives are not ruled out, and edge interpretations rest on literature rather than experimental validation. · noted in this summary
- The main text reports no simulation benchmark against global methods such as SPIEC-EASI, so relative accuracy (not just speed) versus existing tools cannot be judged from the text. · noted in this summary
Read this if you study a specific gut microbe (pathogen, probiotic or symbiont) and want a fast, species-centered alternative to full co-abundance network inference such as SPIEC-EASI on large metagenomic cohorts.
- Citations
- 0
- FWCI
- 2.08
- Field percentile
- top 10%
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- OneNet -- One network to rule them all: consensus network inference from microbiome data
Camille Champion, Raphaëlle Momal, … Magali Berland·PLoS Computational BiologyPeer-reviewed·Dec 6, 2024
- PhyMapNet: A Phylogeny-Guided Bayesian Framework for Reliable Microbiome Network Inference
Maryam Shahdoust, Rosa Aghdam, Golnaz Taheri·bioRxiv·Feb 25, 2026
- CMiNet: An R Package and User-Friendly Shiny App for Constructing Consensus Microbiome Networks
Rosa Aghdam, Claudia Solís‐Lemus·Methods in Ecology and EvolutionPeer-reviewed·Nov 24, 2025
- MAGMA: inference of sparse microbial association networks
Arnaud Cougoul, Xavier Bailly, Ernst C. Wit·bioRxiv·Feb 1, 2019
- Mapping the ecological networks of microbial communities
Y. Xiao, M. T. Angulo, … Y.-Y. Liu·bioRxiv·Oct 26, 2017
- A resource for the comparison and integration of heterogeneous microbiome networks
Zhenjun Hu, Dileep Kishore, … Daniel Segrè·bioRxiv·Aug 7, 2022