Skip to content

gzahn/Fidelity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fidelity

hex_sticker

The goal of Fidelity is to provide a user-friendly tool to quantify and compare the host specificity of microbial communities. Our method is a three step analysis that integrates the Indicator Species Analysis (ISA) with a Community Weighted Mean (CWM) analysis. First, a specificity value is assigned to each taxon through the ISA. Second, a threshold is established for removing rare taxa. Third, community level indices are generated through a CWM analysis using all taxa that meet the rare taxa threshold. The resulting indices can be used to compare the specificity of microbial communities associated with certain hosts or groups (i.e. treatments, environments) in a data set.

Installation:

if (!requireNamespace("remotes", quietly = TRUE)) {
    install.packages("remotes")
}

remotes::install_github("gzahn/Fidelity", upgrade = "never", dependencies = TRUE)

Requirements

Depends on:

  • tidyverse >= 2.0.0
  • future >= 1.33.2
  • future.apply >= 1.11.2

Citation

DOI

Geoffrey Zahn, & Abigail Sievers Neat. (2025). gzahn/Fidelity: Initial release (Version v1.0) [Computer software]. Zenodo. https://doi.org/10.5281/ZENODO.17351658

Example usage

For a thorough walkthrough, see the tutorial

# load Fidelity
library(Fidelity)

# LOAD DATA ####
otu <- readRDS(system.file("extdata", "soils_otu_low_24.rds", package = "Fidelity"))
groups <- readRDS(system.file("extdata", "soils_env_low_24.rds", package = "Fidelity"))[["species"]]
ps <- readRDS(system.file("extdata", "example_physeq.RDS", package = "Fidelity"))

# USE FUNCTION ####
out <- Fidelity(comm = otu,
                groups = groups,
                seed = 123,
                n.perm = 999,
                pval.cutoff = 0.05,
                max.ratio = 0,
                ovp.plot = TRUE,
                rm.rare.taxa = TRUE,
                allow.pa = FALSE)

# EXAMINE OUTPUT ####
out$community_index
out$taxon_index
out$isa_results
out$process_summary
out$removed_taxa

# USE FUNCTION COMPATIBLE WITH PHYLOSEQ OBJECTS####
out_ps <- Fidelity_physeq(ps,
                groups,
                seed = 123,
                n.perm = 999,
                pval.cutoff = 0.05,
                max.ratio = 0,
                ovp.plot = TRUE,
                rm.rare.taxa = TRUE,
                allow.pa = FALSE)

# EXAMINE OUTPUT ####
out_ps$community_index
out_ps$taxon_index
out_ps$isa_results
out_ps$process_summary
out_ps$removed_taxa


Detailed description of methods

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages