stephenslab / mashr

An R package for multivariate adaptive shrinkage.
https://stephenslab.github.io/mashr
Other
88 stars 19 forks source link

new mashr cov_flash() use flashier package #114

Open arkyl opened 1 year ago

arkyl commented 1 year ago

Hi, I dowloaded the recent mashr and found that the cov_flash() now seems to use flashier package instead of flashr package. This is not mentioned in the tutorial (https://stephenslab.github.io/mashr/articles/flash_mash.html).

The new cov_flash() which uses flashier also seems to have problem dealing with NA in the data. It gave the error of "Error in if (any(s == 0)) { : missing value where TRUE/FALSE needed ... In handle_standard_errors(x, s) : Nonpositive SEs have been replaced by small positive SEs." When the NA was removed, it ran through. The old mashr cov_flash() which uses flashr didn't have this problem.

This is not an issue for me now. But I thought you guys might want to know this. Thanks!

Yue

pcarbo commented 1 year ago

@arkyl Correct, we have switched from flashr to flashier. (Apologies for the confusion—we have not updated that tutorial.)

Thank you for raising this issue; we will keep this issue open as a reminder to address it.

yoakiyama commented 1 year ago

Hi @pcarbo,

I'm trying to follow that tutorial, but I get the following error: Error in cov_flash(data_all.strong) : cov_flash requires package flashier

Could you point me to instructions for installing flashier? I have installed flashr

pcarbo commented 1 year ago

@yoakiyama Please go here: https://github.com/willwerscheid/flashier

yoakiyama commented 1 year ago

When I install the latest versions of mashr and flashier, I get an error related to the function name changes in flashier. This line https://github.com/stephenslab/mashr/blob/master/R/data2cov.R#L117 in mashr uses flash.init rather than flash_init. Are there specific versions of mashr and flashier I should use? Thank you for your quick response!

pcarbo commented 1 year ago

@yoakiyama Indeed the latest updates to flashier have broken this mashr function. I've asked the author of flashier to suggest a fix.

pcarbo commented 1 year ago

@yoakiyama This issue should now be addressed with the latest versions of mashr and flashier on GitHub. If not, please let us know.

yoakiyama commented 1 year ago

@pcarbo Thank you for solving the issues and for notifying me. It seems to be working now!