troutpy.tl.gene_specific_interactions#
- troutpy.tl.gene_specific_interactions(sdata, copy=False, gene_key='gene')#
Group the read-specific interaction scores into gene-specific scores
- Parameters:
sdata (spatialdata.SpatialData) – A SpatialData object including precomputed communication strenghts for each exRNA
copy (bool) – Wether to save the resulting sdata as a copy
gene_key (str) – column in sdata[‘source_table’] containing gene assignment for each transcript
- Returns:
sdata A 3D array of shape (num_categories, H, W) containing mean values per category.