Comments (5)
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")
from clustree.
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.
from clustree.
Thank you for the comment.
I was aware of this. Definitely, I would avoid using this color coding to people/presentations.
from clustree.
Hi @tiagobrc
Thanks for giving clustree a go!
You can do this by setting the node_colour
option to "cluster"
. Here is an example using the example Iris dataset:
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.
from clustree.
Amazing @lazappi!
It worked very well.
Thank you so much for the quick implement. Very nice; it let me grasp the cluster tree from the perspective of Seurat.
Best regards,
Tiago
from clustree.
Related Issues (20)
- Node text alignment HOT 2
- Interpretation of cluster results HOT 1
- Release clustree 0.4.4
- Filtering nodes in the clustering graph HOT 2
- Allow plotting nodes as pie charts HOT 4
- Rotate node labels HOT 3
- Release clustree 0.5.0
- Error in check.length(gparname) : 'gpar' element 'lwd' must not be length 0 HOT 20
- Error in `dplyr::select()`: ! <text>:1:5: unexpected symbol HOT 8
- Error in check.length(gparname) : 'gpar' element 'lwd' must not be length 0 HOT 3
- Error for Seurat - gpar' element 'lwd' must not be length 0 HOT 1
- Problem using clustree with a Seurat object HOT 6
- Error: could not find function "try_fetch" HOT 3
- Error in `geom_edge_link()` Problem while converting geom to grob. HOT 2
- Clustree not accurate HOT 4
- Error: Less than two column names matched the prefix: SCT_snn_res. HOT 1
- Adding node specific labels HOT 2
- Is there a way to label edges? HOT 1
- Prepare for upcoming Seurat v5 release HOT 5
- The X portion of your clustering column names could not be converted to a number. Please check that your prefix and suffix are correct HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clustree.