Skip to contents

This function preprocesses summary statistics and LD data for RSS analysis. It performs allele quality control, flipping alleles as necessary, and removes specified regions from the analysis.

Usage

rss_basic_qc(
  sumstats,
  LD_data,
  skip_region = NULL,
  keep_indel = TRUE,
  return_LD_mat = TRUE
)

Arguments

sumstats

A data frame containing summary statistics with columns "chrom", "pos", "A1", and "A2".

LD_data

An LDData S4 object or a legacy list containing combined LD variants data, as generated by load_LD_matrix.

skip_region

A character vector specifying regions to be skipped in the analysis (optional). Each region should be in the format "chrom:start-end" (e.g., "1:1000000-2000000").

return_LD_mat

Logical; if FALSE, return only harmonized summary statistics and skip LD-matrix subsetting. This is useful when the reference input is genotype-backed X_ref. Defaults to TRUE for backwards compatibility.

Value

A list containing the processed summary statistics and LD matrix. - sumstats: A data frame containing the processed summary statistics. - LD_mat: The processed LD matrix.