Computes a Percent Spliced In (PSI) matrix for all splice events defined in
event_data. Only applies to objects in junction mode; in
event mode PSI is computed at construction time.
Usage
CalculatePSI(object, events = NULL, ...)
# S4 method for class 'MatisseObject'
CalculatePSI(
object,
events = NULL,
min_coverage = 5L,
na_fill = NA_real_,
verbose = TRUE
)
# S4 method for class 'ANY'
CalculatePSI(
object,
events,
min_coverage = 5L,
na_fill = NA_real_,
verbose = TRUE
)Arguments
- object
A
MatisseObjectin junction mode, or a sparse matrix (cells × junctions).- events
When
objectis a matrix: adata.framewith columnsevent_id,inclusion_junctions, andexclusion_junctions. Whenobjectis aMatisseObjectthis defaults toGetEventData(object).- ...
Additional arguments passed to the method.
- min_coverage
Integer. Minimum total reads per cell per event to report a PSI value. Default:
5.- na_fill
Numeric. Replacement for low-coverage entries. Default:
NA_real_.- verbose
Logical. Print progress. Default:
TRUE.
Value
A MatisseObject (when given one) or a PSI matrix.
MatisseObject: the input object with the"psi"assay populated inside the embedded Seurat object.matrix: a dense matrix (cells × events) of PSI values.
Details
For each cell \(c\) and event \(e\):
$$PSI_{c,e} = \frac{\sum \text{inclusion reads}} {\sum \text{inclusion reads} + \sum \text{exclusion reads}}$$
Results are stored inside the embedded Seurat object as a
Assay5 named "psi", with:
"data"layer: PSI values in \([0,1]\) (events × cells)."counts"layer: inclusion read counts (events × cells)."exclusion"layer: exclusion read counts (events × cells).
Entries where total coverage falls below min_coverage are set to
NA in the "data" layer.