cumc / pecotmr

Pair-wise enrichment, colocalization, TWAS and Mendelian Randomization to integrate molecular QTL and GWAS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggest changes to coloc_wrapper interface

gaow opened this issue · comments

commented

@rfeng2023 i don't think it is a good idea to mix up positional (required) and optional (withe default values) arguments like this:

coloc_wrapper <- function(xqtl_file, gwas_files, 
                          gwas_finemapping_obj = NULL, xqtl_finemapping_obj = NULL,
                          gwas_varname_obj = NULL, xqtl_varname_obj = NULL, 
                          LD_meta_file_path, prior_tol = 1e-9,
                          p1=1e-4, p2=1e-4, p12=5e-6, ...) 

LD_meta_file_path should appear before those other parameters. Also, I think it is too much of an ask for users to provide LD reference data at this point.

My suggestions are:

  1. coloc_wrapper should not have LD_meta_file_path
  2. process_coloc_results change it to coloc_post_processor() where you can make LD_meta_file_path optional. If it is available we can perform purity filter. Otherwise we warn that the filter cannot be applied.
  3. In practice, your analysis will contain two lines coloc_wrapper and coloc_post_processor I think we did it here too with susie_wrapper and susie_post_processor: https://cumc.github.io/xqtl-pipeline/code/cis_analysis/cis_workhorse.html
commented

@rfeng2023 not sure if this is completed -- if so please comment and close.

@gaow yes this is completed. I will close it.