Aggregating ULM cell-type scores by cluster

Hi! I am using decoupler.mt.ulm with a network of cell-type marker genes to obtain cell-type enrichment scores, basically following the cell-type scoring approach shown in the single-cell enrichment analysis tutorial.

I would like to summarize these scores at the cluster level, so that I obtain a single enrichment score for each Leiden cluster Ɨ candidate cell type combination. My idea is to aggregate the cell-level ULM scores within each Leiden cluster, for example by taking the mean or median. I would then like to visualize the resulting cluster Ɨ cell-type matrix as a heatmap and use it as one source of information for cluster annotation.

So, my questions are:

  • Does this approach make statistical sense for ULM enrichment scores?
  • Is there a preferred aggregation method for these scores?
  • Does decoupler already provide a function for this type of aggregation?

Thank you!

Hi @albi,

You can directly do this with sc.pl.matrixplot if you only want to visualize the aggregated scores. If you want to keep them as an object you can use dc.pp.pseudobul but instead of using mode='sum' you can use mode='mean’. You can check how to do it in the decoupler vignettes: single-cell and pseudobulk

Hope this is helpful!

1 Like