plot_heatmap {DEP} | R Documentation

## Plot a heatmap

### Description

`plot_heatmap` generates a heatmap of all significant proteins.

### Usage

    plot_heatmap(dep, type = c("contrast", "centered"), kmeans = FALSE,
      k = 6, col_limit = 6, indicate = NULL,
      clustering_distance = c("euclidean", "maximum", "manhattan",
      "canberra", "binary", "minkowski", "pearson", "spearman", "kendall",
      "gower"), row_font_size = 6, col_font_size = 10, plot = TRUE, ...)

### Arguments

`dep` | SummarizedExperiment, Data object for which differentially enriched proteins are annotated (output from `test_diff()` and `add_rejections()`).
`type` | 'contrast' or 'centered', The type of data scaling used for plotting. Either the fold change ('contrast') or the centered log2-intensity ('centered').
`kmeans` | Logical(1), Whether or not to perform k-means clustering.
`k` | Integer(1), Sets the number of k-means clusters.
`col_limit` | Integer(1), Sets the outer limits of the color scale.
`indicate` | Character, Sets additional annotation on the top of the heatmap based on columns from the experimental design (colData). Only applicable to type = 'centered'.
`clustering_distance` | "euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski", "pearson", "spearman", "kendall" or "gower", Function used to calculate clustering distance (for proteins and samples). Based on `Heatmap` and `daisy`.
`row_font_size` | Integer(1), Sets the size of row labels.
`col_font_size` | Integer(1), Sets the size of column labels.
`plot` | Logical(1), If `TRUE` (default) the heatmap is produced. Otherwise (if `FALSE`), the data which the heatmap is based on are returned.
`...` | Additional arguments for Heatmap function as depicted in `Heatmap`

### Value

A heatmap (generated by `Heatmap`)

### Examples

    # Load example
    data <- UbiLength
    data <- data[data$Reverse != "+" & data$Potential.contaminant != "+",]
    data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")

    # Make SummarizedExperiment
    columns <- grep("LFQ.", colnames(data_unique))
    exp_design <- UbiLength_ExpDesign
    se <- make_se(data_unique, columns, exp_design)

    # Filter, normalize and impute missing values
    filt <- filter_missval(se, thr = 0)
    norm <- normalize_vsn(filt)
    imputed <- impute(norm, fun = "MinProb", q = 0.01)

    # Test for differentially expressed proteins
    diff <- test_diff(imputed, "control", "Ctrl")
    dep <- add_rejections(diff, alpha = 0.05, lfc = 1)

    # Plot heatmap
    plot_heatmap(dep)
    plot_heatmap(dep, 'centered', kmeans = TRUE, k = 6, row_font_size = 3)
    plot_heatmap(dep, 'contrast', col_limit = 10, row_font_size = 3)

[Package DEP version 1.12.0 Index]