M3DropGetHeatmapCellClusters {M3Drop} | R Documentation |
Extracts the clustering correponding to the given number of clusters from heatmap output.
M3DropGetHeatmapCellClusters(heatout, k)
heatout |
Output from a gene-expression heatmap. |
k |
Number of clusters. |
Traverses down the dendrogram and cuts at the first point where there are at least k clusters.
A vector of cluster labels for each cell.
library(M3DExampleData) genes <- rownames(Mmus_example_list$data)[1:20] heatmap_out <- M3DropExpressionHeatmap(genes, Mmus_example_list$data) clusters <- M3DropGetHeatmapCellClusters(heatmap_out, k=5)