M3DropGetHeatmapClusters | R Documentation |
Extracts the groupings correponding to the given number of clusters from heatmap output.
M3DropGetHeatmapClusters(heatout, k, type="cell")
M3DropGetHeatmapNames(heatout, type="cell")
heatout |
Output from a gene-expression heatmap. |
k |
Number of clusters. |
type |
One of "cell" or "gene" indicating whether to get clusters or names of cells(columns) or genes(rows). |
M3DropGetHeatmapClusters
: Traverses down the row or column dendrogram and cuts at the first point where there are at least k clusters.
M3DropGetHeatmapNames
: gets the names of the cells/genes in the order that they appear on the dendrogram.
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 <- M3DropGetHeatmapClusters(heatmap_out, k=5)
heatmap_gene_labels <- M3DropGetHeatmapNames(heatmap_out, type="gene")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.