Global Options for Heatmaps

ht_opt(..., RESET = FALSE, READ.ONLY = NULL, LOCAL = FALSE, ADD = FALSE)

Arguments

...

Options, see 'Details' section.

RESET

Reset all the option values.

READ.ONLY

Please ignore this argument.

LOCAL

Please ignore this argument.

ADD

Please ignore this argument.

Details

You can set some parameters for all heatmaps/annotations simultaneously by this global function. Pleast note you should put it before your heatmap code and reset all option values after drawing the heatmaps to get rid of affecting next heatmap.

There are following parameters to control all heatmaps:

heatmap_row_names_gp

set row_names_gp in all Heatmap.

heatmap_column_names_gp

set column_names_gp in all Heatmap.

heatmap_row_title_gp

set row_title_gp in all Heatmap.

heatmap_column_title_gp

set column_title_gp in all Heatmap.

heatmap_border

set border in all Heatmap.

Following parameters control the legends:

legend_title_gp

set title_gp in all heatmap legends and annotation legends.

legend_title_position

set title_position in all heatmap legends and annotation legends.

legend_labels_gp

set labels_gp in all heatmap legends and annotation legends.

legend_grid_width

set grid_width in all heatmap legends and annotation legends.

legend_grid_height

set grid_height in all heatmap legends and annotation legends.

legend_border

set border in all heatmap legends and annotation legends.

Following parameters control heatmap annotations:

annotation_border

border in all HeatmapAnnotation.

simple_anno_size

size for the simple annotation.

Following parameters control the space between heatmap components:

DENDROGRAM_PADDING

space bewteen dendrograms and heatmap body.

DIMNAME_PADDING

space between row/column names and heatmap body.

TITLE_PADDING

space between row/column titles and heatmap body.

COLUMN_ANNO_PADDING

space between column annotations and heatmap body.

ROW_ANNO_PADDING

space between row annotations and heatmap body.

Other parameters:

fast_hclust

whether use hclust to speed up clustering?

show_parent_dend_line

when heatmap is split, whether to add a dashed line to mark parent dendrogram and children dendrograms?

You can get or set option values by the traditional way (like options) or by $ operator:

    # to get option values
    ht_opt("heatmap_row_names_gp")
    ht_opt$heatmap_row_names_gp

    # to set option values
    ht_opt("heatmap_row_names_gp" = gpar(fontsize = 8))
    ht_opt$heatmap_row_names_gp = gpar(fontsize = 8)  

Reset to the default values by ht_opt(RESET = TRUE).

Examples

ht_opt
#> Option Value #> heatmap_row_names_gp NULL #> heatmap_column_names_gp NULL #> heatmap_row_title_gp NULL #> heatmap_column_title_gp NULL #> legend_title_gp NULL #> legend_title_position NULL #> legend_labels_gp NULL #> legend_grid_height NULL #> legend_grid_width NULL #> legend_border NULL #> heatmap_border NULL #> annotation_border NULL #> fast_hclust FALSE #> show_parent_dend_line TRUE #> verbose FALSE #> show_vp FALSE #> simple_anno_size 5mm #> DENDROGRAM_PADDING 0.5mm #> DIMNAME_PADDING 1mm #> TITLE_PADDING 2.5mm #> COLUMN_ANNO_PADDING 1mm #> ROW_ANNO_PADDING 1mm