This function imports genomic data from various file formats (BED, bigWig, GFF, etc.) using rtracklayer and converts it to a tidy data frame suitable for ggplot2.
Examples
if (FALSE) { # \dontrun{
# Import a BED file
peaks_df <- import_genomic_data("peaks.bed")
# Import a specific region from a bigWig file
library(GenomicRanges)
region <- GRanges("chr1", IRanges(1000000, 2000000))
signal_df <- import_genomic_data("signal.bw", which = region)
} # }