Prepare custom foreground and background SNPs sets for enrichment tests with XGR annotations.

XGR_prepare_foreground_background(
  dat,
  foreground_filter = "Support>0",
  background_filter = NULL,
  fg_sample_size = NULL,
  bg_sample_size = NULL,
  verbose = TRUE
)

Arguments

dat

Data.frame with at least the following columns:

SNP

SNP RSID

CHR

chromosome

POS

position

foreground_filter

Specify foreground by filtering SNPs in dat. Write filter as a string (or NULL to include all SNPs).

background_filter

Specify background by filtering SNPs in dat. Write filter as a string (or NULL to include all SNPs).

Examples

if (FALSE) {
fg_bg <- echoannot:::XGR_prepare_foreground_background(
    dat = echodata::get_Nalls2019_merged(),
    foreground_filter = "Consensus_SNP==TRUE",
    background_filter = "leadSNP==TRUE"
)
}