Annotate putative enhancers with functional database overlaps
Source:R/putative_enhancers.R
annotate_enhancers.RdCross-references putative enhancers against all functional databases
(FANTOM5, UCNEs, Regulome Active, Regulome Super, etc.) loaded in the
epiRomics database. Adds boolean overlap columns for each database, a
count of overlapping databases, and a novel flag for enhancers
not found in any known database.
Arguments
- putative_enhancers
data.frame. Output from
find_putative_enhancers.- database
An epiRomics S4 database object.
Value
The input data.frame with additional columns:
- overlap_<name>
Logical. TRUE if putative enhancer overlaps the named functional database (one column per database).
- n_databases
Integer. Count of functional databases overlapping.
- novel
Logical. TRUE if no functional database overlap (completely novel enhancer call).
Examples
db <- make_example_database()
pe <- find_putative_enhancers(db)
#> Auto-computing chromatin states from all histone marks...
#> Histone-based enhancers: 7 regions (from 7 classified regions)
#> States: active=4, poised=1, primed=2
#> TF binding source: 4 regions from 2 TFs (TF1, TF2)
#> Union: 7 non-overlapping putative enhancer regions
#> Putative enhancers: 7 total
#> Active: 0 | Poised: 0 | Unmarked: 7 | Repressed: 0
#> H2A.Z+: 0 | TF-bound: 4 | High co-binding (>=3 TFs): 0
#> Sources: histone=3, histone,tf=4
pe_annot <- annotate_enhancers(pe, db)
#> fantom: 2 / 7 (28.6%) overlap
#> Functional annotation: 2 validated (28.6%), 5 novel (71.4%)
#> Database overlap distribution: 0 DBs=5, 1 DBs=2
table(pe_annot$novel)
#>
#> FALSE TRUE
#> 2 5