jwr-git / pwcoco

Pair-wise conditional analysis and colocalisation
GNU General Public License v3.0
36 stars 4 forks source link

Extracting the predicted causal SNP from pwcoco #22

Open xiyun26 opened 2 months ago

xiyun26 commented 2 months ago

Hi, Many thanks for developing this package, it has been very useful for me that it relaxes the single causal variant assumption in the Coloc method.

My question is can you or how to extract the predicted causal SNP after I run pwcoco. In the coloc package, one is able to go into the results dataframe and extract the predicted causal SNP by using for example:subset(my.res$results,SNP.PP.H4>0.80) or by credible sets, for example: o <- order(my.res$results$SNP.PP.H4,decreasing=TRUE) cs <- cumsum(my.res$results$SNP.PP.H4[o]) w <- which(cs > 0.95)[1] my.res$results[o,][1:w,]$snp

Can I do the same for pwcoco results?

Many thanks Kindest Regards Xiyun