
Annotate Orthologous Splice Junctions with Flanking and Skipped Exons
annotateOSJ.RdProjects 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.
Arguments
- data
List. Experiment object from
newExperimentcontainingspeciesInfowith anannotationcolumn specifying GTF paths.- se
SummarizedExperiment. Orthologous splice junction data from
findOSJcontaining orthologous coordinates across species. Themcolsmust 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 indata$speciesInfo$annotation. If provided, must contain exon features withtypeandexon_idcolumns (typically fromrtracklayer::import()).
Value
A SummarizedExperiment with:
rowRangesProjected 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$donorExonUpstream flanking exon ID(s) whose last nucleotide (3' end) corresponds to the orthologous splice junction 5' boundary (donor site). Multiple IDs separated by ";".
mcols$acceptorExonDownstream flanking exon ID(s) whose first nucleotide (5' end) corresponds to the orthologous splice junction 3' boundary (acceptor site). Multiple IDs separated by ";".
mcols$skippedExonExon ID(s) entirely contained within the orthologous splice junction span (i.e., skipped by the orthologous splice junction). Multiple IDs separated by ";".
NAif no exon is skipped.mcols$orthogroupIDOriginal orthogroup identifier.
mcols$geneIDReference species gene ID.
metadata$gapCharacter 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
NAin 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))
} # }