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 inanndata.AnnData.obs
where the cluster labels are stored.copy (
bool
(default:False
)) – IfTrue
, return the result, otherwise save it to theadata
object.
- Return type:
- Returns:
If
copy = True
, returns adict
with the cluster labels as keys and the curl score as values.- Otherwise, modifies the
adata
with the following key: anndata.AnnData.uns
['shape_{{cluster_key}}']['{{out_key}}']
- - the above mentioneddict
.
- Otherwise, modifies the