troutpy.tl.colocalization_proportion#
- troutpy.tl.colocalization_proportion(sdata, outpath, threshold_colocalized=1, filename='proportion_of_grouped_exRNA.parquet', save=True)#
Calculate the proportion of colocalized transcripts for each gene in the provided AnnData object.
- Parameters:
sdata (
SpatialData) – AnnData object with.Xmatrix containing the density of transcripts per gene.outpath (
str) – The directory path where the output file should be saved.threshold_colocalized (
int(default:1)) – The threshold for considering a transcript colocalized (default is 1).filename (
str(default:'proportion_of_grouped_exRNA.parquet')) – The name of the output file (default is ‘proportion_of_grouped_exRNA.parquet’).
- Returns:
coloc DataFrame containing the proportion of colocalized transcripts for each gene.