Giter Club home page Giter Club logo

Comments (9)

DingWB avatar DingWB commented on May 22, 2024 1

This is a good suggestion.
But unfortunately, it is not supported now. I will add it to PyComplexHeatmap soon.
As for now, you can perform K-means clustering using sklearn and then reorder the rows and columns according to the clusterings from K-means. Finally, when you call ClusterMapPlotter, turn off the row_cluster and col_cluster and set parameters row_split and col_split (optional).

from pycomplexheatmap.

DingWB avatar DingWB commented on May 22, 2024 1

I am not quite sure what you mean, could you please make it more specific?

from pycomplexheatmap.

ftamiro avatar ftamiro commented on May 22, 2024 1

Sure, here is an image where I used R ComplexHeatmap as an example in RNA-seq plus clinical metadata from a cancer dataset.

image

Here I used inside the main Heatmap() function, the cluster_columns= cluster_within_group(mat, groups), see the last bloc of features. In this analysis, 'groups' are the molecular groups assigned to patients from the original study, not something I calculated. This option allows me to consider these blocks and cluster them with hierarchical clustering. In other instances, I can use precalculated kmeans or any other clustering or feature I want to obtain a similar result.

I am building a cancer explorer web app and this option is crucial for my visualization

from pycomplexheatmap.

DingWB avatar DingWB commented on May 22, 2024 1

Hello Francesco, I have already implemented the cluster_between_groups (https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/advanced_usage.html#Cluster-between-groups) and moved this discussion to #53

from pycomplexheatmap.

ftamiro avatar ftamiro commented on May 22, 2024

I am interested in this as well, in the R package I used cluster_columns= cluster_within_group(), it is great not only for grouping by kmeans or any other clustering annotation but also for clinical metadata such as maturation stage of the tumor, etc. Looking forward to seeing this implemented in PyComplexHeatmap.

from pycomplexheatmap.

DingWB avatar DingWB commented on May 22, 2024

I see. I will work on it when I have time.
For now, you can perform clustering yourself and pass the clustered order to PyComplexHeatmap as row_split_order or col_split_order.

from pycomplexheatmap.

DingWB avatar DingWB commented on May 22, 2024

Would you like to contribute to this package by implementing this function? @ftamiro

from pycomplexheatmap.

ftamiro avatar ftamiro commented on May 22, 2024

I am already trying to replicate this function in Python. This could require more skills than what I have now, but if I manage to get something useful, I would like to contribute

from pycomplexheatmap.

DingWB avatar DingWB commented on May 22, 2024

Please let me know if you have any questions during the development.

from pycomplexheatmap.

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.