tangram.utils.create_segment_cell_df

tangram.utils.create_segment_cell_df(adata_sp)

Produces a Pandas dataframe where each row is a segmentation object, columns reveals its position information.

Parameters

adata_sp (AnnData) – spot-by-gene AnnData structure. Must contain obsm.[‘image_features’]

Returns

None. Update spatial AnnData.uns[‘tangram_cell_segmentation’] with a dataframe: each row represents a segmentation object (single cell/nuclei). Columns are ‘spot_idx’ (voxel id), and ‘y’, ‘x’, ‘centroids’ to specify the position of the segmentation object. Update spatial AnnData.obsm[‘trangram_spot_centroids’] with a sequence