Run SNP-level enrichment test with XGR::xGRviaGenomicAnno.
Usage
XGR_enrichment(
gr,
merged_dat,
foreground_filter = "Consensus_SNP==TRUE",
background_filter = NULL,
grouping_vars = c("Study", "Assay", "Cell_type"),
fg_sample_size = NULL,
bg_sample_size = NULL,
background.annotatable.only = FALSE,
verbose = TRUE
)Arguments
- gr
Annotations to test for enrichment with.
- merged_dat
SNP-level fine-mapping results to test for enrichment with.
- foreground_filter
Filter to apply to foreground (target SNPs).
- background_filter
Filter to apply to background (non-target SNPs).
- grouping_vars
Columns in
merged_datto group by when conducting enrichment tests.- fg_sample_size
Foreground sample size.
- bg_sample_size
Background sample size.
- background.annotatable.only
For background SNPs, only use SNPs that overlap with some annotation in
gr. This means that missing annotations (NA) will not be considered.- verbose
Print messages.
See also
Other XGR:
XGR_enrichment_bootstrap(),
XGR_enrichment_plot(),
XGR_filter_assays(),
XGR_filter_sources(),
XGR_import_annotations(),
XGR_iterate_enrichment(),
XGR_iterate_overlap(),
XGR_merge_and_process(),
XGR_parse_metadata(),
XGR_plot_enrichment(),
XGR_prepare_foreground_background(),
XGR_query(),
XGR_sep_handler(),
xgr_example
Examples
if (FALSE) { # \dontrun{
gr.merged <- echoannot::merge_celltype_specific_epigenomics()
enrich.lead <- XGR_enrichment(
gr = gr.merged,
merged_dat = echodata::get_Nalls2019_merged(),
foreground_filter = "leadSNP==TRUE",
grouping_vars = c("Study", "Cell_type", "Assay")
)
} # }