Skip to contents

Unified wrapper for detecting outlier variants due to LD-summary statistic mismatches. Dispatches to either dentist_single_window or slalom based on the method argument.

Usage

ld_mismatch_qc(
  zScore,
  R = NULL,
  X = NULL,
  nSample = NULL,
  method = c("slalom", "dentist"),
  ld_method = "sample",
  ...
)

Arguments

zScore

Numeric vector of z-scores.

R

Square LD correlation matrix. Provide either R or X.

X

Genotype matrix (samples x SNPs). If provided, LD is computed via compute_LD and nSample defaults to nrow(X).

nSample

Number of samples in the LD reference panel. Required when R is provided and method = "dentist"; inferred from X when X is provided.

method

Character string specifying the QC method: "slalom" (default) or "dentist".

ld_method

Character string specifying the LD computation method when X is provided. One of "sample" (default), "population", or "gcta". Ignored when R is provided directly.

...

Additional arguments passed to the underlying QC method (dentist_single_window or slalom).

Value

A data frame with at least a logical outlier column indicating which variants are identified as outliers. The remaining columns depend on the method used.