Comments (9)
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.
I am not quite sure what you mean, could you please make it more specific?
from pycomplexheatmap.
Sure, here is an image where I used R ComplexHeatmap as an example in RNA-seq plus clinical metadata from a cancer dataset.
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.
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.
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.
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.
Would you like to contribute to this package by implementing this function? @ftamiro
from pycomplexheatmap.
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.
Please let me know if you have any questions during the development.
from pycomplexheatmap.
Related Issues (20)
- Proprietary Microsoft font Arial generates warnings for each label on certain systems HOT 1
- Color center? HOT 2
- composite Clustermap enforces same dimensions for both clustermaps HOT 5
- composite() got an unexpected keyword argument 'height_ratios' HOT 1
- Update code structure
- How to use the row_split_order parameter of ClusterMapPlotter function? HOT 1
- is it possible to limit colorbar vmin and vmax ? HOT 2
- Possible bug? 'lightgray' is not a valid color value. HOT 9
- Thick white lines appearning in clustermap when large genesets used HOT 3
- Missing annotation HOT 2
- Try to save results from ClusterMapPlotter as pdf, but the heatmap is a figure not in vector HOT 6
- cluster_between_groups and col_split_order: allow custom col_split_order after clustering the groups specified with col_split HOT 10
- MatplotlibDeprecationWarning HOT 1
- optimizing and sorting dendrogram HOT 10
- Unexpected grid potential caused by seaborn or scanpy
- Adjusting width/height of heatmap? HOT 1
- Missing annot when using composite HOT 1
- Centering custom annotation HOT 5
- Displaying images in place of text labels for heatmaps HOT 9
- Cluster mitake occur in pyHeatmap HOT 2
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 pycomplexheatmap.