Seurat: Integrated heatmap/dotplot

Created on 20 Jun 2019  路  3Comments  路  Source: satijalab/seurat

Hello,

I've integrated 7 datasets using SCTransform followed by integration

wtME <- Read10X(data.dir = './ME/outs/filtered_feature_bc_matrix/')
wtME <- CreateSeuratObject(counts = wtME, project = "10X_wtME")
wtME <- PercentageFeatureSet(object = wtME, pattern = "^MT-", col.name = "percent.mt") 
wtME <- PercentageFeatureSet(object = wtME, pattern = "RPL", col.name = "percent.RPL") 
wtME <- PercentageFeatureSet(object = wtME, pattern = "RPS", col.name = "percent.RPS")
wtME <- subset(x = wtME, subset = nFeature_RNA > 2500 & percent.mt < 20)
wtME <- CellCycleScoring(object = wtME, s.features = s.genes, g2m.features = g2m.genes, set.ident = TRUE)
wtME <- SCTransform(object = wtME, vars.to.regress = c("percent.mt","S.Score", "G2M.Score", "percent.RPL", "percent.RPS"), verbose = FALSE)

..... for all 7 samples....

vitDcca <- FindIntegrationAnchors(object.list = list(wrE14, wrD14, wtME, wtMD, wrE7, wrD7, awE7), dims = 1:60)
vitDcca <- IntegrateData(anchorset = vitDcca, dims = 1:60)
DefaultAssay(object = vitDcca) <- "integrated"
vitDcca <- ScaleData(object = vitDcca, verbose = FALSE)
vitDcca <- RunPCA(object = vitDcca, npcs = 60, verbose = FALSE)
vitDcca <- FindNeighbors(object = vitDcca, reduction = "pca", dims = 1:40)
vitDcca <- FindClusters(vitDcca, resolution = 0.4) #modularity of 0.89
vitDcca <- RunUMAP(object = vitDcca, reduction = "pca", dims = 1:40)
DimPlot(object = vitDcca, reduction = "umap")

So now I have my integrated dataset that contains an RNA assay, SCT assay and Integrated Assay.

First I performed FindAllMarkers on the RNA assay, and am currently running FindConservedMarkers on the RNA assay to obtain highly expressed genes in each cluster.

I attempted to do a heatmap but received this error:

Error in DoHeatmap(subset(vitDcca, downsample = 100), features = markers.to.plot, : No requested features found in the scale.data slot for the RNA assay.

When I do a dot plot, it looks really wonky compared to the one on your Integrating tutorial. I assume this is because of the unscaled RNA slot.
DotPlot(object = vitDcca, features = rev(x = markers.to.plot), cols = c("blue", "red"), dot.scale = 8) + RotatedAxis()
dotplot_example

I saw another user provide code for scaling the RNA slot:

DefaultAssay(object = vitDcca) <- "RNA"
vitDcca <- NormalizeData(object =vitDcca, normalization.method = "LogNormalize", scale.factor = 10000)
all.genes <- rownames(x = vitDcca)
vitDcca <- ScaleData(object = vitDcca, features = all.genes)

So I recently scaled the RNA slot and performed FindAllMarkers again and got pretty dramatically different results.

So my questions are:

  1. Should I be performing FindAllMarkers at all? And if so, should this be on the RNA or scaled RNA?
  2. To obtain a heatmap or dotplot of markers, should I perform scaling for the RNA slot?

Thank you so much for your beautiful package and your help!

Most helpful comment

Hi,
Several issues here. Currently, you cannot use SCTransformed data for the integration, so you have the error No requested features found in the scale.data slot for the RNA assay. You could use NormalizeData() to normalize your data, if you want to use it for integration.
But this function will be added soon.

When you perform DotPlot, you would better confirm that default assay is RNA, or you can set assay in the DotPlot. DotPlot(obj, assay = "RNA")

FindAllMarkers usually uses data slot in the RNA assay to find differential genes.
For a heatmap or dotplot of markers, the scale.data in the RNA assay should be used.

Here is an issue explaining when to use RNA or integrated assay. It may be helpful.
https://github.com/satijalab/seurat/issues/1717

All 3 comments

Hi,
Several issues here. Currently, you cannot use SCTransformed data for the integration, so you have the error No requested features found in the scale.data slot for the RNA assay. You could use NormalizeData() to normalize your data, if you want to use it for integration.
But this function will be added soon.

When you perform DotPlot, you would better confirm that default assay is RNA, or you can set assay in the DotPlot. DotPlot(obj, assay = "RNA")

FindAllMarkers usually uses data slot in the RNA assay to find differential genes.
For a heatmap or dotplot of markers, the scale.data in the RNA assay should be used.

Here is an issue explaining when to use RNA or integrated assay. It may be helpful.
https://github.com/satijalab/seurat/issues/1717

Hi,
Several issues here. Currently, you cannot use SCTransformed data for the integration, so you have the error No requested features found in the scale.data slot for the RNA assay. You could use NormalizeData() to normalize your data, if you want to use it for integration.
But this function will be added soon.

When you perform DotPlot, you would better confirm that default assay is RNA, or you can set assay in the DotPlot. DotPlot(obj, assay = "RNA")

FindAllMarkers usually uses data slot in the RNA assay to find differential genes.
For a heatmap or dotplot of markers, the scale.data in the RNA assay should be used.

Here is an issue explaining when to use RNA or integrated assay. It may be helpful.

1717

I assume you can't use SCTransformed data on the previous versions right? as it is different from what is found in this vignette

@Diozao666 yes, this comment is from over a year ago. The vignette provides up-to-date information

Was this page helpful?
0 / 5 - 0 ratings

Related issues

htc502 picture htc502  路  3Comments

GHAStVHenry picture GHAStVHenry  路  3Comments

camilliano picture camilliano  路  3Comments

farhanma picture farhanma  路  3Comments

whitleyo picture whitleyo  路  3Comments