- dynamo.vf.acceleration(adata, basis='umap', vector_field_class=None, Qkey='PCs', method='analytical', **kwargs)[source]
Calculate acceleration for each cell with the reconstructed vector field function.
AnnData) – AnnData object that contains the reconstructed vector field function in the uns attribute.
basis (str or None (default: umap)) – The embedding data in which the vector field was reconstructed.
vectorfield) – If not None, the divergene will be computed using this class instead of the vector field stored in adata.
Qkey (str (default: 'PCs')) – The key of the PCA loading matrix in .uns.
method (str (default: 'analytical')) – The method that will be used for calculating acceleration field, either ‘analytical’ or ‘numerical’. ‘analytical’ method uses the analytical expressions for calculating acceleration field while ‘numerical’ method uses numdifftools, a numerical differentiation tool, for computing acceleration. ‘analytical’ method is much more efficient.
kwargs – Any additional keys that will be passed to vector_field_class.compute_acceleration function.
AnnData object that is updated with the ‘acceleration’ key in the .obs as well as .obsm. If basis is pca, acceleration matrix will be inverse transformed back to original high dimension space.