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). If provided, LD is computed 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. Passed to computeLd. One of "sample" (default), "population", or "gcta". 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 (from which LD is derived automatically via computeLd).

See also

dentistSingleWindow, resolveLdInput

Examples

results <- slalom(zScore, R = R, standardError = standardError)
#> Error: object 'R' not found