GithubHelp home page GithubHelp logo

Comments (5)

lazappi avatar lazappi commented on May 20, 2024 1

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")

cluster_colour_fixed

You can install the development version using.

devtools::install_github("lazappi/clustree@develop")

from clustree.

lazappi avatar lazappi commented on May 20, 2024 1

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.

tiagobrc avatar tiagobrc commented on May 20, 2024 1

Thank you for the comment.
I was aware of this. Definitely, I would avoid using this color coding to people/presentations.

from clustree.

lazappi avatar lazappi commented on May 20, 2024

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")

cluster_colour

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.

tiagobrc avatar tiagobrc commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.