Hi,
I'm looking to use the plotHeatmap
function from scater
package using a list of differentially expressed genes that have particular column labels for each cell (cluster labels). When I run differential expression using Seurat's standard method (Wilcoxon Rank Sum Test) then run DoHeatmap()
, it requires the SeuratObject to undergo ScaleData
before being able to call it for creating the heatmap. When I take the same list of differentially expressed genes and plug it into plotHeatmap
function in scater with the logcounts values from SingleCellExperiment object, I do not get the same "pattern" as what's generated by Seurat's DoHeatmap
function even though input genes and dataset is the same. I suspect it has to do with how I'm scaling (or not scaling) the data. My question is how exactly does Seurat scale data and can I replicate this with scater?
Thank you.
i think this answers your question regarding how
Seurat
scales data: https://github.com/satijalab/seurat/issues/1166Can you apply
ScaleData
to the data first then plug it intoplotHeatmap
?Thank you for finding that! I also just ran into this as well (somehow I missed this before posting): scRNA-seq, SEURAT, NormalizeData, ScaleData, PCA, CCA ... I didn't know how to pull the scaled data directly from Seurat object to plug into
plotHeatmap
... I will look into this. Thanks again.Happy to help. Can you please come back when you've found the answer and let us know? You can post and mark your own answer is accepted/correct. It would be of great use to future bioinformaticians!
In case you have not figured it out yet, to get the scaled data, use
GetAssayData(object, slot = "scale.data")
.