dynamo.tl.velocity_N

dynamo.tl.velocity_N(adata, group=None, recalculate_pca=True, recalculate_umap=True, del_2nd_moments=None)[source]

use new RNA based pca, umap, for velocity calculation and projection for kinetics or one-shot experiment.

Note that currently velocity_N function only considers labeling data and removes splicing data if they exist.

Parameters
  • adata (AnnData) – AnnData object that stores data for the the kinetics or one-shot experiment, must include X_new, X_total layers.

  • group (str or None (default: None)) – The cell group that will be used to calculate velocity in each separate group. This is useful if your data comes from different labeling condition, etc.

  • recalculate_pca (bool (default: True)) – Whether to recalculate pca with the new RNA data. If setting to be False, you need to make sure the pca is already generated via new RNA.

  • recalculate_umap (bool (default: True)) – Whether to recalculate umap with the new RNA data. If setting to be False, you need to make sure the umap is already generated via new RNA.

  • del_2nd_moments (None or bool) – Whether to remove second moments or covariances. Default it is None rgument used for dynamics function.

Returns

  • Nothing but the adata object is updated with the low dimensional (umap or pca) velocity projections with the

  • new RNA or pca based RNA velocities.