bento.tl.fe¶
- bento.tl.fe(sdata, net, instance_key='cell_boundaries', source='source', target='target', weight='weight', batch_size=10000, min_n=0)¶
Perform functional enrichment of RNAflux embeddings. Uses decoupler wsum function.
- Parameters:
sdata (SpatialData) – Spatial formatted SpatialData object.
net (DataFrame) – DataFrame with columns “source”, “target”, and “weight”. See decoupler API for more details.
source (str, optional) – Column name for source nodes in net. Default “source”.
target (str, optional) – Column name for target nodes in net. Default “target”.
weight (str, optional) – Column name for weights in net. Default “weight”.
batch_size (int) – Number of points to process in each batch. Default 10000.
min_n (int) – Minimum number of targets per source. If less, sources are removed.
- Returns:
sdata –
- .points[“cell_boundaries_raster”][“flux_fe”]DataFrame
Enrichment scores for each gene set.
- Return type:
SpatialData