UMAP graph using DimPlot pre/post integration
1
0
Entering edit mode
14 months ago
ralbero ▴ 10

Hello all,

I have a seurat object containing 3 different samples. Before integration with harmony, I can run:

pbmc_harmony <- NormalizeData(pbmc_harmony, verbose = F) pbmc_harmony <- FindVariableFeatures(pbmc_harmony, selection.method = "vst", nfeatures = 2000, verbose = F) pbmc_harmony <- ScaleData(pbmc_harmony, verbose = F) pbmc_harmony <- RunPCA(pbmc_harmony, npcs = 50, verbose = F) pbmc_harmony <- RunUMAP(pbmc_harmony, reduction = "pca", dims = 1:40, verbose = F) DimPlot(pbmc_harmony)

To get a UMAP of not integrated samples.

However, after running harmony on that file, I cannot get the non integrated UMAP: if I do DimPlot(pbmc_harmony) I only get the integrated UMAP. How can I get the pre-integrated UMAP from a file that has been already integrated? Or the information pre-integration is lost?

Thanks!

Harmony UMAP scRNAseq • 1.0k views
ADD COMMENT
1
Entering edit mode
14 months ago
fracarb8 ★ 1.7k

The second time you ran RunUMAP you replaced the old umap with the new one. If you want to keep the old one, you can change the name of the harmony umap with reduction.name.

...
pbmc_harmony <- RunUMAP(pbmc_harmony, reduction = "pca", dims = 1:40, verbose = F, reduction.name = "umap_harmony")

DimPlot(pbmc_harmony, reduction = "umap") # old umap
DimPlot(pbmc_harmony, reduction = "umap_harmony") # new umap
ADD COMMENT

Login before adding your answer.

Traffic: 2111 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6