wakefield_pp
computes posterior probabilities for a given SNP to be causal for a given SNP under the assumption of a single causal variant.This function is verbatim of its namesake in cupcake package (github.com/ollyburren/cupcake/)
wakefield_pp(p, f, N, s, pi_i = 1e-04, sd.prior = 0.2, log.p = FALSE)
a vector of univariate pvalues from a GWAS
a vector of minor allele frequencies taken from some reference population.
a scalar or vector for total sample size of GWAS
a scalar representing the proportion of cases (n.cases/N)
a scalar representing the prior probability (DEFAULT \(1 \times 10^{-4}\))
a scalar representing our prior expectation of \(\beta\) (DEFAULT 0.2). The method assumes a normal prior on the population log relative risk centred at 0 and the DEFAULT value sets the variance of this distribution to 0.04, equivalent to a 95\ is in the range of 0.66-1.5 at any causal variant.
if FALSE (DEFAULT), p is a p value. If TRUE, p is a log(p) value. Use this if your dataset holds p values too small to be accurately stored without using logs
a vector of posterior probabilities.