This function creates a heatmap using the numeric columns from the
provided data frame. It supports various scaling options and allows for row or
column annotations. The heatmap is saved as a file,
with the format determined by the file extension in title
.
Arguments
- data
A data frame containing the input data. Only numeric columns will be used to generate the heatmap.
- scale
Character. An optional scaling option. Options are NULL (no scaling), "log2" (log2 transformation), "row_zscore" (z-score scaling by row), or "col_zscore" (z-score scaling by column). Default is NULL.
- annotation_col
Character. An optional column name from
data
to be used for generating annotation colors. Default is NULL.- annotation_side
Character. Specifies whether the annotation should be applied to rows or columns. Options are "auto", "row", or "col".
- title
Character. The title of the heatmap and the file name for saving the plot. The file extension (".pdf" or ".png") determines the output format. If
NULL
, the plot is generated on the current graphics device. Default isNULL
.