Skip to contents

Predicts donor and acceptor splice site probabilities for orthologous splice junctions across species using pre-trained OpenSpliceAI models. Computes predicted DID (predDID) using logit differences between groups to identify differential splice site strength that may explain differential orthologous splice junction usage.

Usage

predictDID(
  data,
  se,
  predDir,
  refSpecies,
  models = "model_10000nt_rs10",
  nbThreads = 1
)

Arguments

data

List. Experiment object from newExperiment containing:

speciesInfo

data.frame with speciesID and group columns.

orthogroups

GRanges with gene locations and orthogroup assignments.

dirs$dna

Path to directory containing extracted DNA sequences (FASTA files per orthogroup).

se

SummarizedExperiment. Orthologous splice junction data from findOSJ with species-specific donor/acceptor positions in mcols.

predDir

Character. Directory path for storing OpenSpliceAI predictions. Created if it does not exist. Predictions are cached, so re-running with the same directory will skip already-computed genes.

refSpecies

Character. Reference species for the OpenSpliceAI models. Must be one of:

  • "Homo_sapiens"

  • "Mus_musculus"

  • "Danio_rerio"

  • "Arabidopsis_thaliana"

models

Character vector or NULL. Model IDs to use for prediction. Multiple models are averaged for robust predictions. Default: "model_10000nt_rs10". Set to NULL to use all available models.

nbThreads

Integer. Number of parallel threads for processing genes. Default: 1.

Value

The input SummarizedExperiment with additional mcols columns:

predDIDdonor

Predicted DID for donor sites based on logit difference between groups. Positive values indicate stronger donor sites in group 2.

predDIDacceptor

Predicted DID for acceptor sites based on logit difference between groups. Positive values indicate stronger acceptor sites in group 2.

<speciesID>.probDonor

Predicted donor probability for each species.

<speciesID>.probAcceptor

Predicted acceptor probability for each species.

Details

The function performs the following steps:

  1. Extracts donor and acceptor positions for all species from the SummarizedExperiment.

  2. Converts genomic coordinates to relative positions within genes (accounting for strand).

  3. For each gene, extracts the DNA sequence and runs OpenSpliceAI prediction.

  4. Averages predictions across models (if multiple) for robustness.

  5. Computes predicted DID using logit differences between groups.

Requirements

  • The openspliceai command-line tool must be installed and available in PATH.

  • Pre-trained models must be installed in the package's extdata/openspliceai-models/<refSpecies>/ directory.

Interpreting predDID

The predicted DID compares splice site probabilities between groups using logit transformation: $$predDID = \log_2\left(\frac{\bar{p}_2}{1-\bar{p}_2}\right) - \log_2\left(\frac{\bar{p}_1}{1-\bar{p}_1}\right)$$ where \(\bar{p}_1\) and \(\bar{p}_2\) are the mean probabilities across species in groups 1 and 2 respectively.

  • predDID > 0: Splice site is stronger in group 2

  • predDID < 0: Splice site is stronger in group 1

  • predDID ~ 0: Similar splice site strength in both groups

See also

findOSJ to create the input SummarizedExperiment, runDS for differential splicing analysis.

Examples

if (FALSE) { # \dontrun{
# Predict splice site probabilities
se <- predictDID(
  data       = experiment,
  se         = se,
  predDir    = "predictions/",
  refSpecies = "Homo_sapiens",
  models     = c("model_10000nt_rs10", "model_10000nt_rs11"),
  nbThreads  = 4
)

# Check predDID for significant orthologous splice junctions
sig <- mcols(se)$significant
summary(mcols(se)$predDIDdonor[sig])
summary(mcols(se)$predDIDacceptor[sig])
} # }