Hi, and thank you for the great work on Enrichmap, it has been my go‑to tool for identifying patterns in my Visium HD data.
I’m currently using Enrichmap for cell-type assignment across multiple spatial domains, and I would like to confirm that my workflow is appropriate for cell‑segmented Visium HD data (i.e., using actual cell boundaries rather than bins). Based on the paper, it seems feasible, but I want to make sure what I am doing actually makes sense.
Summary of My Workflow
Data setup
- Three Visium HD samples (lung cancer), concatenated into a single AnnData object.
- Cell segmentation performed → each observation corresponds to a cell, not a bin.
- 12 spatial domains (clusters) - batch corrected and comparable across the 3 samples.
- 21 curated cell-type gene sets.
Enrichmap scoring
- I compute Enrichmap scores for each cell across all gene sets across all 250k segmented cells.
em.tl.score(
adata=self.adata,
gene_set=self.marker_genes,
smoothing=True,
correct_spatial_covariates=True,
batch_key=self.batch_key, # in this case, is sample_id (3 samples)
)
- For each domain, I perform a one‑vs‑rest Wilcoxon test on Enrichmap scores for each cell type (with padjusting).
- Compute mean change (domain vs. rest).
- Use an “elbow” type of approach to identify the largest gap in mean change → assign the most likely cell type per domain.
Additional diagnostics
For each domain, I also compute:
- Moran’s I (using spatial graphs built per sample)
- Cell-type proportions (argmax of Enrichmap scores per cell)
This would give something like:
| Scenario |
Interpretation |
| High mean change + high proportion + high Moran's I |
Strong, spatially coherent cell-type identity; this domain is clearly X cell type |
| High mean change + low proportion + high Moran's I |
Minority but spatially clustered cell type defining the domain (e.g., immune infiltrate hotspot, I am seeing in my data a few of fibroblasts + b cell for example) |
| High mean change + high proportion + low Moran's I |
Cell type is common and enriched but spatially scattered (no spatial substructure) |
| Low mean change + high proportion |
Cell type is common in this domain but also common elsewhere (not discriminative) |
Here is an example of one of the plots:
We see that domain would most likely be assigned to be a Fibroblast, but seems to be enriched (light blue) with b cells and smooth muscle. Cell type proportions and Morans I then shows a bit more detail on this (Essentially, is that domain guaranteed to be mostly Fibroblast or could we assign it as something like stormal-imune, etc)
Main Question
Is Enrichmap suitable and recommended for cell-type assignment in cell-segmented Visium HD data?
In other words, is it valid to use Enrichmap scores at the single‑cell level (rather than bin level) for domain‑level cell-type inference? Overall I am getting really strong cell typing results, and they make sense. I see pericytes cells where they should be present comparing to the HE image, same thing with smooth muscle/connective tissue, and so on, so I would assume this is indeed possible with Enrichmap
I guess the results will mostly depend on how good my gene sets are, and not so much on Enrichmap approach (which is very solid as is). I was using AUCell, and enrichmap gives far better discrimination/granulation of my data.
If there are aspects of this workflow that you would advise modifying or validating differently, I would be very interested to hear your thoughts! Thanks again for the great work done with Enrichmap!
Hi, and thank you for the great work on Enrichmap, it has been my go‑to tool for identifying patterns in my Visium HD data.
I’m currently using Enrichmap for cell-type assignment across multiple spatial domains, and I would like to confirm that my workflow is appropriate for cell‑segmented Visium HD data (i.e., using actual cell boundaries rather than bins). Based on the paper, it seems feasible, but I want to make sure what I am doing actually makes sense.
Summary of My Workflow
Data setup
Enrichmap scoring
Additional diagnostics
For each domain, I also compute:
This would give something like:
Here is an example of one of the plots:
We see that domain would most likely be assigned to be a Fibroblast, but seems to be enriched (light blue) with b cells and smooth muscle. Cell type proportions and Morans I then shows a bit more detail on this (Essentially, is that domain guaranteed to be mostly Fibroblast or could we assign it as something like stormal-imune, etc)
Main Question
Is Enrichmap suitable and recommended for cell-type assignment in cell-segmented Visium HD data?
I guess the results will mostly depend on how good my gene sets are, and not so much on Enrichmap approach (which is very solid as is). I was using AUCell, and enrichmap gives far better discrimination/granulation of my data.In other words, is it valid to use Enrichmap scores at the single‑cell level (rather than bin level) for domain‑level cell-type inference? Overall I am getting really strong cell typing results, and they make sense. I see pericytes cells where they should be present comparing to the HE image, same thing with smooth muscle/connective tissue, and so on, so I would assume this is indeed possible with Enrichmap
If there are aspects of this workflow that you would advise modifying or validating differently, I would be very interested to hear your thoughts! Thanks again for the great work done with Enrichmap!