bento.tl.comp

bento.tl.comp(sdata, points_key, shape_names)

Calculate the average gene composition for shapes across all cells.

Parameters:
  • sdata (spatialdata.SpatialData) – Spatial formatted SpatialData object.

  • shape_names (list of str) – Names of shapes to calculate compositions for.

Returns:

sdata – Updates sdata.table.uns with average gene compositions for each shape.

Return type:

spatialdata.SpatialData