Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qc_pca

Plot principal component analysis


Description

Plots a principal component analysis based on peptide or precursor intensities.

Usage

qc_pca(
  data,
  sample,
  grouping,
  intensity,
  condition,
  components = c("PC1", "PC2"),
  digestion = NULL,
  plot_style = "pca"
)

Arguments

data

a data frame containing sample names, peptide or precursor identifiers, corresponding intensities and a condition column indicating e.g. the treatment.

sample

the column in the data data frame containing the sample name.

grouping

the column in the data data frame containing either precursor or peptide identifiers.

intensity

the column in the data data frame containing containing the corresponding intensity values for each peptide or precursor.

condition

the column in the data data frame indicating the treatment or condition for each sample.

components

character vector indicating the two components that should be displayed in the plot. By default these are PC1 and PC2. You can provide these using a character vector of the form c("PC1", "PC2").

digestion

optional column indicating the mode of digestion (limited proteolysis or tryptic digest).

plot_style

character vector specifying what plot should be returned. If 'plot_style = "pca"' is selected the two PCA components supplied with the 'components' argument are plottet against each other. This is the default. 'plot_style = "scree"' returns a scree plot that displays the variance explained by each principal component in percent. The scree is useful for checking if any other than the default first two components should be plotted.

Value

A plotted principal component analysis showing PC1 and PC2

Examples

## Not run: 
qc_pca(
  data,
  sample = r_file_name,
  grouping = eg_precursor_id,
  intensity = normalised_intensity_log2,
  condition = r_condition,
  components = c("PC2", "PC3"),
  plot_style = "scree"
)

## End(Not run)

protti

Bottom-Up Proteomics and LiP-MS Quality Control and Data Analysis Tools

v0.1.1
MIT + file LICENSE
Authors
Jan-Philipp Quast [aut, cre], Dina Schuster [aut], ETH Zurich [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.