navinlabcode / CellTrek

103 stars 18 forks source link

General Questions #3

Closed cadyyuheng closed 2 years ago

cadyyuheng commented 2 years ago

Hello!

Thanks a lot for sharing this fantastic package and huge congrats on your nature biotech publication! While we are trying to implement CellTrek to our data, we have some questions to understand the steps behind wrapped functions:

  1. You mentioned akima package has been used for interpolation to augment spatial resolution. We are confused about what exactly the interpolation step does here and what "augment spatial resolution" means.
  2. Even though we get the general idea that the RF distance matrix could be a # of cells * # of pixels matrix, could you please elaborate/give an example of how RF distance is calculated? We are a little lost when you mention "# of edges to the immediately shared ancestor on the tree" and "# of edges to the tree root". In particular, is your description based on a cell node or a pixel node on the tree? Is there any averaging among 1000 trees?
  3. KL-divergence has been used repeatedly as a benchmarking value. Could you please explain a bit how you define the value under this charting context?

Thank you in advance for your help!

Best, CY

WandeRum commented 2 years ago

Thank you for your interest. Yes, there are great questions. 1. the non-linear interpolation we used is to increase the number of spatial spots (add pseudo points), then cells could be better mapped with higher spatial resolution; 2. The RF distance is a metric to measure the similarity between spots and cells supervised by spatial coordinates. It is aggregated across all trees; 3. To measure the spatial KL-divergence, we need to convert cells/spots into a spatial kernel density. For example, to compare our method to the reference, for one cell type, we first convert them into a spatial density distribution, then use KL to measure their dissimilarities.

cadyyuheng commented 2 years ago

@WandeRum ,

Thanks a lot for your explanation -- it's really helpful!

Best, CY

DHGK commented 2 years ago

Hi @WandeRum,

I have a similar question regarding the spatial KL-divergence. I still did not quite understand how you would convert spots into a spatial kernel density distribution. Like how this distribution is defined, like, is this the density of all pairwise distances between spots/cells?

Moreover, it seems the KL score is cluster-specific. How did you guys identify/ annotate spatial clusters for the reference distribution? For example, I notice there is cell type annotation for single-cell allen brain data, but there is no such cell type annotation for the brain cortex spatial transcriptome data. Thank you!