Estimate displacement vectors on a grid.
This function matches scTour's vector_field_embedding_grid exactly.
The calculation borrows the ideas from scvelo.
Usage
vector_field_embedding_grid(E, V, smooth = 0.5, stream = FALSE, density = 1)
Arguments
- E
Embedding matrix (cells x 2)
- V
Displacement vectors (cells x 2)
- smooth
Smoothing factor for Gaussian pdf (default: 0.5)
- stream
Adjust for streamplot (default: FALSE)
- density
Grid density (default: 1.0)
Value
List with E_grid and V_grid