Closed zgb963 closed 3 months ago
Hi, you should be able to force whatever order you want by setting the factor levels of Idents
as desired, e.g. something like:
Idents(obj) <- factor(Idents(obj),levels=('a','b','c'))
I will close this issue for now, but please re-open this issue if you are still running into problems!
Hi Seurat team,
I have some questions about the order of my cluster id's when making a UMAP. I first was renaming the clusters in the below UMAP for a first pass of labeling cell types.
So I renamed them first by just the cell type in each cluster using this code
But then when I made the UMAP with the labeled cluster id's, the ordering of the clusters in the legend seems to be in a weird order and I'm not sure why it's ordering it this way? I'm also not sure why the colors changed for each cluster?
Next thing I did was rename them again except this time I kept the original cluster id first before the cell type
I then created the UMAP again. But I wasn't sure why the legend is in the reverse order.
I tried using the order argument to manually change the order of the clusters so that cluster 0 would be listed first and cluster 21 would be listed last, but then it orders the cluster ids in the legend randomly again
I also made a subcluster UMAP of clusters 0, 1, 3,, 4, 5, 6, 8, 11, 14, 15, 16, 19, 20
But it's for some reason ordering them lexicographically, not in numerical order like before?