DingWB / PyComplexHeatmap

PyComplexHeatmap: A Python package to plot complex heatmap (clustermap)
https://dingwb.github.io/PyComplexHeatmap/
MIT License
257 stars 28 forks source link

show those row name we are interested in #18

Closed QUEST2179 closed 1 year ago

QUEST2179 commented 1 year ago

Dear Developer,

For show_rownames= True, could you please help how to only show those row name we are interested in? Thanks!

DingWB commented 1 year ago

You should use anno_label, instead of show_rownames. Please refer to this link, which will tell you how to show the selected feature names. Briefly, you need to create a anno_label in row annotations. In the parameter df of anno_label, index should be same as data in ClusterMapPlotter, while values should be either the names you want to show or NaN (the rows you do not want to show).

QUEST2179 commented 1 year ago

great, thanks a lot for your quick response.

one more question, in HeatmapAnnotation if anno_label is put as first one, it goes to top or left, but sometimes in HeatmapAnnotation I only have anno_label no others like anno_simple, how can I make the label appears on right or bottom?

DingWB commented 1 year ago

This is a good question. Please refer to this link. You can add a parameter orientation to change the direction. Please let me know whether it works for you.

QUEST2179 commented 1 year ago

sorry orientation doesn't appear to work

DingWB commented 1 year ago

Could you please give me an example dataset so that I can debug it?

DingWB commented 1 year ago

Thanks for your feedback. It's really helpful for me to debug it. Please upgrade the package to the latest version and refer to this link.