-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color reflecting cluster size/number instead of level #20
Comments
Hi @tiagobrc Thanks for giving clustree a go! You can do this by setting the library(clustree)
clustree(iris_clusts, prefix = "K", node_colour = "cluster") As you can see this kind of half works, the nodes are coloured by the right variable, but it uses a continuous scale instead of a discrete one. That should be pretty easy to fix, I'll try to push something to the development version soon. |
Hi @tiagobrc I've just made a change to the development version that fixed this. Here is the output of the same Iris example using the development version (v0.2.2.9001): clustree(iris_clusts, prefix = "K", node_colour = "cluster") You can install the development version using. devtools::install_github("lazappi/clustree@develop") |
Amazing @lazappi! It worked very well. Best regards, Tiago |
Great! Just a word of caution of doing this. It could potentially be misleading to people looking at it as nodes with the same colour aren't necessarily related. For example in the image you originally posted Cluster 0 is mostly on the left of the tree but is in the middle at higher resolutions. Someone looking at it might think the cluster has moved when what has actually changed is the relative sizes of the clusters. |
Thank you for the comment. |
Hi, congrats on the excellent package,
I was wondering if it is possible to color the cluster nodes reflecting the size in the same way Seurat does. I did by hand in Illustrator to make my point more clear.
Thank you!
The text was updated successfully, but these errors were encountered: