Last chance! 50% off unlimited learning
Sale ends in
Move outliers towards center on dimension reduction plot
CollapseEmbeddingOutliers(
object,
reduction = "umap",
dims = 1:2,
group.by = "ident",
outlier.sd = 2,
reduction.key = "UMAP_"
)
Returns a DimReduc object with the modified embeddings
Seurat object
Name of DimReduc to adjust
Dimensions to visualize
Group (color) cells in different ways (for example, orig.ident)
Controls the outlier distance
Key for DimReduc that is returned
if (FALSE) {
data("pbmc_small")
pbmc_small <- FindClusters(pbmc_small, resolution = 1.1)
pbmc_small <- RunUMAP(pbmc_small, dims = 1:5)
DimPlot(pbmc_small, reduction = "umap")
pbmc_small[["umap_new"]] <- CollapseEmbeddingOutliers(pbmc_small,
reduction = "umap", reduction.key = 'umap_', outlier.sd = 0.5)
DimPlot(pbmc_small, reduction = "umap_new")
}
Run the code above in your browser using DataLab