jean997 / cause

R package for CAUSE
https://jean997.github.io/cause/
52 stars 15 forks source link

est_cause_params error for cause_1.2.0.0320 #18

Closed Zhe-JJ-Wang closed 2 years ago

Zhe-JJ-Wang commented 3 years ago

Hi Jean,

I run into the error message 'Error in loglik_mat(rho, 0, 0, 0, mix_grid$S1, mix_grid$S2, X$beta_hat_1, :function 'Rcpp_precious_remove' not provided by package 'Rcpp'' when trying to calculate the nuisance parameters (params <- est_cause_params(X, varlist)).

This error only happens when using the lastest cause 'cause_1.2.0.0320', and it did not occur to me when using release version cause_1.2.0. But I switched to the development version as it included the p vals columns in the gwas_merge() function, which is really convenient for later ld clumping using plink.

Any chance you would look into why this error happened for the latest version of cause?

Many Thanks, Zhe

Zhe-JJ-Wang commented 3 years ago

FYI- here is the session information Screen Shot 2021-07-14 at 5 45 38 PM

jean997 commented 3 years ago

Hi Zhe, I don't know exactly what this issue is but it looks like it is with Rcpp. Can you try reinstalling and updating Rcpp?

Zhe-JJ-Wang commented 3 years ago

Hi Jean,

I suspected it's Rcpp as well. But the version I'm using Rcpp_1.0.6 is more updated than the one you used in the example Rccp_1.0.5 I think? (https://jean997.github.io/cause/pipeline.html) I tried to downgraded mine to 1.0.5 but Rccp is required by so many other things and it seems to be very difficult to do so in our hpc. A side note is it runs fine in my mac locally with Rccp_1.0.5

Thanks, Zhe

jean997 commented 3 years ago

I think it should work with 1.0.7. I recently re-built the example here using 1.0.7 and the most recent cause version which is what you are using. I did some experimenting and managed to recreate your error if I downgraded to 1.0.6. However, when I downgraded to 1.0.6 and then reinstalled cause from the github development version, no error. I also didn't get an error if, after installing while running 1.0.6 I upgraded to 1.0.7. I don't know if you may have installed cause and then downgraded Rcpp but this could potentially create the issue. Could you try either

Upgrade to Rcpp 1.0.7 and then reinstall cause or

Reinstall cause without updating Rcpp

and see if the problem still persists?