Learn R Programming

FAVA

The FAVA R package implements the statistic FAVA, an FST-based Assessment of Variability across vectors of relative Abundances, as well as a suite of helper functions which enable the visualization and statistical analysis of relative abundance data. The FAVA R package accompanies the paper, “Quantifying compositional variability in microbial communities with FAVA” by Morrison et al. (2025).

The FAVA R package includes the following core functions:

  • fava: Quantify variability across many compositional vectors in a single, normalized index, called FAVA

  • bootstrap_fava: Compare values of FAVA between pairs of abundance matrices

  • window_fava: Compute FAVA in sliding windows along the rows of a relative abundance matrix

  • plot_relabund: Visualize a relative abundance matrix as a stacked bar plot

Installation

Install FAVA with:

install.packages("FAVA")

You can install the development version of FAVA from GitHub with:

# First, install devtools if you haven't already:
# install.packages("devtools")

devtools::install_github("MaikeMorrison/FAVA")

# If you wish to access the tutorial (also accessible below) from within
# the package:

devtools::install_github("MaikeMorrison/FAVA", build_vignettes = TRUE)

Tutorial

The package website, maikemorrison.github.io/FAVA/, contains documentation and examples for all package functions. It also contains a tutorial on the usage of FAVA for the analysis of microbiome data. The tutorial vignette is available at this link.

Copy Link

Version

Install

install.packages('FAVA')

Monthly Downloads

164

Version

1.0.9

License

MIT + file LICENSE

Maintainer

Maike Morrison

Last Published

March 27th, 2025

Functions in FAVA (1.0.9)

xue_species_tree

Phylogenetic tree for the species included in xue_microbiome_sample
window_list

Generate sliding windows of specified length given the maximum number of samples
window_plot

Generate a plot of FAVA in sliding windows.
gini_simpson_mean

Compute the mean Gini-Simpson index of the rows in a matrix of compositional vectors
time_weights

Compute a normalized weighting vector based on a vector of sampling times.
bootstrap_fava

Statistically compare FAVA values between pairs of relative abundance matrices.
gini_simpson_pooled

Compute the pooled Gini-Simpson index of the rows in a matrix of compositional vectors
plot_relabund

Visualize a relative abundance matrix as a stacked bar plot.
relab_phyloseq

Generate a relative abundance matrix with sample metadata and OTU abundances from a phyloseq object.
window_fava

Compute FAVA in sliding windows.
gini_simpson

Compute the Gini-Simpson index of a compositional vector
xue_species_similarity

Species similarity matrix for the species included in xue_microbiome_sample
fava

Compute the Fst of a matrix of compositional vectors
fava_norm

Compute the normalized Fst of a matrix of compositional vectors
xue_microbiome_sample

Temporal microbiome composition data
xue_species_info

Table of species information