dynamo.vf.speed

dynamo.vf.speed(adata, basis='umap', vector_field_class=None, method='analytical')[source]

Calculate the speed for each cell with the reconstructed vector field function.

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

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

  • vector_field_class (Optional[BaseVectorField]) – If not None, the speed will be computed using this class instead of the vector field stored in adata. You can set up the class with a known ODE function, useful when the data is generated through simulation.

  • method (str) – The method that will be used for calculating speed, either analytical or numeric. analytical method will use the analytical form of the reconstructed vector field for calculating Jacobian. Otherwise, raw velocity vectors are used.

Return type:

AnnData

Returns:

AnnData object that is updated with the ‘speed’ key in the .obs.