plot_heatmap {proBatch} | R Documentation

## Plot the heatmap of samples

### Description

Plot the heatmap of samples

### Usage

    plot_heatmap(data_matrix, sample_annotation = NULL,
      sample_id_col = "FullRunName", sample_annotation_col = NULL,
      sample_annotation_row = NULL, fill_the_missing = TRUE,
      cluster_rows = TRUE, cluster_cols = FALSE,
      annotation_color_list = NA,
      heatmap_color = colorRampPalette(rev(RColorBrewer::brewer.pal(n = 7,
      name = "RdYlBu")))(100), color_for_missing = "black", filename = NA,
      plot_title = NA, ...)

### Arguments

`data_matrix` | features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. in most function, it is assumed that this is the log transformed version of the original data
`sample_annotation` | data matrix with `sample_id_col` (this can be repeated as row names) biological and technical covariates (batches etc) ; each column of sample annotation will get it's own row. If `cluster_cols = T` this will indicate, whether sample proximity is driven by one of biolical or technical factors
`sample_id_col` | name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)
`sample_annotation_col` | biological or technical factors to be annotated in heatmap columns
`sample_annotation_row` | biological or technical factors to be annotated in heatmap rows
`fill_the_missing` | boolean value determining if missing values should be substituted with -1 (and colored with black)
`cluster_rows` | boolean value determining if rows should be clustered
`cluster_cols` | boolean value determining if columns should be clustered
`annotation_color_list` | list specifying colors for columns (samples). Best created by `sample_annotation_to_colors`
`heatmap_color` | vector of colors used in heatmap (typicall a gradient)
`color_for_missing` | special color to make missing values. Usually black or white, depending on `heatmap_color`
`filename` | filepath where to save the image
`plot_title` | Title of the plot (usually, processing step + representation level (fragments, transitions, proteins))
`...` | other parameters of `link[pheatmap]{pheatmap}`

### Value

object returned by `link[pheatmap]{pheatmap}`

### See Also

`sample_annotation_to_colors`, `pheatmap`

### Examples

    color_scheme <- sample_annotation_to_colors (example_sample_annotation,
    factor_columns = c('MS_batch','EarTag', "Strain",
    "Diet", "digestion_batch", "Sex"),
    not_factor_columns = 'DateTime',
    numeric_columns = c('order'))

    heatmap_plot <- plot_heatmap(example_proteome_matrix,
    example_sample_annotation,
    sample_annotation_col = c("MS_batch",  "digestion_batch", "Diet"),
    cluster_cols = TRUE,
    annotation_color_list = color_scheme$list_of_colors,
    show_rownames = FALSE, show_colnames = FALSE)

[Package proBatch version 1.0.0 Index]