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!
1 answer
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
Log in to answer this question.