ht_clusters: Visualize the similarity matrix and the clustering

Description Usage Arguments Value Examples

View source: R/ht_clusters.R

Description

Visualize the similarity matrix and the clustering

Usage

1
2
3
4
5
6
7
ht_clusters(mat, cl, dend = NULL, col = c("white", "red"),
    draw_word_cloud = is_GO_id(rownames(mat)[1]) || !is.null(term),
    term = NULL, min_term = 5,
    order_by_size = FALSE, cluster_slices = FALSE,
    exclude_words = character(0), max_words = 10,
    word_cloud_grob_param = list(), fontsize_range = c(4, 16),
    column_title = NULL, ht_list = NULL, use_raster = TRUE, ...)

Arguments

mat

A similarity matrix.

cl

Cluster labels inferred from the similarity matrix, e.g. from cluster_terms or binary_cut.

dend

Used internally.

col

A vector of colors that map from 0 to the 95^th percentile of the similarity values.

draw_word_cloud

Whether to draw the word clouds.

term

The full name or the description of the corresponding GO IDs.

min_term

Minimal number of functional terms in a cluster. All the clusters with size less than min_term are all merged into one separated cluster in the heatmap.

order_by_size

Whether to reorder clusters by their sizes. The cluster that is merged from small clusters (size < min_term) is always put to the bottom of the heatmap.

cluster_slices

Whether to cluster slices.

exclude_words

Words that are excluded in the word cloud.

max_words

Maximal number of words visualized in the word cloud.

word_cloud_grob_param

A list of graphic parameters passed to word_cloud_grob.

fontsize_range

The range of the font size. The value should be a numeric vector with length two. The minimal font size is mapped to word frequency value of 1 and the maximal font size is mapped to the maximal word frequency. The font size interlopation is linear.

column_title

Column title for the heatmap.

ht_list

A list of additional heatmaps added to the left of the similarity heatmap.

use_raster

Whether to write the heatmap as a raster image.

...

Other arguments passed to draw,HeatmapList-method.

Value

A HeatmapList-class object.

Examples

1
2
3
4
5
6
mat = readRDS(system.file("extdata", "random_GO_BP_sim_mat.rds",
    package = "simplifyEnrichment"))
cl = binary_cut(mat)
ht_clusters(mat, cl, word_cloud_grob_param = list(max_width = 80))
ht_clusters(mat, cl, word_cloud_grob_param = list(max_width = 80),
    order_by_size = TRUE)

simplifyEnrichment documentation built on Nov. 8, 2020, 5:07 p.m.