run_finemapping: Run functional fine-mapping using summary statistics

View source: R/finemapping.R

run_finemappingR Documentation

Run functional fine-mapping using summary statistics

Description

Run fine-mapping with SuSiE using summary statistics for all LD blocks with prior probabilities

Usage

run_finemapping(
  sumstats,
  bigSNP = NULL,
  region_info = NULL,
  n = NULL,
  priortype = c("torus", "uniform", "custom"),
  prior_weights = NULL,
  L = 1,
  estimate_residual_variance = FALSE,
  verbose = FALSE,
  save = FALSE,
  outputdir = getwd(),
  outname = NULL,
  ...
)

Arguments

sumstats

A data frame of summary statistics

bigSNP

a bigsnpr object attached via bigsnpr::snp_attach() containing the reference genotype panel.

region_info

A data frame of region information, paths of LD matrices (R, correlation matrices), and paths of variant information files corresponding to the LD matrices.

n

The sample size (optional, but strongly recommended.)

priortype

prior type: 'torus' (use the 'torus_prior' in sumstats), 'uniform' (uniform prior), or 'custom' (use the values provided in prior_weights).

prior_weights

A vector of prior probability for each SNP.

L

Number of causal signals. If L = 1, bigSNP or region_info are not required.

estimate_residual_variance

The default is FALSE, the residual variance is fixed to 1 or variance of y. If the in-sample LD matrix is provided, we recommend setting estimate_residual_variance = TRUE.

verbose

If TRUE, print progress.

save

If TRUE, save SuSiE result and LD (R) matrix for each locus.

outputdir

Directory of SuSiE result

outname

Filename of SuSiE result

Value

A list of SuSiE results; one per LD block.


kevinlkx/mapgen documentation built on March 31, 2024, 11:03 p.m.