Exploring Thematic Structure and Predicted Functionality of 16s rRNA Amplicon Data

A means to explore the structure of 16S rRNA surveys using a Structural Topic Model coupled with functional prediction. The user provides an abundance table, sample metadata, and taxonomy information, and themetagenomics infers associations between topics and sample features, as well as topics and predicted functional content. Functional prediction can be accomplished via Tax4Fun (for Silva references) and PICRUSt (for GreenGeenes references). See .

Build Status codecov CRAN_Status_Badge


themetagenomics provides functions to explore topics generated from 16S rRNA sequencing information on both the abundance and functional levels. It also provides an R implementation of PICRUSt and wraps Tax4fun, giving users a choice for their functional prediction strategy.

Relevant Software and Literature

Stephen Woloszynek, Joshua Chang Mell, Gideon Simpson, and Gail Rosen. Exploring thematic structure in 16S rRNA marker gene surveys. 2017. bioRxiv 146126; doi: https://doi.org/10.1101/146126

Stephen Woloszynek, Zhengqiao Zhao, Gideon Simpson, Joshua Chang Mell, and Gail Rosen. Gauging the use of topic models as a means to understand microbiome data structure. TBD, 2017

Margaret E. Roberts, Brandon M. Stewart, and Dustin Tingley (2017). stm: R Package for Structural Topic Models, 2016.

Morgan Langille et al. Predictive functional profiling of microbial communities using 16S rRNA marker gene sequences. PICRUSt 1.1.1

Kathrin P. Aßhauer, Bernd Wemheuer, Rolf Daniel, and Peter Meinicke. Tax4Fun: predicting functional profiles from metagenomic 16S rRNA data

Stan Development Team. 2016. RStan: the R interface to Stan. R package version 2.14.1., 2017.


# To install the developmental version via Github:
# install.packages('devtools')


For future feature requests or suggestions, request an issue:



Themetagenomics 0.1.0

  • First release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.2 by Stephen Woloszynek, a year ago


Report a bug at http://github.com/EESI/themetagenomics/issues

Browse source code at https://github.com/cran/themetagenomics

Authors: Stephen Woloszynek [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports ggplot2, lda, lme4, Matrix, plotly, rstan, scales, shiny, stats, stats4, stm

Depends on Rcpp

Suggests assertthat, covr, huge, igraph, inline, knitr, networkD3, proxy, rmarkdown, RcppArmadillo, Rtsne, testthat, vegan, viridis

Linking to Rcpp

See at CRAN