How to label clusters on a UMAP (produced with ggplot2) ?

I have used the umap and ggplot2 packages to perform dimensionality reduction and make a UMAP plot, similar to the one I've pasted below. Familiarity with UMAP is not necessary for my question.

Can these clusters somehow be 'detected' programatically? What I'm asking is for a way to look at the data and zoom in on a given cluster to say "all points within this border are considered a cluster". Here there are roughly 10 of them, I'd like to just draw a border or place a label on them. No method would ever be perfect, of course.

I've seen this done before in the seurat package, but I was unable to make it work here since my data was not produced with that package.

See the FAQ: How to do a minimal reproducible example reprex for beginners for how to add information that will help the question attract more answers.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.