- dynamo.vf.acceleration(adata, basis='umap', vector_field_class=None, Qkey='PCs', method='analytical', **kwargs)
Calculate acceleration for each cell with the reconstructed vector field function. AnnData object 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.
AnnData) – AnnData object that contains the reconstructed vector field function in the uns attribute.
str) – The embedding data in which the vector field was reconstructed.
str) – The key of the PCA loading matrix in .uns.
str) – 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.