bento.tl.comp¶
- bento.tl.comp(sdata, points_key, shape_names) SpatialData¶
Calculate the average gene composition for shapes across all cells.
- Parameters:
sdata (SpatialData) – SpatialData object.
points_key (str) – Key for points DataFrame in sdata.points.
shape_names (List[str]) – Names of shapes to calculate compositions for.
- Returns:
Updated SpatialData object with average gene compositions for each shape stored in sdata.tables[“table”].uns[“comp_stats”].
- Return type:
SpatialData