BAnOCC
BAnOCC is a package for analyzing compositional covariance while accounting for the compositional structure. Briefly, the model assumes that the unobserved counts are log-normally distributed and then infers the correlation matrix of the log-basis (see the BAnOCC User Manual for a more detailed explanation). The inference is made using No U-Turn Sampling for Hamiltonian Monte Carlo (Hoffman and Gelman 2014) as implemented in the rstan
R package (Stan Development Team 2015).
For more information on the technical aspects:
User Manual || User Tutorial || Forum
Citation:
Emma Schwager, Himel Mallick, Steffen Ventz, Curtis Huttenhower
A Bayesian method for detecting pairwise associations in compositional data
Requirements
- R software (version >= 3.3)
- R package “rstan” (version >= 2.10.1)
- R package “coda” (version >= 0.18.1)
- R package “mvtnorm”
- R package “stringr”
Installation
There are three options for installing BAnOCC:
- Within R
- Using compressed file from bitbucket
- Directly from bitbucket
From Github (Directly)
Clone the repository using git clone
, which downloads the package as its own directory called banocc
.
git clone https://github.com/biobakery/banocc.git
Then, install BAnOCC’s dependencies. If these are already installed on your machine, this step can be skipped.
Rscript -e "install.packages(c('rstan', 'mvtnorm', 'coda', 'stringr'))"
Lastly, install BAnOCC using R CMD INSTALL
. This command should be run in the parent directory of banocc/
. Note that this will not automatically install the dependencies, so they must be installed first.
R CMD INSTALL banocc
References
Hoffman, Matthew D., and Andrew Gelman. 2014. “The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo.” J. Mach. Learn. Res. 15 (1). JMLR.org: 1593–1623. http://dl.acm.org/citation.cfm?id=2627435.2638586.
Stan Development Team. 2015. “Stan: A C++ Library for Probability and Sampling, Version 2.10.0.” http://mc-stan.org/.