Skip to contents

End-to-end pipeline for summary statistics fine-mapping via SuSiE RSS. Supports both z+R (correlation matrix) and z+X (genotype matrix) interfaces.

Usage

rss_analysis_pipeline(
  sumstat_path,
  column_file_path,
  LD_data,
  n_sample = 0,
  n_case = 0,
  n_control = 0,
  region = NULL,
  skip_region = NULL,
  extract_region_name = NULL,
  region_name_col = NULL,
  qc_method = c("slalom", "dentist", "none"),
  finemapping_method = c("susie_rss", "single_effect", "bayesian_conditional_regression"),
  finemapping_opts = list(L = 20, L_greedy = 5, coverage = c(0.95, 0.7, 0.5),
    signal_cutoff = 0.025, min_abs_corr = 0.8),
  impute = TRUE,
  impute_opts = list(rcond = 0.01, R2_threshold = 0.6, minimum_ld = 5, lamb = 0.01),
  pip_cutoff_to_skip = 0,
  R_finite = NULL,
  R_mismatch = NULL,
  keep_indel = TRUE,
  comment_string = "#",
  diagnostics = FALSE
)

Arguments

sumstat_path

File path to the summary statistics.

column_file_path

File path to the column mapping file.

LD_data

A list from load_LD_matrix containing LD_matrix, LD_variants, ref_panel, block_metadata, and is_genotype flag. When is_genotype=TRUE (from return_genotype=TRUE), LD_matrix contains genotype X and susie_rss uses the z+X interface. Local R is computed only for QC stages that require a correlation matrix.

n_sample

Sample size. If 0, retrieved from the sumstat file.

n_case

Number of cases (for case-control studies).

n_control

Number of controls (for case-control studies).

region

Region string "chr:start-end" for tabix subsetting.

skip_region

Character vector of regions to skip (format "chrom:start-end").

extract_region_name

Gene/phenotype name to subset.

region_name_col

Column to filter for extract_region_name.

qc_method

Summary-statistic QC method. "slalom" and "dentist" run basic allele harmonization plus LD-mismatch QC; "none" runs basic allele harmonization only.

finemapping_method

One of "susie_rss", "single_effect", "bayesian_conditional_regression".

finemapping_opts

List of fine-mapping options (L, L_greedy, coverage, signal_cutoff, min_abs_corr).

impute

Whether to impute missing variants via RAISS (default TRUE).

impute_opts

List of imputation options (rcond, R2_threshold, minimum_ld, lamb).

pip_cutoff_to_skip

PIP threshold for early stopping (default 0, no skip).

R_finite

Controls variance inflation to account for finite reference LD. Passed to susieR::susie_rss().

R_mismatch

LD mismatch correction method passed to susieR::susie_rss(). Default NULL disables mismatch correction.

keep_indel

Whether to keep indel variants (default TRUE).

comment_string

Comment character for sumstat file (default "#").

diagnostics

Whether to include diagnostic info (default FALSE).

Value

A list with fine-mapping results and analyzed summary statistics.