clagiamba / moloc

33 stars 5 forks source link

Is it possible to get posterior probabilities for each SNP in the window? #3

Open MalteThodberg opened 3 years ago

MalteThodberg commented 3 years ago

Is it possible to get posterior probabilities for each SNP in the window?

E.g. for 2D coloc.abf, output$results$SNP.PP.H4 holds a vector of posterior probabilities for each SNP, which can be used for 95% credible set calculations.

clagiamba commented 3 years ago

Hi Malte, yes it is, I had updated the function on 2020-04-14 "moloc/R/functions_moloc.R" to be able to output the per-SNP probability.

Please use the option "save.SNP.info =TRUE". For example, if you are considering two traits, the per-SNP probability of "ab" would be:

moloc =moloc_test(list(eqtl, gwas), prior_var="default", priors=c(1e-04, 1e-05), save.SNP.info =TRUE)

moloc[[4]]$SNP.PP.ab

Please do let me know if you have any further questions, Thank you, Claudia