omerwe / polyfun

PolyFun (POLYgenic FUNctionally-informed fine-mapping)
MIT License
94 stars 22 forks source link

susie_suff_stat no longer accept bhat input #175

Closed lruizcalico closed 1 year ago

lruizcalico commented 1 year ago

Hi,

I was running finemapper.py and ran into this error:

[WARNING]  R[write to console]: Error in (function (XtX, Xty, yty, n, X_colmeans = NA, y_mean = NA, maf = NULL,  : 
  susie_suff_stat no longer accepts inputs bhat, shat, R or var_y; these inputs are now accepted by susie_rss instead

File "polyfun/finemapper.py", line 1275, in <module>
    df_finemap = finemap_obj.finemap(locus_start=args.start, locus_end=args.end, num_causal_snps=args.max_num_causal,
  File "polyfun/finemapper.py", line 835, in finemap
    susie_obj = self.susieR.susie_suff_stat(
  File "/usr/local/lib/python3.8/dist-packages/rpy2/robjects/functions.py", line 208, in __call__
    return (super(SignatureTranslatedFunction, self)
  File "/usr/local/lib/python3.8/dist-packages/rpy2/robjects/functions.py", line 131, in __call__
    res = super(Function, self).__call__(*new_args, **new_kwargs)
  File "/usr/local/lib/python3.8/dist-packages/rpy2/rinterface_lib/conversion.py", line 45, in _
    cdata = function(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/rpy2/rinterface.py", line 873, in __call__
    raise embedded.RRuntimeError(_rinterface._geterrmessage())
rpy2.rinterface_lib.embedded.RRuntimeError: Error in (function (XtX, Xty, yty, n, X_colmeans = NA, y_mean = NA, maf = NULL,  : 
  susie_suff_stat no longer accepts inputs bhat, shat, R or var_y; these inputs are now accepted by susie_rss instead

After going to line 835 of finemapper.py and changed it to susie_rss, it seems to run fine. I use rocker/verse:latest docker image as the base.

jdblischak commented 1 year ago

PolyFun supports susieR version 0.11.92:

https://github.com/omerwe/polyfun/blob/00afe717ed157411ab78c54f3ec180e77abf47f9/polyfun.yml#L27

The susieR authors have made various changes to the package since then. You can update the PolyFun code to run with a more recent version of susieR, but this hasn't been tested thoroughly

lruizcalico commented 1 year ago

I think that is mentioned here: https://github.com/stephenslab/susieR/issues/169 Thank you