mashr: Multivariate Adaptive Shrinkage in R
Welcome to mashr! This package implements methods to estimate and test many effects in many conditions (or many effects on many outcomes).
The methods use Empirical Bayes methods to estimate patterns of similarity among conditions, and then exploit those patterns of similarity among conditions to improve accuracy of effect estimates. See Urbut et al for details of the model and methods.
Note that this R package is a refactoring of the code originally used to create results for the paper. The original package code is here.
Follow the setup instructions below.
See the Introductory Vignette for an introduction to mashr.
Please follow these steps to install the latest version of the mashr package:
In R, install these three R packages from CRAN:
Optionally, install the package used for memory profiling:
Optionally, install MOSEK and the Rmosek package, for faster optimization in the
ashrpackage. See the ashr Github repository for details.
Once you have installed all these packages, you can install and load the latest release of the
library(devtools) install_github("email@example.com") library(mashr)
This command should automatically retrieve and install the
ashrpackage from Github. If it does not, install ashr separately using devtools:
Alternatively, if you have cloned the repository locally, you can install the package by following these steps:
R CMD build mashr R CMD INSTALL mashr_0.2-6.tar.gz
When any changes are made to
roxygen2markup or the C++ code in the src directory, simply run
devtools::document()to update the RcppExports.cpp, the package namespaces (see NAMESPACE), and the package documentation files (in the man directory),
These are the R commands to build the website (make sure you are connected to Internet while running these commands):
library(pkgdown) build_site(mathjax = FALSE)
If the data or code in this repository are useful for your research project, please cite our preprint:
S M Urbut, G Wang, M Stephens. Flexible statistical methods for estimating and testing effects in genomic studies with multiple conditions. bioRxiv doi:10.1101/096552.