plot_protein_corrplot {proBatch} | R Documentation

## Peptide correlation matrix (heatmap)

### Description

Plots correlation plot of peptides from a single protein

### Usage

    plot_protein_corrplot(
      data_matrix,
      protein_name,
      peptide_annotation = NULL,
      protein_col = "ProteinName",
      feature_id_col = "peptide_group_label",
      factors_to_plot = c("ProteinName"),
      cluster_rows = FALSE,
      cluster_cols = FALSE,
      heatmap_color = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100),
      color_list = NULL,
      filename = NULL,
      width = NA,
      height = NA,
      units = c("cm", "in", "mm"),
      plot_title = sprintf("Peptide correlation matrix of %s protein", protein_name),
      ...
    )

### Arguments

`data_matrix` | features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. See "example_proteome_matrix" for more details (to call the description, use `help("example_proteome_matrix")`)
`protein_name` | the name of the protein
`peptide_annotation` | long format data frame with peptide ID and their corresponding protein and/or gene annotations. See `help("example_peptide_annotation")`.
`protein_col` | column where protein names are specified
`feature_id_col` | name of the column with feature/gene/peptide/protein ID used in the long format representation `df_long`. In the wide formatted representation `data_matrix` this corresponds to the row names.
`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 corrplot visualisation

### Value

`pheatmap` object

### Examples

    protein_corrplot_plot <- plot_protein_corrplot(example_proteome_matrix,
    protein_name = 'Haao', peptide_annotation = example_peptide_annotation,
    protein_col = 'Gene')

    protein_corrplot_plot <- plot_protein_corrplot(example_proteome_matrix,
     protein_name = c('Haao', 'Dhtkd1'),
     peptide_annotation = example_peptide_annotation,
     protein_col = 'Gene', factors_to_plot = 'Gene')

[Package proBatch version 1.10.0 Index]