troutpy.tl.compute_distant_cells_proportion#
- troutpy.tl.compute_distant_cells_proportion(sdata, gene_key='gene', threshold=30, copy=False)#
Compute the proportion of transcripts for each gene that are located beyond a specified distance (in um) from their closest source cell, and add the result to the metadata of the SpatialData object.
- Parameters:
sdata (
SpatialData) – A SpatialData object containing the spatial omics data.gene_key (
str(default:'gene')) – Column name in the transcript data representing gene identifiers. Default is ‘feature_name’.threshold (
int(default:30)) – The distance threshold (in micrometers) to calculate the proportion of transcripts farther away from their closest source cell. Default is 30.
- Returns:
None