Skip to contents

Description of what the function does.

Usage

mr_format(
  susie_result,
  condition,
  gwas_sumstats_db,
  coverage = NULL,
  run_allele_qc = TRUE,
  method = "susie",
  coverage_level = 0.95,
  molecular_name_obj = c("susie_results", condition, "region_info", "region_name"),
  ld_meta_df
)

Arguments

susie_result

A list containing the results of SuSiE analysis. This list should include nested elements such as 'susie_results', 'susie_result_trimmed', and 'top_loci', containing details about the statistical analysis of genetic variants.

condition

A character string specifying the conditions. This is used to select the corresponding subset of results within 'susie_result'.

gwas_sumstats_db

A data frame containing summary statistics from GWAS studies. It should include columns for variant id and their associated statistics such as beta coefficients and standard errors.

coverage

A character string specifying the credible set column. If NULL, it is derived from coverage_level and method.

run_allele_qc

Whether to run allele QC on variants. Default TRUE.

method

Fine-mapping method suffix used for method-specific columns.

coverage_level

Numeric credible set coverage used when coverage is NULL.

Value

A data frame formatted for MR analysis or NULL if cs_list is empty.