Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell type percentages per spot based on Tangram cell probabilities? #35

Open
carloelle opened this issue Jun 21, 2021 · 1 comment
Open

Comments

@carloelle
Copy link

Hi,

from the matrix P(spatial spots X cells) I'd like to get the percentages for each cell type per spot.
Starting from the probability matrix spatial spots X cells, I was thinking to proceed in this way:

  1. assign to each cell a known cell type
  2. calculate the median probability per cell type, obtaining the matrix spatial spot X cell type
  3. normalize each row value on the rowSum
  4. (optional) filter out values < 0.01 and rescale percentages similarly in (3)

Do you see any pitfalls in this methodology? Would you recommend any another strategies to calculate cell type percentages per spot? I observed that generalising on cell types starting from individual cell probabilities gives me slightly better predictions rather than calculating the probability for each cell type, but maybe it's data-dependent.

Best,
Carlo

@lewlin
Copy link
Collaborator

lewlin commented Jul 8, 2021

Ciao Carlo,

In order to get the percentage of cell types per spot I would deconvolve. This means that you need to have prior information of how many cells you have per spot (eg via segmenting the corresponding H&E, if using Visium). You then need to deterministically assign the cells within the spot, then compute the percentage.

Alternatively, you can attempt the strategy you described although I am not entirely sure results will be consistent. Can you describe me in more detail how you want to do (1) and (3)?

Ciao,

@lewlin lewlin closed this as completed Jun 3, 2022
@lewlin lewlin reopened this Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants