multimil.utils.score_top_cells

multimil.utils.score_top_cells#

multimil.utils.score_top_cells(adata, top_fraction=0.1, sample_key=None, key_added='top_cell_attn')#

Score top cells based on cell attention weights.

Parameters:
  • adata – Annotated data object with cell attention weights in adata.obs['cell_attn'].

  • top_fraction (default: 0.1) – Fraction of top cells to select based on attention weights (default is 0.1).

  • sample_key (default: None) – Key in adata.obs that identifies samples. If None, will calculate across all cells.

  • key_added (default: 'top_cell_attn') – Key in adata.obs to store the top cell attention scores (default is ‘top_cell_attn’).