omerwe / polyfun

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

Susie Update #43

Closed jerome-f closed 3 years ago

jerome-f commented 3 years ago

Hi Omer,

Susie code base has been improved and the current version adds a bunch of bug fix and performance improvements. One of the things that has changed is the susie_bhat function

 761         except:
 762             susie_obj = self.susieR.susie_bhat(
 763                     bhat=bhat.reshape((m,1)),
 764                     shat=np.ones((m,1)),
 765                     R=self.df_ld.values,
 766                     n=self.n,
 767                     L=num_causal_snps,
 768                     scaled_prior_variance=(0.0001 if (prior_var is None) else prior_var),
 769                     estimate_prior_variance=(prior_var is None),
 770                     residual_variance=(self.R_null if (residual_var is None) else residual_var),
 771                     estimate_residual_variance=(residual_var is None),
 772                     verbose=verbose,
 773                     prior_weights=(prior_weights.reshape((m,1)) if use_prior_causal_prob else self.R_null)
 774                 )

which is removed from the package and the susie_rss is been used instead. This might throw an error for people using the newer susie version if the code exits with an exceptions

omerwe commented 3 years ago

Hi Jerome,

Indeed, the code first tries to call susie_suff_stat. In case someone has an older version of SuSiE installed, the call to susie_suff_stat will fail. The code will then fallback to calling the old function susie_bhat. Does this make sense?