Skip to contents

RNAPeaks 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:

PlotGene

Plot RBP peaks on a single gene structure. Use this when you want to visualize peaks on one specific gene.

PlotRegion

Plot RBP peaks across a genomic region containing multiple genes. Use this for broader regional views.

createSplicingMap

Analyze protein binding frequency around splice junctions. Shows where RBPs bind relative to exon/intron boundaries in retained vs excluded splicing events.

createSequenceMap

Analyze sequence motif frequency around splice junctions. Identifies position-specific enrichment of motifs in different splicing event categories.

createRetainedIntronSequenceMap

Analyze sequence motif frequency around retained intron splice junctions. Identifies position-specific enrichment of motifs in different splicing event categories.

createRetainedIntronSplicingMap

Analyze 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.mats

Sample SE.MATS output for splicing analysis

Workflow

A typical workflow involves:

  1. Load your own BED file and validate it with checkBed

  2. Load GTF annotation once with LoadGTF and store locally (e.g., gtf <- LoadGTF("Human"); save with saveRDS(gtf, "gtf.rds") for future sessions), or use the gtf_human that is pre-loaded

  3. Call PlotGene or PlotRegion, passing the stored gtf object

For splicing analysis:

  1. Prepare SE.MATS file or use sample_se.mats

  2. Call createSplicingMap with BED and SE.MATS data to analyze protein binding

  3. Call createSequenceMap to analyze sequence motifs

  4. Call createRetainedIntronSplicingMap with BED and SE.MATS data to analyze protein binding for retained introns

  5. Call createRetainedIntronSequenceMap to analyze sequence motifs for retained introns

Helper Functions

checkBed

Validate and standardize BED file format

LoadGTF

Load GTF annotation from AnnotationHub. Call once and store the result in a local variable or save to disk with saveRDS() to avoid repeated downloads.

Author

Maintainer: Krushna Bhanushali Krushna.Bhanushali@unc.edu

Authors:

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"
)
} # }