dynamo.vf.curvature¶
-
dynamo.vf.
curvature
(adata, basis='umap', vector_field_class=None, formula=2, **kwargs)[source]¶ Calculate curvature 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 (str or None (default: umap)) – The embedding data in which the vector field was reconstructed.
vector_field_class (
vectorfield
) – If not None, the divergene will be computed using this class instead of the vector field stored in adata.formula (int (default: 2)) – Which formula of curvature will be used, there are two formulas, so formula can be either {1, 2}. By default it is 2 and returns both the curvature vectors and the norm of the curvature. The formula one only gives the norm of the curvature.
- Returns
adata – AnnData object that is updated with the curvature key in the .obs.
- Return type
AnnData