plot_peptides_of_one_protein {proBatch}R Documentation

Plot peptides of one protein

Description

Creates a spike-in facetted ggplot2 plot of the value in measure_col vs order_col using plot_single_feature. Additionally, the resulting plot can also be facetted by batch.

Usage

plot_peptides_of_one_protein(protein_name, protein_col = "ProteinName",
  df_long, sample_annotation, peptide_annotation = NULL,
  order_col = "order", sample_id_col = "FullRunName",
  batch_col = "MS_batch", measure_col = "Intensity",
  feature_id_col = "peptide_group_label", color_by_batch = FALSE,
  color_scheme = "brewer", facet_by_batch = FALSE,
  color_by_col = NULL, color_by_value = NULL,
  plot_title = sprintf("Peptides of %s protein", protein_name), ...)

Arguments

protein_name

name of the protein as defined in ProteinName

protein_col

column where protein names are specified

df_long

data frame where each row is a single feature in a single sample. It minimally has a sample_id_col, a feature_id_col and a measure_col, but usually also an m_score (in OpenSWATH output result file)

sample_annotation

data matrix with:

  1. sample_id_col (this can be repeated as row names)

  2. biological covariates

  3. technical covariates (batches etc)

peptide_annotation

long format data with peptide ID and their corresponding protein annotations

order_col

column in sample_annotation that determines sample order. It is used for certain diagnostics and normalisations.

sample_id_col

name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)

batch_col

column in sample_annotation that should be used for batch comparison

measure_col

if df_long is among the parameters, it is the column with expression/abundance/intensity; otherwise, it is used internally for consistency

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.

color_by_batch

(logical) whether to color points by batch

color_scheme

color scheme for ggplot representation

facet_by_batch

(logical) whether to plot each batch in its own facet

color_by_col

column to color by certain value denoted by color_by_value

color_by_value

value in color_by_col to color

plot_title

the string indicating the source of the peptides

...

additional arguments to plot_single_feature function

Value

ggplot2 type plot of measure_col vs order_col, faceted by spike_ins containing proteins and (optionally) by batch_col

See Also

Other feature-level diagnostic functions: plot_iRT, plot_single_feature, plot_spike_in, plot_with_fitting_curve

Examples

peptides_of_one_protein_plot <- plot_peptides_of_one_protein (
protein_name = "Haao",  
protein_col = "Gene", df_long = example_proteome, 
example_sample_annotation, 
order_col = 'order', sample_id_col = 'FullRunName', 
batch_col = 'MS_batch')


[Package proBatch version 1.0.0 Index]