Entering edit mode
23 months ago
bioinformatics.girl
▴
20
Is there a way to separate clusters in UMAPs using circles, outlines, borders, etc.? I have seen this in some presentations however cannot find documentation for this feature and would appreciate any input.
Thanks.
Have you looked at
geom_mark_ellipse
? https://ggforce.data-imaginist.com/reference/geom_mark_ellipse.htmlIf you want to have "flexible" boundaries, you could use a simple classifier (on top of the UMAP coordinates) and use
geom_contour
to plot the decision boundaries between clusters.For geom_mark_ellipse, I don't believe this would be feasible given that it requires the input as a data frame, and we cannot coerce the class structure of SeuratObjects into data.frames.
geom_contour also would not work since it would have an error occurring in the 3rd layer (x,y,z directionalities).
It's trivial enough to pull out the UMAP coordinates and cell labels into a dataframe. The same is true of geom_contour.
If you want to do anything custom, you will eventually need to pull data out of Seurat and into a more native format.