How do you get the cluster rows from a dendrogram with the heatmaply package R?

27 views Asked by At

My collaborators wanted an interactive heatmap, so I created one using Heatmaply (version 1.5.0 & R version 4.1.2).

Now, I want to get the row for each cluster in the dendrogram. I can't find how to do that on the tutorial.

I tried:

# Get the cluster row from the heatmaply object
cluster_row <- get_rownames_from_heatmaply(heatmap)

# Extract the clustering information for rows
row_clusters <- heatmap$y$layout$data[[1]]$heatmapAttributes$hc$row

# Extract the row dendrogram data
row_dendrogram_data <- heatmap$x$data[[1]]$heatmapAttributes$dendrogram_data$row

Nothing worked. Anyone has an idea?

Cheers,

0

There are 0 answers