Description Usage Arguments Details Value Author(s) Examples
Project the velocity vector for each cell onto an existing low-dimensional embedding.
1 2 3 4 5 6 7 | embedVelocity(x, vobj, ...)
## S4 method for signature 'ANY'
embedVelocity(x, vobj, ...)
## S4 method for signature 'SingleCellExperiment'
embedVelocity(x, vobj, ..., use.dimred = 1)
|
x |
A numeric matrix of low-dimensional coordinates, e.g., after t-SNE.
Alternatively, a SingleCellExperiment containing such coordinates in its |
vobj |
A SingleCellExperiment containing the output of the velocity calculations,
typically after running |
... |
For the generic, further arguments to pass to specific methods. For the ANY method, further arguments to pass to the For the SingleCellExperiment method, further arguments to pass to the ANY method. |
use.dimred |
String or integer scalar specifying the reduced dimensions to retrieve from |
This is a simple wrapper around the scvelo.tools.velocity_embedding
function.
Briefly, we construct a cell-cell transition matrix where a cell is more likely to transition to one of its neighbors
if its velocity vector is pointing in the same direction as that neighbor.
The resulting matrix is then used to compute a weighted average of the positions in x
,
allowing us to compute a velocity in the low-dimensional embedding.
A numeric matrix of the same dimensions as x
, containing the projected velocity vectors in that embedding.
Aaron Lun
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.