You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Tangram to annotate my spatial data (10X) using single cell data. I would like to better understand the output of project_cell_annotations().
It says “INFO:root:spatial prediction dataframe is saved in obsmtangram_ct_pred of the spatial AnnData.”
I looked at the tangram_ct_pred matrix. It is a voxel X annotation matrix. I would like to understand each entry in the matrix. From the values, it does not seem like probability value ( there are values > 2). So is it some kind of score? What is its scale. How do I convert each row in to a set of probability values over the different annotations for each individual cell (each row sum = 1)? Or like a percentage composition set of values for each cell (each row sum = 1). How to best interpret values?
The text was updated successfully, but these errors were encountered:
Hi @abhishekmaj08, thank you for your patience!! More importantly, thank you for your interest in Tangram.
project_cell_annotations is a method which leads to the creation of tangram_ct_pred dataframe inobsm which transfers cell annotations onto to space using the mapping matrix. You are right, these aren't probability values. When we take a look at this method, we can see that tangram_ct_pred is a dot product between mapping matrix.T(voxel x cell) and one hot encoding of cell types across all cells in the single cell data.
The idea behind this dataframe to support plotting cell type annotations in space in case of a soft assignment mapping. The tangram_ct_pred is clipped and normalized and then these values become the proportion of a certain cell type in each spot.
May I ask: are you trying to compute out the percentage of each cell type within each voxel? or like assign a single cell type to each voxel? Because for either of these tasks I would recommend using the mapping matrix which is the probability values of assigning each cell to a voxel.
I hope this explanation is useful to you! Otherwise, please let me know. I'm happy to help :)
Hi,
I would like to know how to assign a cell type to each spot. Would using the maximum value in tangram_ct_pred to determine the cell type for each spot be suitable?
Greetings,
I am using Tangram to annotate my spatial data (10X) using single cell data. I would like to better understand the output of project_cell_annotations().
It says “INFO:root:spatial prediction dataframe is saved in
obsm
tangram_ct_pred
of the spatial AnnData.”I looked at the tangram_ct_pred matrix. It is a voxel X annotation matrix. I would like to understand each entry in the matrix. From the values, it does not seem like probability value ( there are values > 2). So is it some kind of score? What is its scale. How do I convert each row in to a set of probability values over the different annotations for each individual cell (each row sum = 1)? Or like a percentage composition set of values for each cell (each row sum = 1). How to best interpret values?
The text was updated successfully, but these errors were encountered: