Recent update breaks flashr::flash call
gaow opened this issue · 3 comments
gaow commented
Using version 0.1.32, and the flash documentation example
library(flashr)
set.seed(1) # for reproducibility
ftrue = matrix(rnorm(200), ncol=2)
ltrue = matrix(rnorm(40), ncol=2)
ltrue[1:10, 1] = 0 # set up some sparsity
ltrue[11:20, 2] = 0
Y = ltrue %*% t(ftrue) + rnorm(2000) # set up a simulated matrix
f = flash(Y)
I get:
Error in (function (f, p, ..., hessian = FALSE, typsize = rep(1, length(p)), :
missing value in parameter
Earlier version, 0.1.24 for example, works fine for the flash
call.
pcarbo commented
@gaow @willwerscheid I'm not sure what the solution is here, but the issue is that you are calling ebnm_pn
with ebnm_param$g$pi = c(1,0)
, which doesn't make much sense. If I set ebnm_param$g$pi = c(0.9999,0.0001)
instead it works fine.
For the record, the error occurs in this line in function flashr::calc_update_vals
:
a = do.call(ebnm_fn, list(ebnm_args$x, ebnm_args$s, ebnm_param))
willwerscheid commented
Hi @gaow , your code now works with the latest versions of flashr and ebnm. I will close this issue but can you please confirm? Thanks!
gaow commented
@willwerscheid I confirm it works for my case. Thanks!