livnatje / DIALOGUE

DIALOGUE is a dimensionality reduction method that uses cross-cell-type associations to identify multicellular programs (MCPs) and map the cell transcriptome as a function of its environment.
Other
106 stars 16 forks source link

Example code to reproduce results of spatial dataset analyses #34

Closed bmill3r closed 1 year ago

bmill3r commented 1 year ago

Hi @livnatje,

Thanks so much for creating DIALOGUE - the MCPs look like they may have the potential to uncover some really interesting biology in different spatial niches.

I'm actually interested in applying this tool to some of my own spatial datasets, however, I think I need some more detailed instructions to make sure I am running it properly. Are you able to share some of your code to reproduce some of the spatial datasets analyses in the paper? For example, the Slide-seq dataset from Rodriques, 2019 in Figure 2, or the MERFISH data shown in Figure 1c-d? I'm familiar with both of these datasets so seeing how you preprocessed and input them into DIALOGUE would be helpful.

If not, then are you able to provide a toy example as to how to use spatial data? Based on the tutorial, I am not sure how to incorporate the spatial information. Would samples be the spatial coordinates, or would it be predefined spatial niches in the data that cells of a given cell type belong to? Downstream of making the rA list, are there any other parameters or flags that are required for spatial data?

Finally, I noticed functions within DIALOGUE.run to center and normalize the data. Given this, would you recommend using the cell x gene raw counts matrix as input?

Thank you for your time and happy to help clarify any questions above, Brendan

livnatje commented 1 year ago

Hi Brendan,

Thank you!

Did you see the toy example? https://github.com/livnatje/DIALOGUE/wiki/Example.

In the case of spatial data a "sample" would be a window or field of view (FOV) within the section. The specific size of that FOV depends on the type of MCPs you are interested in (i.e., micro- or macro-environment).

Make sure to set spatial.flag = TRUE as the input parameter to DIALOGUE.run.

As input, TPM is recommended.

Thanks, Livnat

bmill3r commented 1 year ago

Hi @livnatje,

Thanks so much for getting back to me! I did see the toy example but it wasn't immediately clear about using FOVs as "samples" when making cell.type objects using spatial data, so thank you for clarifying.

With respect to the spatial.flag, do you mean for the spatial.flag to be (FALSE, i.e., F), or TRUE (i.e., T)?

Thanks again, Brendan

livnatje commented 1 year ago

Hi @bmill3r,

Great, glad it helped clarify. Yes, exactly, spatial.flag = TRUE - corrected now thanks. Let me know if you have any other questions.

Thanks, Livnat