plot_corr_matrix {proBatch} | R Documentation

## Visualise correlation matrix

### Description

recommended for heatmap-type visualisation of correlation matrix with <100 items. With >50 samples and ~10 replicate pairs distribution plots may be more informative.

### Usage

    plot_corr_matrix(
      corr_matrix,
      annotation = NULL,
      annotation_id_col = "FullRunName",
      factors_to_plot = NULL,
      cluster_rows = FALSE,
      cluster_cols = FALSE,
      heatmap_color = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100),
      color_list = NULL,
      filename = NULL,
      width = 7,
      height = 7,
      units = c("cm", "in", "mm"),
      plot_title = NULL,
      ...
    )

### Arguments

`corr_matrix` | square correlation matrix
`annotation` | data frame with `peptide_annotation` for protein correlation heatmap or `sample_annotation` for sample correlation heatmap
`annotation_id_col` | `feature_id_col` for protein correlation heatmap or `sample_id_col` for sample correlation heatmap
`factors_to_plot` | vector of technical and biological covariates to be plotted in this diagnostic plot (assumed to be present in `sample_annotation`)
`cluster_rows` | boolean values determining if rows should be clustered or `hclust` object
`cluster_cols` | boolean values determining if columns should be clustered or `hclust` object
`heatmap_color` | vector of colors used in heatmap.
`color_list` | list, as returned by `sample_annotation_to_colors`, where each item contains a color vector for each factor to be mapped to the color.
`filename` | path where the results are saved. If null the object is returned to the active window; otherwise, the object is save into the file. Currently only pdf and png format is supported
`width` | option determining the output image width
`height` | option determining the output image width
`units` | units: 'cm', 'in' or 'mm'
`plot_title` | title of the plot (e.g., processing step + representation level (fragments, transitions, proteins) + purpose (meanplot/corrplot etc))
`...` | parameters for the `pheatmap` visualisation, for details see examples and help to corresponding functions

### Details

Plot correlation of selected samples or peptides

### Value

`pheatmap` object

### See Also

`pheatmap`, `plot_sample_corr_distribution`, `plot_peptide_corr_distribution`

### Examples

    peptides <- c("10231_QDVDVWLWQQEGSSK_2", "10768_RLESELDGLR_2")
    data_matrix_sub = example_proteome_matrix[peptides,]
    corr_matrix = cor(t(data_matrix_sub), use = 'complete.obs')
    corr_matrix_plot <- plot_corr_matrix(corr_matrix)

[Package proBatch version 1.11.0 Index]