scispy.tl.shapes_of_cell_type

scispy.tl.shapes_of_cell_type#

scispy.tl.shapes_of_cell_type(sdata, celltype, obs_key='celltype_spatial', shape_key='myshapes')#

Extract shapes from a celltype. First step for the mean shape.

Parameters:
  • sdata (SpatialData) – SpatialData object.

  • celltype (str) – name of the cell type we want to extract

  • obs_key (str (default: 'celltype_spatial')) – name of column where cell type can be found in sdata.table.obs

  • shape_key (str (default: 'myshapes')) – key of element shape

Return type:

list

Returns:

List of boundary coordinates for each cell.