MarcElosua / SPOTlight

Spatial Transcriptomics Capture Location Deconvolution
https://marcelosua.github.io/SPOTlight
GNU General Public License v3.0
159 stars 25 forks source link

Questions about some details in paper #107

Closed NianzhenGu closed 9 months ago

NianzhenGu commented 10 months ago

Hi! I read through the paper and I think it is a very inspiring method. However, I have some questions about your explanation of the SPOTlight algorithm.

  1. I think P is the final matrix we want to calculate. Then how can we use 1-P to initialize the W? Also, will the initial entries of W be 0 or 1?

Before running factorization, we initialize each topic, column, of W with the unique marker genes for each cell type with weights 1 – P value.

  1. What is the meaning of "the corresponding belongance of each cell for each topic"? How do we know which cell belongs to which topic if the topic has no meaning at the beginning?

Each topic of H in SPOTlight is initialized with the corresponding belongance of each cell for each topic, 1 or 0.

  1. Here is my understanding of the workflow. I also put the equation of nsNMF and NNLF. Is it correct? For the nsNMF, as matrix S contains a variable theta, I wonder how you decide the value of it.

    workflow
  2. For the Jensen-Shannon Divergence (JSD) distance metric used in Performance evaluation, are the P and Q the same as the previous matrix?

I'm very appreciate it if you could give me some explanations. Thank you very much!

MarcElosua commented 9 months ago

Hi @NianzhenGu,

  1. I think P is the final matrix we want to calculate. Then how can we use 1-P to initialize the W? Also, will the initial entries of W be 0 or 1?

    In this case P refers to the P-value, see ... weights 1 – P value. Therefore initial entries of W are 1e-12 or 1 - p-value for that gene in that cell-type associated topic.

  2. What is the meaning of "the corresponding belongance of each cell for each topic"? How do we know which cell belongs to which topic if the topic has no meaning at the beginning?

    In this case we want to force NMF to ideally learn a topic that represents a cell type/state. Therefore in the H matrix all the cells that belong to the same cell type have a 1 in the topic associated to that cell type and a 0 in the others

  3. I am using the NMF and nnls package implementation in R. Find here more details for NMF and here more details for nnls.

  4. For the Jensen-Shannon Divergence (JSD) distance metric used in Performance evaluation, are the P and Q the same as the previous matrix?

    In that case P and Q are the matrices with the ground truth and predicted proportions.

Hope this helps!

NianzhenGu commented 9 months ago

Thanks for the explanation!