Skip to contents

Projects orthologous splice junctions to a reference species genome and annotates them with flanking exon information (donor and acceptor) and skipped exons. This enables functional interpretation by linking orthologous splice junctions to known exon structures.

Usage

annotateOSJ(data, se, refSpecies, refAnnots = NULL)

Arguments

data

List. Experiment object from newExperiment containing speciesInfo with an annotation column specifying GTF paths.

se

SummarizedExperiment. Orthologous splice junction data from findOSJ containing orthologous coordinates across species. The mcols must include columns for the reference species:

  • <refSpecies>.seqnames: Chromosome/scaffold name

  • <refSpecies>.strand: Strand ("+" or "-")

  • <refSpecies>.donor: Donor splice site position

  • <refSpecies>.acceptor: Acceptor splice site position

  • <refSpecies>.geneID: Gene identifier

refSpecies

Character. Name of the reference species for projection. Must match a species ID in data$speciesInfo$speciesID.

refAnnots

GRanges or NULL. Reference genome annotations. If NULL (default), annotations are loaded from the path in data$speciesInfo$annotation. If provided, must contain exon features with type and exon_id columns (typically from rtracklayer::import()).

Value

A SummarizedExperiment with:

rowRanges

Projected to reference species genome coordinates using an exon-based coordinate system: the 5' boundary (donor site) is the last nucleotide of the upstream exon, and the 3' boundary (acceptor site) is the first nucleotide of the downstream exon.

mcols$donorExon

Upstream flanking exon ID(s) whose last nucleotide (3' end) corresponds to the orthologous splice junction 5' boundary (donor site). Multiple IDs separated by ";".

mcols$acceptorExon

Downstream flanking exon ID(s) whose first nucleotide (5' end) corresponds to the orthologous splice junction 3' boundary (acceptor site). Multiple IDs separated by ";".

mcols$skippedExon

Exon ID(s) entirely contained within the orthologous splice junction span (i.e., skipped by the orthologous splice junction). Multiple IDs separated by ";". NA if no exon is skipped.

mcols$orthogroupID

Original orthogroup identifier.

mcols$geneID

Reference species gene ID.

metadata$gap

Character vector of orthologous splice junction names dropped due to missing reference coordinates (alignment gaps).

Details

The annotation workflow proceeds in several steps:

1. Projection to Reference: Converts orthologous splice junction coordinates from orthogroup space to reference species genome coordinates. Orthologous splice junctions without homologous coordinates (alignment gaps) are filtered out but tracked in metadata(se)$gap.

2. Exon Matching (Flanking and Skipped): Orthologous splice junction coordinates use an exon-based system: the 5' boundary (donor site) is the last nucleotide of the upstream exon, and the 3' boundary (acceptor site) is the first nucleotide of the downstream exon. Flanking exons are identified by matching these positions against annotated exon boundaries. Skipped exons are annotated exons entirely contained within the orthologous splice junction span.

Note

  • Orthologous splice junctions without matching flanking or skipped exons have NA in the corresponding columns (e.g., novel orthologous splice junctions, annotation artifacts).

  • Multiple exon IDs indicate the same splice site is shared by multiple annotated exons.

Examples

if (FALSE) { # \dontrun{
# Option 1: Load annotations from data$speciesInfo$annotation
se <- annotateOSJ(
  data       = experiment,
  se         = se,
  refSpecies = "Homo_sapiens"
)

# Option 2: Provide annotations directly as GRanges
gtf <- rtracklayer::import("reference.gtf")
se <- annotateOSJ(
  data       = experiment,
  se         = se,
  refSpecies = "Homo_sapiens",
  refAnnots  = gtf
)

# Check annotation results
sum(!is.na(mcols(se)$donorExon))
} # }