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"),
  finemapping_method = c("susie_rss", "single_effect", "bayesian_conditional_regression"),
  finemapping_opts = list(init_L = 5, max_L = 20, l_step = 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,
  stochastic_ld_sample = 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. R is computed internally for QC/imputation.

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

QC method: "slalom" or "dentist".

finemapping_method

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

finemapping_opts

List of fine-mapping options (init_L, max_L, l_step, 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).

stochastic_ld_sample

Passed to susie_rss. NULL (default), TRUE, or integer.

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.