show.velocity.on.embedding.eu: Visualize RNA velocities on an existing embedding using...

Description Usage Arguments Value

View source: R/momentum_routines.R

Description

based on Euclidean distance of the extrapolated cell to others The direction of the arrow is towards n closest neighbors. The magnitude of the arrow is determined by the cosine projection of the velocity on to the chosen direction n=1 will only show arrows for cells that end up being projected closer to some other cell than to the original position n=k (k>1) will show an average direction Given an expression distance between cells d, and ratio of extrapolated to current expression distances between cells f, the transition probability is calculated as exp(- (d*(f^beta))^2/(2*sigma^2) )

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
show.velocity.on.embedding.eu(emb, vel, n = 30, embedding.knn = TRUE,
  cell.colors = NULL, sigma = NA, beta = 1, arrow.scale = 1,
  scale = "log", nPcs = NA, arrow.lwd = 1, xlab = "", ylab = "",
  control.for.neighborhood.density = TRUE, ntop.trajectories = 1,
  do.par = T, show.cell.arrows = NULL, show.cell.trajectories = NULL,
  show.trajectories = FALSE, show.all.trajectories = FALSE,
  show.cell.diffusion.posterior = NULL, show.grid.flow = FALSE,
  diffusion.steps = 10, cell.dist = NULL,
  trajectory.spline.shape = 1, cell.color.alpha = 0.5,
  n.cores = defaultNCores(), n.trajectory.clusters = 10, ...)

Arguments

emb

embedding to be used for projection

vel

velocity result

n

neighborhood size (default=30)

embedding.knn

pre-calculated kNN

cell.colors

named color vector for cell plotting

sigma

sigma to use in calculating transition probability from the eucledian distance (estimated automatically by default)

beta

beta parameter used in calculation of transition probability (by default=1)

arrow.scale

additional scaling factor for the arrows (default=1)

scale

scale to use in calculating distances (default: 'log', also supported 'sqrt'

nPcs

number of PCs to project the cells onto (to perform distance calculations in lower dimensions), default=NA which turns off PCA dimensional reduction

arrow.lwd

arrow line width

xlab

x axis label

ylab

y axis label

control.for.neighborhood.density

compensate for cell density variations in the embedding (default: TRUE)

ntop.trajectories

number of top trajectories to trace back for a given cell (when show.trajectories=TRUE)

do.par

whether to reset plotting parameters (default=TRUE)

show.cell.arrows

show detailed velocity projection for the specified cell

show.cell.trajectories

show trajectories for a specified cell

show.trajectories

show top median diffusion trajectories

show.all.trajectories

show all diffusion paths (messy)

show.cell.diffusion.posterior

show diffusion posterior of a given cell

show.grid.flow

show velocity projections on a grid

diffusion.steps

number of diffusion steps to take forward (default=10)

cell.dist

- optional custom distance (must include all of the cells that are intersecting between emb and vel)

trajectory.spline.shape

shape parameter for smoothing median cell trajectories (default=1)

cell.color.alpha

trasparency parameter to apply when showing cell colors

n.cores

number of cores to use in calculations

n.trajectory.clusters

number of trajectory clusters to show median paths for (when show.trajectories=TRUE)

...

extra parameters are passed to the plot() function

Value

transition probability matrix


velocyto-team/velocyto.R documentation built on Dec. 8, 2019, 3:07 a.m.