BayraktarLab / cell2location

Comprehensive mapping of tissue cell architecture via integrated single cell and spatial transcriptomics (cell2location model)
https://cell2location.readthedocs.io/en/latest/
Apache License 2.0
321 stars 58 forks source link

Is it possible to conduct an enrichment analysis with predefined cluster, using cell abundance value? #283

Closed jeji0209 closed 1 year ago

jeji0209 commented 1 year ago

Please use the template below to post a question to https://discourse.scverse.org/c/ecosytem/cell2location/.

Hello, thank you for development of this tool. My goal is to subset a group of spots that is estimated to be a particular region, and conduct further downstream analysis within that region, e.g. DGE analysis between different conditions. I have conducted clustering via Scanpy, and one cluster indicates my region of interest, based on biological ground truth. However, for a concrete analysis of cell type annotation, I would like to utilize the 'q05_cell_abundance_w_sf' metrics in cell2location. Is it statistically appropriate to conduct an enrichment analysis (e.g. wilcoxon rank sum test) of each cluster using this metrics, and assign cell types based on the results?

vitkl commented 1 year ago

Is it statistically appropriate to conduct an enrichment analysis (e.g. wilcoxon rank sum test) of each cluster using this metrics, and assign cell types based on the results?

I don't fully understand your problem. If you want to find cell types enriched in a particular anatomical area you can use any statistical test (wilcoxon, t-test).

If you want to define areas using cell abundance you can binarise the cell abundance. For example, I use 99.9 quantiles (or top-{10-50} locations) to get locations most strongly enriched in the cell type of interest. Then you can use the binary labels to compute to perform enrichment tests wrt other info - such as other cell types, and anatomical features.

It is incorrect to label Visium locations with 1 cell type label because each location contains many cells cell types.

jeji0209 commented 1 year ago

I believe the method I was looking for was your second suggestion, binarising the cell abundance. Thank you for your reply :)