
Predict Splice Site Strength Using OpenSpliceAI
predictDID.RdPredicts 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.
Arguments
- data
List. Experiment object from
newExperimentcontaining:speciesInfodata.frame with
speciesIDandgroupcolumns.orthogroupsGRanges with gene locations and orthogroup assignments.
dirs$dnaPath to directory containing extracted DNA sequences (FASTA files per orthogroup).
- se
SummarizedExperiment. Orthologous splice junction data from
findOSJwith species-specific donor/acceptor positions inmcols.- 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 toNULLto use all available models.- nbThreads
Integer. Number of parallel threads for processing genes. Default: 1.
Value
The input SummarizedExperiment with additional mcols columns:
predDIDdonorPredicted DID for donor sites based on logit difference between groups. Positive values indicate stronger donor sites in group 2.
predDIDacceptorPredicted DID for acceptor sites based on logit difference between groups. Positive values indicate stronger acceptor sites in group 2.
<speciesID>.probDonorPredicted donor probability for each species.
<speciesID>.probAcceptorPredicted acceptor probability for each species.
Details
The function performs the following steps:
Extracts donor and acceptor positions for all species from the SummarizedExperiment.
Converts genomic coordinates to relative positions within genes (accounting for strand).
For each gene, extracts the DNA sequence and runs OpenSpliceAI prediction.
Averages predictions across models (if multiple) for robustness.
Computes predicted DID using logit differences between groups.
Requirements
The
openspliceaicommand-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 2predDID < 0: Splice site is stronger in group 1predDID ~ 0: Similar splice site strength in both groups
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])
} # }