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

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.

heatmap seurat scrnaseq scater • 488 views
ADD COMMENTlink modified 3 months ago by Biostar ♦♦ 20 • written 5 months ago by TJ40
1

i think this answers your question regarding how Seurat scales data: https://github.com/satijalab/seurat/issues/1166

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

ADD REPLYlink written 5 months ago by Amar640
1

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 5 months ago by TJ40
1

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 5 months ago by Amar640

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

ADD REPLYlink written 3 months ago by igor9.9k
Please log in to add an answer.

Help
Access

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