R package for Empirical Bayes Factor Analysis.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
docs
man
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
README.md
_pkgdown.yaml
appveyor.yml
flashr.Rproj

README.md

flashr: Empirical Bayes Factor Analysis in R

Travis Build Status Appveyor Build status codecov

Methods for matrix factorization based on Empirical Bayes Matrix Factorization. The name of the package, "flashr," comes from "Factors and Loadings by Adaptive SHrinkage in R".

Note: This code is in development. The interface is fairly stable but not guaranteed to stay the same.

License

Copyright (c) 2017-2018, Matthew Stephens and Wei Wang.

All source code and software in this repository are made available under the terms of the BSD 3-Clause License. See the LICENSE file for the full text of the license.

Citing this work

If you find that this R package is useful for your work, please cite our paper:

W. Wang and M. Stephens, 2018. Empirical Bayes matrix factorization. arXiv:1802.06931.

Quick start

Follow these steps to quickly get started using flashr.

  1. Install the latest release of the flashr package using devtools. Please note that it can take several minutes to build the vignettes:

    install.packages("devtools")
    library(devtools)
    install_github("stephenslab/flashr@v0.5-6",build_vignettes = TRUE)

    This command should automatically retrieve and install the ashr and ebnm packages from GitHub (and possibly other packages). If it does not, install ashr and ebnm separately using devtools:

    install_github("stephens999/ashr")
    install_github("stephenslab/ebnm")

    Note: If you are interested in attempting to reproduce the results in the Wang and Stephens (2018) manuscript, the flashr release that most closely matches the package used in the paper is version 0.4-10. This release can be installed by running the following in R:

    install_github("stephenslab/flashr@v0.4-10")
  2. Optionally, install MOSEK and the Rmosek package, for faster model fitting. See the ashr GitHub repository for details.

  3. Run a few toy examples illustrating the flash function:

    example("flash")
  4. Explore the introductory flashr vignette:

    vignette("flash_intro")
  5. Explore the vignette illustrating some more advanced features of flashr:

    vignette("flash_advanced")
  6. See the online documentation to learn more about the flashr package.

Developer notes

  • Run pkgdown::build_site(mathjax = FALSE) in R to build the website using pkgdown. Make sure you are connected to the Internet while running these commands.

Credits

This software was developed by Matthew Stephens, Wei Wang, Jason Willwerscheid and Peter Carbonetto at the University of Chicago.