This function processes xQTL and multiple GWAS finemapped data files for colocalization analysis.
Usage
coloc_wrapper(
xqtl_file,
gwas_files,
xqtl_finemapping_obj = NULL,
xqtl_varname_obj = NULL,
xqtl_region_obj = NULL,
gwas_finemapping_obj = NULL,
gwas_varname_obj = NULL,
gwas_region_obj = NULL,
filter_lbf_cs = FALSE,
filter_lbf_cs_secondary = NULL,
prior_tol = 1e-09,
p1 = 1e-04,
p2 = 1e-04,
p12 = 5e-06,
...
)Arguments
- xqtl_file
Path to the xQTL RDS file.
- gwas_files
Vector of paths to GWAS RDS files.
- xqtl_finemapping_obj
Optional table name in xQTL RDS files (default 'susie_fit').
- xqtl_varname_obj
Optional table name in xQTL RDS files (default 'susie_fit').
- xqtl_region_obj
Optional table name in xQTL RDS files (default 'susie_fit').
- gwas_finemapping_obj
Optional table name in GWAS RDS files (default 'susie_fit').
- gwas_varname_obj
Optional table name in GWAS RDS files (default 'susie_fit').
- gwas_region_obj
Optional table name in GWAS RDS files (default 'susie_fit').
- prior_tol
When the prior variance is estimated, compare the estimated value to
prior_tolat the end of the computation, and exclude a single effect from PIP computation if the estimated prior variance is smaller than this tolerance value.- p1,
p2, and p12 are results from xqtl_enrichment_wrapper (default 'p1=1e-4, p2=1e-4, p12=5e-6', same as coloc.bf_bf).
- region_obj
Optional table name of region info in susie_twas output filess (default 'region_info').
Examples
xqtl_file <- "xqtl_file.rds"
gwas_files <- c("gwas_file1.rds", "gwas_file2.rds")
result <- coloc_wrapper(xqtl_file, gwas_files, LD_meta_file_path)
#> Warning: cannot open compressed file 'gwas_file1.rds', probable reason 'No such file or directory'
#> Error in gzfile(file, "rb"): cannot open the connection