-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
optimizing and sorting dendrogram #59
Comments
I didn't understand, what if the given order is not consistent with the calculated dendrogram order? |
Happy New Year. Of course, what I mean is that by default, clustering analysis will be performed on rows and columns, and a dendrogram will be drawn. If a parameter (linkage matrix) is passed in to the column, the column will not be clustered, and the incoming linkage matrix will be used to draw the tree diagram and sort the heat map. |
Thank you for explaining that. I know what you mean now. Please let me know whether it works or not. |
I just used it and found that the column works, but the row does not.Meanwhile, the column names of the heatmap cannot be displayed, while the row names are displayed normally. |
That is strange, could you please paste your code here? |
I tried again and found that passing a linkage matrix to the row is also useful. But I used the following code separately: cm = ClusterMapPlotter(hclust_matrix_filter.T, show_colnames=True, show_rownames=True, row_dendrogram=True, col_dendrogram=True, |
Hello @muzier9 , Thanks for reporting. There might be something wrong with your code, if you can paste the completed code here, then I can help you with debugging. Because I tested it myself and everything is OK. Please see the following link on the documentation website: https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/advanced_usage.html#Custom-linkage |
Pay attention to the transposing (data.T) when you calculate the linkage for columns. @muzier9 |
Hello, did it work for you? |
I use other data and it works fine. There were some issues with the previous data, thank you for your package. |
In the complexheatmap of R, there is a parameter called cluster_columns or clusters_rows allows for the transfer of reordered Dendrogram data (such as using Dendsort packedge in R), which changes the order of the dendrogram in the heatmap and allows it to be displayed. I think this is a very useful function. In pycomplexheatmap, it seems that the order of rows or columns can be passed in, but the dendrogram cannot be displayed anymore. I think it may be possible to add a parameter cluster_ columns or clusters_ rows to pycomplexheatmap as well, an optimized link matrix can be passed in, which can change the order and corresponding clustering tree in the heatmap.
The text was updated successfully, but these errors were encountered: