M3D_Get_Heatmap_Cell_Clusters: Extracts clusters/ordered names from heatmap output

Description Usage Arguments Details Value Examples

Description

Extracts the groupings correponding to the given number of clusters from heatmap output.

Usage

1
2
M3DropGetHeatmapClusters(heatout, k, type="cell")
	M3DropGetHeatmapNames(heatout, type="cell")

Arguments

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).

Details

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.

Value

A vector of cluster labels for each cell.

Examples

1
2
3
4
5
  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")

Example output

Loading required package: numDeriv

M3Drop documentation built on Nov. 8, 2020, 5:06 p.m.