stephenslab/mashr

An R package for multivariate adaptive shrinkage.
R C++
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
 Failed to load latest commit information. R Jul 1, 2018 docs May 29, 2018 inst/code Mar 1, 2018 man Jun 14, 2018 src Apr 14, 2018 tests Jul 1, 2018 vignettes May 29, 2018 .Rbuildignore Jun 13, 2018 .gitignore Jun 16, 2017 .travis.yml Jun 22, 2017 DESCRIPTION Jul 1, 2018 LICENSE May 31, 2017 NAMESPACE Mar 1, 2018 README.md May 29, 2018 _pkgdown.yaml May 29, 2018 appveyor.yml Jun 21, 2017 mashr.Rproj May 26, 2018

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.

Quick Start

1. Follow the setup instructions below.

2. See the Introductory Vignette for an introduction to mashr.

3. Then work through the other vignettes to learn more about mashr: Introduction to mash: data-driven covariances and Simulation with non-canonical matrices.

Setup

1. In R, install these three R packages from CRAN:

install.packages(c("assertthat","mvtnorm","rmeta"))
2. Optionally, install the package used for memory profiling:

install.packages("profmem")
3. Optionally, install MOSEK and the Rmosek package, for faster optimization in the ashr package. See the ashr Github repository for details.

4. Install the ExtremeDeconvolution R package. Note that you will need to link to the GNU Scientific Library to build this package.

5. Once you have installed all these packages, you can install and load the latest release of the mashr package:

library(devtools)
install_github("stephenslab/mashr@v0.2-6")
library(mashr)

This command should automatically retrieve and install the ashr package from Github. If it does not, install ashr separately using devtools:

library(devtools)
install_github("stephens999/ashr")

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


Developer notes

• When any changes are made to roxygen2 markup 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)

Citation

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.