cellcharter.tl.curl

Contents

cellcharter.tl.curl#

cellcharter.tl.curl(adata, cluster_key='component', out_key='curl', copy=False)#

Compute the curl score of the topological boundaries of sets of cells.

It computes the curl score of each cluster as one minues the ratio between the length of the major axis of the minimum bounding rectangle and the fiber length of the polygon.

Parameters:
  • adata (AnnData) – Annotated data object.

  • cluster_key (str (default: 'component')) – Key in anndata.AnnData.obs where the cluster labels are stored.

  • copy (bool (default: False)) – If True, return the result, otherwise save it to the adata object.

Return type:

None | dict[int, float]

Returns:

If copy = True, returns a dict with the cluster labels as keys and the curl score as values.

Otherwise, modifies the adata with the following key: