Question: How to scale data for scater plotHeatmap function similar to Seurat?
gravatar for TJ
11 months ago by
Stanford University
TJ40 wrote:


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.

heatmap seurat scrnaseq scater • 949 views
ADD COMMENTlink modified 10 months ago by Biostar ♦♦ 20 • written 11 months ago by TJ40

i think this answers your question regarding how Seurat scales data:

Can you apply ScaleData to the data first then plug it into plotHeatmap?

ADD REPLYlink written 11 months ago by Mark800

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.

ADD REPLYlink written 11 months ago by TJ40

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!

ADD REPLYlink written 11 months ago by Mark800

In case you have not figured it out yet, to get the scaled data, use GetAssayData(object, slot = "").

ADD REPLYlink written 10 months ago by igor11k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1338 users visited in the last hour