Skip to contents

Run PCA using glystats::gly_pca() and plot it with glyvis::plot_pca(). Loading plot for glycoproteomics data can be crowded with too many variables. Ignore the resulting plot if it is not informative.

Usage

step_pca(
  on = "exp",
  center = TRUE,
  scale = TRUE,
  plot_width = 5,
  plot_height = 5,
  ...
)

Arguments

on

Name of the experiment to run PCA on. Can be "exp", "sig_exp", "trait_exp", "sig_trait_exp", "motif_exp", "sig_motif_exp".

center

A logical indicating whether to center the data. Default is TRUE.

scale

A logical indicating whether to scale the data. Default is TRUE.

plot_width

Width of plots in inches. Default is 5.

plot_height

Height of plots in inches. Default is 5.

...

Additional arguments passed to prcomp().

Value

A glysmith_step object.

Details

Data required:

  • exp (if on = "exp"): The experiment to run PCA on

  • trait_exp (if on = "trait_exp"): The trait experiment to run PCA on

  • motif_exp (if on = "motif_exp"): The motif experiment to run PCA on

Tables generated (with suffixes):

  • pca_samples: A table containing the PCA scores for each sample

  • pca_variables: A table containing the PCA loadings for each variable

  • pca_eigenvalues: A table containing the PCA eigenvalues

Plots generated (with suffixes):

  • pca_scores: A PCA score plot colored by group

  • pca_loadings: A PCA loading plot

  • pca_screeplot: A PCA screeplot

AI Prompt

This section is for AI in inquire_blueprint() only.

  • Include this step if needed.

Examples

step_pca()
#> <step "step_pca()"> Principal component analysis