Annotate Regulatory Elements with Gene Targets Using Co-Accessibility Links
Source:R/annotate_re_genes.R
annotate_with_coaccessibility.Rd
This function annotates regulatory elements (REs) with their putative gene targets by integrating co-accessibility links that include CCAN (co-accessibility networks) metadata. It extracts promoter regions from a TxDb object, optionally filters for protein-coding genes, and links REs to genes based on chromatin co-accessibility. Optionally, REs overlapping a transcription start site (TSS) can also be annotated directly.
Usage
annotate_with_coaccessibility(
links,
retsi,
txdb,
annot_dbi,
protein_coding_only = TRUE,
keep_mito = FALSE,
verbose = TRUE,
coaccess_cutoff_override = 0.25,
filter_promoter_distal = TRUE,
add_tss_annotation = TRUE
)
Arguments
- links
A
GInteractions
object representing co-accessibility links with CCAN metadata.- retsi
A
GRanges
ordata.frame
object representing regulatory elements to annotate. If a data.frame, must contain columns sufficient to constructGRanges
(e.g., seqnames, start, end).- txdb
A
TxDb
object used to extract promoter regions and TSS annotations.- annot_dbi
An
AnnotationDbi
annotation database object (e.g.,org.Hs.eg.db
) for mapping gene IDs to gene symbols and types.- protein_coding_only
Logical indicating whether to restrict promoter regions to protein-coding genes only (default:
TRUE
).- keep_mito
Logical indicating whether to keep mitochondrial (chrM/MT) chromosomes in promoter extraction (default:
FALSE
).- verbose
Logical; if
TRUE
, informative messages are printed during processing (default:TRUE
).- coaccess_cutoff_override
Numeric; co-accessibility score cutoff to override default filtering in
annotate_links_with_ccans
(default:0.25
).- filter_promoter_distal
Logical; whether to filter links to retain only promoter-distal interactions (default:
TRUE
).- add_tss_annotation
Logical; whether to annotate regulatory elements overlapping TSS directly (default:
TRUE
).