XGR_enrichment_bootstrap: XGR enrichment (bootstrapped)

View source: R/XGR_enrichment_bootstrap.R

XGR_enrichment_bootstrapR Documentation

XGR enrichment (bootstrapped)

Description

Perform annotation enrichment tests using iterative bootstrapping procedure.

Usage

XGR_enrichment_bootstrap(
  gr,
  merged_dat,
  snp_groups = c("Random", "GWAS lead", "UCS (-PolyFun)", "UCS", "Consensus (-PolyFun)",
    "Consensus"),
  background_filter = NULL,
  grouping_vars = c("Study", "Assay", "Cell_type"),
  iterations = 1000,
  fg_sample_size = 20,
  bg_sample_size = NULL,
  bootstrap = TRUE,
  save_path = tempfile(fileext = "XGR_enrich_boot_res.csv.gz"),
  nThread = 1,
  verbose = TRUE
)

Arguments

gr

Annotations to test for enrichment with.

merged_dat

SNP-level fine-mapping results to test for enrichment with.

snp_groups

Which SNP groups to repeat enrichment tests for separately.

background_filter

Filter to apply to background (non-target SNPs).

grouping_vars

Columns in merged_dat to group by when conducting enrichment tests.

iterations

Number of bootstrapping iterations.

fg_sample_size

Foreground sample size.

bg_sample_size

Background sample size.

bootstrap

Whether to use bootstrapping.

save_path

File path to save results to.

nThread

Number of threads to parallelise bootstrapping over.

verbose

Print messages.

See Also

Other XGR: XGR_enrichment_plot(), XGR_enrichment(), 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

## Not run: 
gr.merged <- echoannot::merge_celltype_specific_epigenomics()
enrich_res <- XGR_enrichment_bootstrap(
    gr = gr.merged,
    merged_dat = echodata::get_Nalls2019_merged()
)

## End(Not run)

RajLabMSSM/echoannot documentation built on Oct. 26, 2023, 2:41 p.m.