NeighborFinder is an R package enabling the identification of the local neighborhood of a species of interest, based on microbiome data.
Using cross-validated multiple linear regression with ℓ1 penalty and microbiome-specific filters, our approach infers interpretable species-centered interactions, with F1 score ≥ 0.95 on simulated datasets ranging from 250 to 1000 samples.
From several abundance tables of metagenomic data, NeighborFinder suggests a shortlist of companion species based on the integration of results. A visualization via a network is proposed.
NeighborFinder is tailored to microbiome data. It was specifically developed for shotgun metagenomic data and includes a default normalization step for such datasets, but can accommodate metabarcoding data (and other count-based inputs) by skipping it.
You can install the latest NeighborFinder version from the public github repo
if (!requireNamespace('remotes')) {
install.packages("remotes")
}
remotes::install_github('metagenopolis/NeighborFinder')Note that this R package depends on versions >= 3.5.0 and was recently tested on R 4.4.1.
The main input of apply_neighborfinder() is an abundance table with
species as rows and samples as columns. For more details, see section
“Input dataframe format” in the Tech
report. For an
illustrated example, please refer to the
vignette.
The output is an edge table in tibble format, i.e. a table with 3
columns: node1, node2, and coef. This table gathers the potential
neighbors of a species of interest found with apply_neighborfinder().
With this output, a network can be created with visualize_network().
The vignette provides an overview of the various use cases of NeighborFinder through examples based on real data extracted from this repository.
