Return chromatin state category definitions
Source:R/chromatin_states.R
chromatin_state_categories.RdVariant of classify_chromatin_states that outputs
simplified single-state categories. Resolves dual-mark states
(bivalent = H3K4me3 + H3K27me3, poised = H3K4me1 + H3K27me3)
to the single most likely state, useful for applications that
require one-state-per-region classification.
Usage
chromatin_state_categories(
database,
histone_marks = NULL,
regions = NULL,
refine_by_tss = TRUE,
tss_window = 2000L
)Arguments
- database
epiRomics class database containing all data initially loaded
- histone_marks
character vector of histone mark names to use for classification. Must match names in
meta(database). If NULL, auto-detects from meta.- regions
GRanges object of regions to classify. If NULL, uses all annotations in the database.
- refine_by_tss
logical. If TRUE (default), promoter states are assigned only to regions within
tss_windowof an annotated TSS. Regions with promoter marks (H3K4me3) outside TSS windows are reclassified as enhancers.- tss_window
integer. Distance in bp around each TSS to define the promoter zone (default: 2000L). Regions within +/-
tss_windowof any annotated TSS are considered "promoter" context.
Value
data.frame with same structure as classify_chromatin_states
but chromatin_state uses ChromHMM-compatible labels:
active_promoter, active_enhancer, active, primed_enhancer,
transcribed, polycomb_repressed, heterochromatin, quiescent, low_signal
Details
State resolution rules:
active_promoter: H3K4me3 + H3K27ac (replaces "active" when K4me3 present; includes former bivalent with K27ac)
active_enhancer: H3K4me1 + H3K27ac (distal active elements)
active: H3K27ac alone (sufficient per Creyghton et al. 2010)
primed_enhancer: H3K4me1 alone (no K27ac, no K27me3)
transcribed: H3K36me3 alone (SETD2/Pol II gene body mark; standard epiRomics marks this as "unmarked")
polycomb_repressed: H3K27me3 (Polycomb Repressive Complex; absorbs former poised and bivalent-without-K27ac)
heterochromatin: H3K9me3 (constitutive heterochromatin)
quiescent: No histone marks detected
low_signal: Borderline marks or H2A.Z only
Bivalent resolution: K4me3 + K27me3 + K27ac -> active_promoter (K27ac sufficient for active). K4me3 + K27me3 without K27ac -> polycomb_repressed (K27me3 dominates without activating mark).
Poised resolution: K4me1 + K27me3 -> polycomb_repressed (K27me3 dominates in single-state HMM framework).
References
Ernst J, Kellis M (2012) Nature Methods 9(3):215-216. "ChromHMM: automating chromatin-state discovery and characterization."
See also
classify_chromatin_states for the standard
epiRomics classification with bivalent/poised states.
Examples
db <- make_example_database()
cats <- chromatin_state_categories(db)
table(cats$chromatin_state)
#>
#> active active_enhancer active_promoter low_signal
#> 1 1 2 1
#> polycomb_repressed primed_enhancer transcribed
#> 2 1 2