Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum version of susieR? #41

Closed
jdblischak opened this issue Apr 8, 2021 · 5 comments
Closed

Minimum version of susieR? #41

jdblischak opened this issue Apr 8, 2021 · 5 comments

Comments

@jdblischak
Copy link
Contributor

In the past I was able to use susieR 0.8.0 with the vignette example, but now I no longer can. I started trying to fix this, but realized this may not be worth the effort since 0.9.0 has already been released and the latest development version is 0.10.1.

There is currently code to choose between susie_bhat() and susie_suff_stat():

echolocatoR/R/SUSIE.R

Lines 134 to 143 in b055ac0

# library(susieR)
# SUSIE's authors "merge[d] susie_ss and susie_bhat to susie_suff_stat" in 11/2019.
susie_version <- utils::packageVersion("susieR")
if(length(find("susie_bhat"))==0){
printer("+ SUSIE:: Using `susie_suff_stat()` from susieR",paste0("v",susie_version),v=verbose)
susie_func <- get("susie_suff_stat", asNamespace("susieR"))
} else {
printer("+ SUSIE:: Using `susie_bhat()` from susieR",paste0("v",susie_version),v=verbose)
susie_func <- get("susie_bhat", asNamespace("susieR"))
}

This didn't work for me. find("susie_bhat") fails to find the function in susieR 0.8.0, and then the function fails when it tries to get() the non-existent susie_suff_stat(). I fixed this issue in this commit on my fork, but then I got another error:

[1] "+ SUSIE:: Using `susie_bhat()` from susieR v0.8.0"
Error in susie_ss(XtX = XtX, Xty = Xty, yty = var_y * (n - 1), n = n,  :
  unused argument (maf = c(0.0263, 0.2447, 0.0326, 0.0326, 0.0111, 0.0327, 0.0308, 0.1286, 0.0327, 0.0326, 0.0322, 0.0322, 0.2005, 0.0324, 0.0322, 0.1284, 0.0322, 0.0316, 0.1563, 0.0323, 0.0316, 0.0114, 0.0301, 0.4474, 0.0308, 0.0321, 0.0321, 0.1286, 0.4443, 0.0321, 0.0321, 0.0321, 0.0321, 0.0321, 0.0321, 0.0854, 0.0852, 0.0321, 0.0321, 0.0321, 0.0316, 0.0321, 0.0321, 0.0857, 0.0835, 0.0321, 0.0321, 0.0311, 0.0264, 0.0321, 0.0264, 0.0317, 0.0233, 0.0135999999999999, 0.0321, 0.0552, 0.2245, 0.0322, 0.026, 0.202,
0.0148, 0.131, 0.0329, 0.0774, 0.447, 0.2376, 0.2376, 0.4471, 0.1325, 0.0837, 0.083, 0.1634, 0.4455, 0.2463, 0.1633, 0.1308, 0.1364, 0.033, 0.2089, 0.308, 0.1979, 0.0301, 0.0807, 0.2432, 0.1303, 0.1366, 0.0583, 0.2108, 0.0372, 0.1219, 0.0714, 0.2422, 0.2267, 0.2271, 0.0284, 0.2269, 0.1996, 0.0288, 0.259, 0.4359, 0.0282, 0.436, 0.0368000000000001, 0.2086, 0.1985, 0.0145, 0.1991, 0.1995, 0.1993, 0.2274, 0.1909, 0.2105, 0.0266999999999999, 0.0123, 0.0278))

susie_suff_stat() has the argument maf, but susie_bhat() and susie_ss() don't:

args(susieR::susie_ss)
function (XtX, Xty, yty, n, L = 10, scaled_prior_variance = 0.2,
    residual_variance = NULL, estimate_residual_variance = TRUE,
    estimate_prior_variance = TRUE, estimate_prior_method = c("optim",
        "EM"), r_tol = 1e-08, prior_weights = NULL, null_weight = NULL,
    standardize = TRUE, max_iter = 100, s_init = NULL, intercept_value = 0,
    coverage = 0.95, min_abs_corr = 0.5, tol = 0.001, verbose = FALSE,
    track_fit = FALSE, check_input = FALSE)
NULL

args(susieR::susie_bhat)
function (bhat, shat, R, n, var_y = 1, ...)
NULL

What are your thoughts? Do you want to try to fix this to support susieR 0.8.0, or require a minimum of 0.9.0?

@bschilder
Copy link
Member

bschilder commented Apr 10, 2021

Hi @jdblischak, thanks so much for catching this and giving the detailed explanation. I think it's probably best to just make 0.9.0 the minimum required version, esp it simplifies things when checking for required/suggested columns.

I've just specified this in the DESCRIPTION:

...
    snpStats,
    susieR (>= 0.9.0)
Remotes:
  github::stephenslab/susieR
...

Now in the dev branch and will merge after some other fixes.

@jdblischak
Copy link
Contributor Author

Sounds good. Thanks!

Also FYI that last week I created conda binaires for susieR 0.9.0 for anyone that wants to install susieR via conda.

@bschilder
Copy link
Member

That's amazing, @jdblischak ! I'll add it to the echoR conda yaml.

@bschilder
Copy link
Member

@jdblischak I also just came across this implementation of susieR. Not sure how different it is from yours but it seems to have have (dev?) versions 0.9.0 and 0.10.0

@jdblischak
Copy link
Contributor Author

Not sure how different it is from yours but it seems to have have (dev?) versions 0.9.0 and 0.10.0

Those conda binaries were created by Abhishek, a postdoc in the Stephens lab. He built them directly off the master branch, which is presumably why he added "dev" to the version.

https://github.com/aksarkar/my-conda-recipes/blob/master/r-susier/meta.yaml

I was going to request that they tag/release a more recent version of susieR on GitHub, but in the meantime, they submitted susieR to CRAN. So I added it to conda-forge. See PR #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants