Skip to contents

Evaluates whether regions of interest derived from external experiments (ATAC-seq, DBA, gene lists, BED files) correspond with enhanceosome regions. Supports multiple input types for flexible region definition.

Usage

get_regions_of_interest(
  putative_enhanceosome,
  test_regions = NULL,
  input_type = c("granges", "bed", "genelist", "combined"),
  bed_path = NULL,
  gene_list = NULL
)

Arguments

putative_enhanceosome

epiRomics class database containing putative enhanceosome calls. Must have non-empty annotations().

test_regions

GRanges or NULL. Direct GRanges regions of interest (original interface). If provided, input_type is ignored and this is used directly for overlap. Default NULL.

input_type

Character. How to construct test regions when test_regions is NULL. One of:

"granges"

Use test_regions directly (default, backward-compatible).

"bed"

Import regions from a BED file via bed_path.

"genelist"

Select enhanceosome regions whose SYMBOL column matches genes in gene_list.

"combined"

Union of all provided evidence sources (GRanges, BED, genelist).

bed_path

Character or NULL. Path to a BED file for input_type = "bed" or "combined".

gene_list

Character vector or NULL. Gene symbols for input_type = "genelist" or "combined".

Value

Variable of class epiRomics with enhanceosome regions overlapping with regions of interest.

Examples

db  <- make_example_database()
eso <- make_example_enhanceosome(db)
test_gr <- GenomicRanges::GRanges(
  "chr1", IRanges::IRanges(start = 1000L, end = 60000L)
)
roi <- get_regions_of_interest(eso, test_regions = test_gr)
#> ROI filter: 3 of 3 regions retained
length(annotations(roi))
#> [1] 3