mkoslovsky / MicroBVS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In this folder you'll find code for the R package MicroBVS found in:

“MicroBVS: Dirichlet-Tree Multinomial Regression Models with Bayesian Variable Selection - an R Package” (Accepted by BMC Bioinformatics 2020), by MD Koslovsky and M Vannucci

The main functions operate in C++ via the R package Rcpp. These functions can be sourced by a set of wrapper functions that enable easy implementation of the code in the R environment. Various functions are available that produce, summarize, and plot the results for inference.  

This package relies on various R packages that need to be installed in the R environment before running. To install, use the install.packages(‘’) command for the following packages:
Rcpp 
RcppArmadillo  
MCMCpack
mvtnorm 
ggplot2
devtools
ape
igraph

Then to install the MicroBVS package, simply run 

library(devtools)
install_github( "mkoslovsky/MicroBVS", build_vignettes = TRUE)

in the R console. 

Additionally in this folder, you will find code for 

"A Bayesian model of microbiome data for simultaneous identification of covariate associations and prediction of phenotypic outcomes" (Accepted by AOAS) by MD Koslovsky, KL Hoffman, CR Daniel and M Vannucci

As of 9/6/23, this version of the joint model corrects the update of the auxiliary parameters c_ij in the original version. Specifically, the previous Gibbs update has been replaced with a MH update. Following this change, the selection, fit, and prediction performance of the model is largely unaffected. However, the computation time does increase with the new sampler. To speed up the sampler, we also implemented a `full` version that updates the regression coefficients and variance term in the linear portion of model. Computationally, this step actually speeds up the sampler as the likelihood component in the revised MH update is greatly simplified. Additionally, we provide functionality to only update a proportion of c_ij in each iteration with a 'rate' parameter, which ranges from 0 to 1, following Cassese et al 2014. In simulation, we found that setting rate to 0.50 or above typically gave comparable results. Please reach out to the corresponding author for more details. 


Lastly, you will also find code for

"A Bayesian joint model for compositional mediation effect selection in microbiome data" by J Fu, MD Koslovsky, AM Neophytou, M Vannucci published in Statistics in Medicine.
This function provides options to cut the feedback from the outcome model to the DM portion of the model as presented in the original manuscript, or incorporate potential feedback, similar to the joint model above.

Please see the accommpanying vignettes for details of how to run each model and perform inference. 




References: 
Cassese, A., Guindani, M., Tadesse, M. G., Falciani, F. and Vannucci, M. (2014). A
hierarchical Bayesian model for inference of copy number variants and their association
to gene expression. The Annals of Applied Statistics 8 148.

About

License:Other


Languages

Language:C++ 62.7%Language:R 37.3%