Suggest changes to coloc_wrapper interface
gaow opened this issue · comments
gaow 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:
coloc_wrapper
should not haveLD_meta_file_path
process_coloc_results
change it tocoloc_post_processor()
where you can makeLD_meta_file_path
optional. If it is available we can perform purity filter. Otherwise we warn that the filter cannot be applied.- In practice, your analysis will contain two lines
coloc_wrapper
andcoloc_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
gaow commented
@rfeng2023 not sure if this is completed -- if so please comment and close.