Visualize the similarity matrix and the clustering. Adapted from simplifyEnrichment package. https://github.com/jokergoo/simplifyEnrichment/blob/master/R/ht_clusters.R
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,
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,
...
)
A list containing a `ComplexHeatmap::HeatmapList-class` object and GO term ordering.
A similarity matrix.
Cluster labels inferred from the similarity matrix, e.g. from `cluster_terms` or `binary_cut`.
Used internally.
A vector of colors that map from 0 to the 95^th percentile of the similarity values.
Whether to draw the word clouds.
The full name or the description of the corresponding GO IDs.
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.
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.
Words that are excluded in the word cloud.
Maximal number of words visualized in the word cloud.
A list of graphic parameters passed to `word_cloud_grob`.
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 for the heatmap.
A list of additional heatmaps added to the left of the similarity heatmap.
Whether to write the heatmap as a raster image.
other parameters