Skip to contents

Performs Approximate Bayesian Factor (ABF) analysis, identifies credible sets, and annotates lead variants based on fine-mapping results. It computes p-values from z-scores assuming a two-sided standard normal distribution.

Usage

slalom(
  zScore,
  R = NULL,
  X = NULL,
  standardError = rep(1, length(zScore)),
  abfPriorVariance = 0.04,
  nlog10pDentistSThreshold = 4,
  r2Threshold = 0.6,
  leadVariantChoice = "pvalue",
  ldMethod = "sample"
)

Arguments

zScore

Numeric vector of z-scores corresponding to each variant.

R

Square LD correlation matrix. Provide either R or X.

X

Genotype matrix (samples x SNPs). With ldMethod = "sample" only the lead variant's LD column is computed from it; any other ldMethod computes the LD matrix via computeLd(X).

standardError

Optional numeric vector of standard errors corresponding to each z-score. If not provided, a default value of 1 is assumed for all variants.

abfPriorVariance

Numeric, the prior effect size variance for ABF calculations. Default is 0.04.

nlog10pDentistSThreshold

Numeric, the -log10 DENTIST-S P value threshold for identifying outlier variants for prediction. Default is 4.0.

r2Threshold

Numeric, the r2 threshold for DENTIST-S outlier variants for prediction. Default is 0.6.

leadVariantChoice

Character, method to choose the lead variant, either "pvalue" or "abf", with default "pvalue".

ldMethod

Character string specifying the LD computation method when X is provided: "sample" (default), which uses the genotypes directly, or "population" or "gcta", which go through computeLd. Ignored when R is provided directly.

Value

A list containing the annotated LD matrix with ABF results, credible sets, lead variant, and DENTIST-S statistics; and a summary dataframe with aggregate statistics.

Details

Provide either an LD correlation matrix R or a genotype matrix X. SLALOM needs only the lead variant's LD with the others, so with ldMethod = "sample" it computes that one column from the genotypes and never forms the LD matrix.

See also

dentistSingleWindow, resolveLdInput

Examples

# Simulate z-scores and an LD matrix from a reference panel, then screen
# for LD-outlier variants.
set.seed(1)
geno <- matrix(rbinom(500 * 100, 2, 0.3), nrow = 500, ncol = 100)
ldMat <- cor(geno)
zScore <- rnorm(100)
result <- slalom(zScore, R = ldMat)