Skip to content

Commit

Permalink
Moved mixsqp from Suggests to Imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarbo committed Mar 11, 2019
1 parent 1bc45ca commit 78b4af4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: mashr
Type: Package
Encoding: UTF-8
Title: Multivariate Adaptive Shrinkage
Version: 0.2.20.0583
Version: 0.2.20.0584
Date: 2019-02-11
Authors@R: c(person("Matthew","Stephens",role=c("aut","cre"),
email="[email protected]"),
Expand All @@ -27,15 +27,15 @@ Imports:
rmeta,
Rcpp (>= 0.12.11),
mvtnorm,
abind
abind,
mixsqp
LinkingTo:
Rcpp,
RcppArmadillo,
RcppGSL
Suggests:
MASS,
REBayes,
mixsqp,
flashr,
corrplot,
testthat,
Expand Down
11 changes: 2 additions & 9 deletions R/opt.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ optimize_pi = function(matrix_lik, pi_init = NULL,
if (optmethod == "mixIP")
if (!requireNamespace("REBayes",quietly = TRUE)) {
warning(paste("optmethod = \"mixIP\" requires REBayes package;",
"switching to optmethod = \"mixEM\""))
optmethod <- "mixEM"
"switching to optmethod = \"mixSQP\""))
optmethod <- "mixSQP"
}

if (optmethod == "mixSQP")
if (!requireNamespace("mixsqp",quietly = TRUE)) {
warning(paste("optmethod = \"mixSQP\" requires mixsqp package;",
"switching to optmethod = \"mixEM\""))
optmethod <- "mixEM"
}

if(optmethod == "mixIP"){control = ashr:::set_control_mixIP(control)
}else if(optmethod == 'mixEM' || optmethod == 'cxxMixSquarem'){
control = ashr:::set_control_squarem(control, nrow(matrix_lik))
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ repository useful for your work, please cite:

Please follow these steps to install mashr.

1. Unlike most packages available on CRAN, mashr is not precompiled;
therefore, you will need to make sure that your R installation is
properly set up to compile packages with C++ source; in particular,
the C++ compiler programs supported by your version of R should be
installed on your computer, and R should be correctly configured to
call these compilers. See the [CRAN documentation][cran-docs]
for more information.
1. Unlike most packages available on CRAN, mashr is not precompiled,
and therefore to install mashr you will need to make sure that your
R installation is properly set up to compile packages with C++
source; in particular, the C++ compiler programs supported by your
version of R should be installed on your computer, and R should be
correctly configured to call these compilers when installing
packages from source. For more information, see the
[CRAN documentation][cran-docs].

2. Install the [latest release][mashr-release-latest] of the mashr
package using [devtools][devtools]:
Expand All @@ -58,15 +59,20 @@ Please follow these steps to install mashr.
devtools::install_github("stephenslab/mashr")
```

This command should have automatically retrieved and installed the
latest version of the ashr package from Github. If it did not, you
can install the ashr package separately using devtools:
This command should automatically install any missing dependencies
that are available from CRAN. This command should also
automatically retrieve and install the latest version of the ashr
package from Github. If it does not, you can install the ashr
package separately using devtools:

```R
devtools::install_github("stephens999/ashr")
```

3. Several additional packages are needed to build vignettes:
3. By default, the `devtools::install_github` function does not build
the vignettes. If you would like to build the vignettes, you will
need to several additional packages, including [flashr][flashr],
that are used only in the vignettes:

```R
install.packages(c("kableExtra","corrplot"))
Expand Down

0 comments on commit 78b4af4

Please sign in to comment.