Skip to contents

Computes a Bayesian credible set from GWAS summary statistics using Wakefield-style approximate Bayes factors.

Usage

cs(tbl, b = "Effect", se = "StdErr", log_p = NULL, cutoff = 0.95)

Arguments

tbl

A data.frame containing summary statistics.

b

Name of column containing effect sizes.

se

Name of column containing standard errors.

log_p

Optional column name containing log p-values. If supplied, z-scores are derived from p-values instead of effect sizes and standard errors.

cutoff

Cumulative posterior probability threshold. Default is 0.95 (95% credible set).

Value

A subset of tbl containing variants in the credible set, ordered by decreasing posterior probability of association.

Details

Credible set is often used in fine-mapping.

Posterior probabilities are computed from z-statistics using a numerically stable log-sum-exp implementation from matrixStats.

Examples