Package: mashr 0.2.81

Peter Carbonetto

mashr: Multivariate Adaptive Shrinkage

Implements the multivariate adaptive shrinkage (mash) method of Urbut et al (2019) <doi:10.1038/s41588-018-0268-8> for estimating and testing large numbers of effects in many conditions (or many outcomes). Mash takes an empirical Bayes approach to testing and effect estimation; it estimates patterns of similarity among conditions, then exploits these patterns to improve accuracy of the effect estimates. The core linear algebra is implemented in C++ for fast model fitting and posterior computation.

Authors:Matthew Stephens [aut], Sarah Urbut [aut], Gao Wang [aut], Yuxin Zou [aut], Yunqi Yang [ctb], Sam Roweis [cph], David Hogg [cph], Jo Bovy [cph], Peter Carbonetto [aut, cre]

mashr_0.2.81.tar.gz
mashr_0.2.81.zip(r-4.7)mashr_0.2.81.zip(r-4.6)mashr_0.2.81.zip(r-4.5)
mashr_0.2.81.tgz(r-4.6-x86_64)mashr_0.2.81.tgz(r-4.6-arm64)mashr_0.2.81.tgz(r-4.5-x86_64)mashr_0.2.81.tgz(r-4.5-arm64)
mashr_0.2.81.tar.gz(r-4.7-arm64)mashr_0.2.81.tar.gz(r-4.7-x86_64)mashr_0.2.81.tar.gz(r-4.6-arm64)mashr_0.2.81.tar.gz(r-4.6-x86_64)
mashr_0.2.81.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
mashr/json (API)

# Install 'mashr' in R:
install.packages('mashr', repos = c('https://stephenslab.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/stephenslab/mashr/issues

Uses libs:
  • openblas– Optimized BLAS
  • gsl– GNU Scientific Library (GSL)
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

openblasgslcppopenmp

11.40 score 99 stars 4 packages 846 scripts 1.2k downloads 6 mentions 29 exports 18 dependencies

Last updated from:cd086f7eaa. Checks:11 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE265
linux-devel-x86_64NOTE307
source / vignettesOK484
linux-release-arm64NOTE281
linux-release-x86_64NOTE310
macos-release-arm64NOTE136
macos-release-x86_64NOTE269
macos-oldrel-arm64NOTE126
macos-oldrel-x86_64NOTE425
windows-develNOTE237
windows-releaseNOTE216
windows-oldrelNOTE214
wasm-releaseOK274

Exports:contrast_matrixcov_canonicalcov_edcov_flashcov_pcacov_udiestimate_null_correlation_simpleextreme_deconvolutionget_estimated_piget_log10bfget_n_significant_conditionsget_pairwise_sharingget_pairwise_sharing_from_samplesget_posterior_condition_wise_summaryget_samplesget_significant_resultsmashmash_1by1mash_compute_loglikmash_compute_posterior_matricesmash_compute_vloglikmash_estimate_corr_emmash_plot_metamash_set_datamash_update_datasim_contrast1sim_contrast2simple_simssimple_sims2

Dependencies:abindashrassertthatetrunctinvgammairlbalatticeMatrixmixsqpmvtnormplyrRcppRcppArmadilloRcppGSLrmetasoftImputeSQUAREMtruncnorm

Empirical Bayes matrix factorization for data driven prior
Introduction | Dataset simulation | FLASH analysis | Finalize covariances | Fit mash model (estimate mixture proportions) | Compute posterior summaries

Last update: 2023-08-16
Started: 2018-09-21

Introduction to mashr
Goal | Outline | Simulate some data | Step 1: Read in the data | Step 2: Set up the covariance matrices | Step 3: fit the model | Step 4: Extract Posterior Summaries | Sharing | Measure of fit (log-likelihood) | Estimated mixture proportions | Metaplot | Session information.

Last update: 2022-12-07
Started: 2017-05-31

Accounting for correlations among measurements
Introduction | Method 1 | Method 2

Last update: 2022-12-07
Started: 2018-05-28

eQTL analysis outline
Introduction | Analysis strategy outline | Example | Correlation structure | Data driven covariances | Fit mash model (estimate mixture proportions) | Compute posterior summaries

Last update: 2022-12-07
Started: 2018-05-28

Sample from mash posteriors
Introduction | Fit mash model with samples from the posteriors | Pairwise sharing

Last update: 2022-01-21
Started: 2018-11-06

mashr with common baseline
Introduction | Illustration | The right way | The wrong way

Last update: 2021-05-19
Started: 2018-10-09

mashr with common baseline at mean
Introduction | Illustration

Last update: 2020-10-27
Started: 2020-10-27

Introduction to mash: data-driven covariances
Goal | Outline | Data-driven covariances | Step 1: select strong signals | Step 2: Obtain initial data-driven covariance matrices | Step 3: Apply Extreme Deconvolution | Run mash | Session information.

Last update: 2018-05-29
Started: 2017-05-31

Simulation with non-canonical matrices
Goal | Simple simulation

Last update: 2017-12-15
Started: 2017-05-31

Readme and manuals

Help Manual

Help pageTopics
Create contrast matrixcontrast_matrix
Compute a list of canonical covariance matricescov_canonical
Perform "extreme deconvolution" (Bovy et al) on a subset of the datacov_ed
Perform Empirical Bayes Matrix Factorization using flashier, and return a list of candidate covariance matricescov_flash
Perform PCA on data and return list of candidate covariance matricescov_pca
Compute a list of covariance matrices corresponding to the "Unassociated", "Directly associated" and "Indirectly associated" modelscov_udi
Estimate null correlations (simple)estimate_null_correlation_simple
Density estimation using Gaussian mixtures in the presence of noisy, heterogeneous and incomplete dataextreme_deconvolution
Return the estimated mixture proportionsget_estimated_pi
Return the Bayes Factor for each effectget_log10bf
Count number of conditions each effect is significant inget_n_significant_conditions
Compute the proportion of (significant) signals shared by magnitude in each pair of conditions, based on the poterior meanget_pairwise_sharing
Compute the proportion of (significant) signals shared by magnitude in each pair of conditionsget_pairwise_sharing_from_samples
Condition-wise Posterior Summaryget_posterior_condition_wise_summary
Return samples from a mash objectget_samples
Find effects that are significant in at least one conditionget_significant_results
Apply mash method to datamash
Perform condition-by-condition analysesmash_1by1
Compute loglikelihood for fitted mash object on new data.mash_compute_loglik
Compute posterior matrices for fitted mash object on new datamash_compute_posterior_matrices
Compute vector of loglikelihood for fitted mash object on new datamash_compute_vloglik
Fit mash model and estimate residual correlations using EM algorithmmash_estimate_corr_em
Plot metaplot for an effect based on posterior from mashmash_plot_meta
Create a data object for mash analysis.mash_set_data
Update the data object for mash analysis.mash_update_data
Create simplest simulation, cj = mu 1 data used for contrast analysissim_contrast1
Create simulation with signal data used for contrast analysis.sim_contrast2
Create some simple simulated data for testing purposessimple_sims
Create some more simple simulated data for testing purposessimple_sims2