| cyt_heatmap | R Documentation |
This function creates a heatmap using the numeric columns from the
provided data frame. It provides the ability to hide row and
column names, adjust font sizes and clustering, and apply
additional transformations such as log10 or combined z‑scoring. A
file name with extension may be provided via title to save the
heat map to disk; otherwise the plot is drawn on the active
graphics device.
cyt_heatmap(
data,
scale = c(NULL, "log2", "log10", "row_zscore", "col_zscore", "zscore"),
annotation_col = NULL,
annotation_side = c("auto", "row", "col"),
show_row_names = FALSE,
show_col_names = TRUE,
fontsize_row = 10,
fontsize_col = 10,
cluster_rows = TRUE,
cluster_cols = TRUE,
title = NULL
)
data |
A data frame. Only numeric columns are used to construct the heat map. |
scale |
Character specifying an optional scaling. Accepts
|
annotation_col |
Optional. Either the name of a column in
|
annotation_side |
Character. One of "auto", "row" or
"col". When "auto" (default) the side is determined by
matching the length of |
show_row_names |
Logical. If |
show_col_names |
Logical. If |
fontsize_row |
Numeric. Font size for row names. Default is 10. |
fontsize_col |
Numeric. Font size for column names. Default is 10. |
cluster_rows |
Logical. If |
cluster_cols |
Logical. If |
title |
Character. The heat map title or file name. If
|
Invisibly returns the pheatmap object created by
pheatmap::pheatmap().
Shubh Saraswat
# Load sample data
data("ExampleData1")
data_df <- ExampleData1
# Generate a heatmap with log2 scaling and annotation based on
# the "Group" column
cyt_heatmap(
data = data_df[, -c(2:3)],
scale = "log2", # Optional scaling
annotation_col = "Group",
annotation_side = "auto",
title = NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.