Plot heatmap using ComplexHeatmap using simplified interface
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | plot_heatmap(
matrix,
row_annotations = NULL,
column_annotations = NULL,
one_hot_row_annotations = NULL,
one_hot_column_annotations = NULL,
palette = list(),
split_rows = NULL,
split_columns = NULL,
cluster_rows = TRUE,
cluster_columns = TRUE,
show_row_dend = TRUE,
show_column_dend = TRUE,
show_row_names = TRUE,
show_column_names = TRUE,
show_legend_row = colnames(row_annotations),
show_legend_column = colnames(column_annotations),
legend_position = "side",
lower_quantile = 0.01,
upper_quantile = 0.99,
text_size = 10,
row_names_size = 4,
column_names_size = 4,
heatmap_color = c("BWR", "cividis", "viridis", "plasma", "magma", "inferno"),
color_by_quantile = TRUE,
value_name = "value",
title = character(0)
)
|
matrix |
matrix to plot |
row_annotations |
data frame with annotations for the rows of the matrix |
column_annotations |
data frame with annotations for the columns of the matrix |
one_hot_row_annotations |
data frame with annotations for the rows of the matrix that are to be one-hot encoded |
one_hot_column_annotations |
data frame with annotations for the columns of the matrix that are to be one-hot encoded |
palette |
named list of named character vectors with the values being the colors if discrete, or in the form c(colors = XXX, breaks = XXX) if continuous |
split_rows |
columns of row_annotations to split heatmap rows by |
split_columns |
columns of column_annottations to split heatmap columns by |
cluster_rows |
boolean to cluster rows or not |
cluster_columns |
boolean to cluster columns or not |
show_row_dend |
boolean to show row dendrogram or not |
show_column_dend |
boolean to show column dendrogram or not |
show_row_names |
boolean to show row names or not |
show_column_names |
boolean to show column names or not |
show_legend_row |
columns of row_annotations to show legend for |
show_legend_column |
columns of column_annotations to show legend for |
legend_position |
either "right" or "bottom" |
lower_quantile |
lower quantile of data for colorbar |
upper_quantile |
upper quantile of data for colorbar |
text_size |
text size |
row_names_size |
text size for row names |
column_names_size |
text size for column names |
heatmap_color |
one of BWR (blue-white-red), cividis, viridis, plasma, magma, or inferno |
color_by_quantile |
whether to space color values in color bar by quantile or not |
value_name |
name of value, written above color bar |
title |
title of plot |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.