get clusters from Heatmap()

Dear R user,
I have a Heatmap obtained from package ComplexHeatmap. My samples in columns cluster in 3 well differentiated groups.
To perform a survival analysis I would like a df or vector giving for each sample the clustering group it belongs (1, 2 or 3 ; or A, B or C).
With the pheatmap function it is quite easy to get the tree_col : pheatmap$tree_col and to use the cutter function, but I do not find how to get the tree_col with ComplexHeatmap.
Best

Simon

Hi,

This package seems to be all about the visualisation of the heatmaps, and not about novel clustering methods. It says in the documentation that all clustering methods used in hclust() are available, so I suggest you use this function (or other) to get the data, then pass it on to the heatmap as explained in the documentation

Hope this helps,
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.