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 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.

  • adata (AnnData) – AnnData object that contains the reconstructed vector field function in the uns attribute.

  • basis (str) – The embedding data in which the vector field was reconstructed.

  • vector_field_class (Optional[BaseVectorField]) – If not None, the divergene will be computed using this class instead of the vector field stored in adata.

  • Qkey (str) – The key of the PCA loading matrix in .uns.

  • method (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.