RNAPeaks: Visualize RNA-Binding Protein Peaks on Gene Structures
Source:R/RNAPeaks-package.R
RNAPeaks-package.RdRNAPeaks creates publication-quality visualizations of RNA-binding protein (RBP) peaks overlaid on gene structures. It supports single-gene plots, multi-gene genomic region plots, splicing maps, and sequence motif analysis around splice junctions. Integrates with GTF annotations from Ensembl via AnnotationHub.
Main Functions
The primary functions for generating plots are:
PlotGenePlot RBP peaks on a single gene structure. Use this when you want to visualize peaks on one specific gene.
PlotRegionPlot RBP peaks across a genomic region containing multiple genes. Use this for broader regional views.
createSplicingMapAnalyze protein binding frequency around splice junctions. Shows where RBPs bind relative to exon/intron boundaries in retained vs excluded splicing events.
createSequenceMapAnalyze sequence motif frequency around splice junctions. Identifies position-specific enrichment of motifs in different splicing event categories.
createRetainedIntronSequenceMapAnalyze sequence motif frequency around retained intron splice junctions. Identifies position-specific enrichment of motifs in different splicing event categories.
createRetainedIntronSplicingMapAnalyze protein binding frequency around retained intron splice junctions. Shows where RBPs bind relative to exon/intron boundaries in retained vs excluded splicing events.
Included Data
The package includes sample data for testing:
sample_se.matsSample SE.MATS output for splicing analysis
Workflow
A typical workflow involves:
Load your own BED file and validate it with
checkBedLoad GTF annotation once with
LoadGTFand store locally (e.g.,gtf <- LoadGTF("Human"); save withsaveRDS(gtf, "gtf.rds")for future sessions), or use the gtf_human that is pre-loadedCall
PlotGeneorPlotRegion, passing the storedgtfobject
For splicing analysis:
Prepare SE.MATS file or use
sample_se.matsCall
createSplicingMapwith BED and SE.MATS data to analyze protein bindingCall
createSequenceMapto analyze sequence motifsCall
createRetainedIntronSplicingMapwith BED and SE.MATS data to analyze protein binding for retained intronsCall
createRetainedIntronSequenceMapto analyze sequence motifs for retained introns
Examples
if (FALSE) { # \dontrun{
library(RNAPeaks)
# Load GTF once and store locally (do this once per session)
gtf <- LoadGTF(species = "Human")
# Optionally save for future sessions to avoid re-downloading
saveRDS(gtf, "human_gtf.rds")
# In future sessions: gtf <- readRDS("human_gtf.rds")
# ----- Gene-level visualization -----
result <- PlotGene(
bed = your_bed,
geneID = "GAPDH",
gtf = gtf
)
result$plot
# ----- Region-level visualization -----
PlotRegion(
bed = your_bed,
Chr = "12",
Start = 56000000,
End = 56050000,
Strand = "+",
gtf = gtf
)
# ----- Splicing map analysis -----
createSplicingMap(
bed_file = your_bed,
SEMATS = sample_se.mats
)
# ----- Sequence motif analysis -----
library(BSgenome.Hsapiens.UCSC.hg38)
createSequenceMap(
SEMATS = sample_se.mats,
sequence = "CCCC"
)
} # }