cellcharter.tl.boundaries

Contents

cellcharter.tl.boundaries#

cellcharter.tl.boundaries(adata, cluster_key='component', min_hole_area_ratio=0.1, alpha_start=2000, copy=False)#

Compute the topological boundaries of sets of cells.

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

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

  • min_hole_area_ratio (float (default: 0.1)) – Minimum ratio between the area of a hole and the area of the boundary.

  • alpha_start (int (default: 2000)) – Starting value for the alpha parameter of the alpha shape algorithm.

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

Return type:

None | dict[int, Polygon]

Returns:

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

Otherwise, modifies the adata with the following key: