abf

craft.abf.calc_abf(pval, maf, n, n_controls, n_cases)[source]

Calculate Approximate Bayes Factor.

(Wakefield, 2009, Genet Epidemiol.) Based on Chris Wallace work
Parameters:
  • pval (float) – GWAS p-value
  • maf (float) – Minor allele freq
  • n (int) – Sample size
  • n_controls – Number of controls
  • n_cases – Number of cases
Returns:

ABF

Usage For a binary trait as no exact Bayes factor is calculable. For case-control studies only.

Limitations Assumes causal variant is included in SNP population (i.e. requires relatively densely genotyped SNPs.) Assumes single causal variant only.

craft.abf.calc_postprob(data)[source]

Calculate posterior probability for each SNP.

Method taken from Maller et al. 2012 ‘Bayesian refinement of association signals for 14 loci in 3 common diseases.’ (supplementary note). This assumes there is 1 causal SNP in the region, and that the prior probability is that any SNP in the region is equally likely to be that causal SNP.