Learn R Programming

breakaway

Understanding the drivers of microbial diversity is an important frontier of microbial ecology, and investigating the diversity of samples from microbial ecosystems is a common step in any microbiome analysis.

breakaway is the premier package for statistical analysis of microbial diversity. breakaway implements the latest and greatest estimates of richness, as well as the most commonly used estimates.

DivNet is a package by the breakaway authors for estimating Shannon diversity, and other diversity indices. breakaway focuses on richness while DivNet focuses on Shannon, Simpson, and other alpha diversities as well as some beta diversity indices. Check it out!

Citing breakaway

The R package breakaway implements a number of different richness estimates. Please cite the following if you use them:

  • breakaway() and kemp(): Willis, A. & Bunge, J. (2015). Estimating diversity via frequency ratios. Biometrics.
  • betta(): Willis, A., Bunge, J., & Whitman, T. (2017). Improved detection of changes in species richness in high diversity microbial communities. JRSS-C.
  • breakaway_nof1(): Willis, A. (2016+). Species richness estimation with high diversity but spurious singletons. arXiv.
  • objective_bayes_*(): Barger, K. & Bunge, J. (2010). Objective Bayesian estimation for the number of species. Bayesian Analysis.

Installation

You can install breakaway from github by running:

install.packages("devtools")
devtools::install_github("adw96/breakaway")

breakaway is actively maintained and continually expanding and developing its scope! Is there a method you would like to have implemented in breakaway? Submit a pull request or contact the maintainer!

Documentation

  • The best place to start is the vignettes.
  • Documentation for functions can be found here
  • A pdf of all documentation can be found in the breakaway-manual.pdf
  • We try to answer frequently asked questions on the wiki

Humans

Maintainer: Amy Willis

Authors: Amy Willis, John Bunge, Bryan Martin, Pauline Trinh, Kathryn Barger, David Clausen and Sarah Teichman.

Do you have a request for us? Let us know! We want folks to use breakaway and are committed to making it as easy to use as possible.

Do you have a question? Check out the above documentation list, then shoot us an email or open a Discussion. We receive a lot of emails from users, so we try to answer questions on the Wiki rather than responding to everyone individually.

Copy Link

Version

Install

install.packages('breakaway')

Monthly Downloads

468

Version

4.8.4

License

GPL-2

Maintainer

Amy D Willis

Last Published

November 22nd, 2022

Functions in breakaway (4.8.4)

F_test

Conduct F test of null hypothesis LB = 0 using output from betta() or betta_random()
alpha_estimate

alpha_estimate
betta

Modelling total diversity with betta
alpha_estimates

alpha_estimates
get_F_stat

Calculate F statistic under null hypothesis LB = 0 using output from betta() or betta_random()
apples

(Data) Frequency count table of soil microbes in an apples orchard.
good_turing

The Good-Turing estimate of species richness
chao_shen

The Chao-Shen estimate of Shannon diversity
objective_bayes_geometric

Estimate species richness with an objective Bayes method using a geometric model
sample_shannon_e

Plug-in Shannon's E ("Equitability")
betta_lincom

Confidence intervals and testing for linear combinations of fixed effects estimated via betta() or betta_random()
objective_bayes_mixedgeo

Objective Bayes species richness estimate with the mixed-geometric model
objective_bayes_poisson

Objective Bayes species richness estimate with the Poisson model
objective_bayes_negbin

Objective Bayes species richness estimate with the Negative Binomial model
chao1_bc

Bias-corrected Chao1 species richness estimator
sample_simpson

Plug-in Simpson diversity
pasolli_et_al

(Data) Data frame of covariate information about pasolli_et_al.
check_format

Run some basic checks on a possible frequency count table
rnbinomtable

Negative binomially distributed frequency count tables.
proportions_instead

OTU table to relative abundances
physeq_wrap

Wrapper for phyloseq objects
simulate_betta

Simulate from a fitted betta model
simulate_betta_random

Simulate from a fitted betta_random model
sample_richness

Sample richness estimator
true_simpson

Calculate the true Simpson index
sample_shannon

Plug-in Shannon diversity
chao_bunge

Chao-Bunge species richness estimator
%>%

Pipe operator
breakaway

Species richness estimation with breakaway
breakaway_nof1

species richness estimation without singletons
build_frequency_count_tables

Build frequency count tables from an OTU table
hawaii

(Data) Frequency count table of soil microbes in Hawaii.
wlrm_transformed

The transformed weighted linear regression estimator for species richness estimation
plot.alpha_estimates

Plot function for alpha_estimates class
test_submodel

Conduct F test of null hypothesis LB = 0 using output from betta() or betta_random()
soil_phylo

(Data) Data frame of soil data from whitman_et_al.
rztnbinomtable

beta version: Zero-truncated negative binomially distributed frequency count tables.
kemp

Species richness estimation with Kemp-type models
toy_metadata

(Data) Data frame of covariate information about toy_otu_table.
toy_otu_table

(Data) A toy OTU table.
chao1

Chao1 species richness estimator
true_inverse_simpson

Calculate the true Inverse Simpson index
true_hill

Calculate the true Hill numbers
wlrm_untransformed

The untransformed weighted linear regression estimator for species richness estimation
make_design_matrix

Make design matrix
true_shannon

Calculate the true Shannon index based on proportions
sample_inverse_simpson

Plug-in Inverse Simpson diversity
make_frequency_count_table

Draw frequency count subtables from an OTU table
poisson_model

PoissonModel
poisson_model_nof1

PoissonModelNof1
true_shannon_e

Calculate the true Shannon's equitability index
sample_size_estimate

Estimate the sample size needed to do an unpaired one-way test using betta
sample_size_figure

Plot the power obtained with sample size
true_gini

Calculate the true Gini-Simpson index
toy_taxonomy

(Data) The taxonomy of the OTUs in `toy_otu_table`.
convert

convert between different inputs for alpha-diversity estimates
betta_pic

function for plotting total diversity
betta_random

modelling total diversity with random effects
cutoff_wrap

Find a cut-off for estimates relying on contiguous counts