nichesphere.tl.get_spot_ct_props#
- nichesphere.tl.get_spot_ct_props(spot_cell_props, sc_ct)#
Get cell type proportions per spot by summing the probabilities of cells of the same kind in each spot
- Parameters:
spot_cell_props (pd.DataFrame) – Dataframe containing probabilities of mapping each cell to each spot (spot ids = index , cell ids = columns)
sc_ct (pd.Series) – Series of cell type per cell with cell ids as indexes
- Returns:
spot_mapped_cts – Dataframe containing probabilities of mapping each cell type to each spot (spot ids = index , cell types = columns)
- Return type:
pd.DataFrame