msraredon / NICHES

Niche Interactions and Cellular Heterogeneity in Extracellular Signaling
https://msraredon.github.io/NICHES/
49 stars 15 forks source link

How to draw the heatmap blow using code in Vignette '01 NICHES Spatial.Rmd' #5

Closed Luosanj closed 2 years ago

Luosanj commented 2 years ago

Hi, I am very appreciated by your excellent work ! I have a question that how to draw the heatmap below using code in Vignette '01 NICHES Spatial.Rmd'? From the vignette, drawing the heatmap of principal components of cell-cell matrix is available but how to directly draw the celltype-celltype matrix heatmap? Thanks a lot ! image

jcyang34 commented 2 years ago

To group the columns by the cell type-cell type vectors after clustering, you can either give DoHeatmap a group.by flag group.by = 'VectorType' or change the identity back to VectorType via Idents(your_niches_obj) = "VectorType". For example, the heatmap in this vignette (https://msraredon.github.io/NICHES/articles/02%20NICHES%20Single.html) groups the columns by the VectorType since there is no change of identity.