ht_clusters {simplifyEnrichment} | R Documentation

## Visualize the similarity matrix and the clustering

### Description

Visualize the similarity matrix and the clustering

### Usage

    ht_clusters(
        mat,
        cl,
        dend = NULL,
        col = c("white", "red"),

        # arguments that control the word cloud annotation
        draw_word_cloud = is_GO_id(rownames(mat)[1]) || !is.null(term),
        term = NULL,
        min_term = round(nrow(mat)*0.01),
        order_by_size = FALSE,
        exclude_words = character(0),
        max_words = 10,
        word_cloud_grob_param = list(),
        fontsize_range = c(4, 16),
        bg_gp = gpar(fill = "#DDDDDD", col = "#AAAAAA"),

        # arguments that control the heatmaps
        column_title = NULL,
        ht_list = NULL,
        use_raster = TRUE,
        run_draw = 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.
`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.
`bg_gp` | Graphics parameters for controlling word cloud annotation background.
`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.
`run_draw` | Internally used.
`...` | Other arguments passed to `draw,HeatmapList-method`.

### Value

A `HeatmapList-class` object.

### Examples

    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)

[Package simplifyEnrichment version 1.4.0 Index]