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.

This step depends on the on parameter (default: exp).

Usage

step_pca(
  on = "exp",
  center = TRUE,
  scale = TRUE,
  loadings = FALSE,
  screeplot = 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", "dynamic_motif_exp", "sig_dynamic_motif_exp", "branch_motif_exp", "sig_branch_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.

loadings

Logical indicating whether to generate the loading plot. Default is FALSE since loading plots for glycoproteomics data can be crowded.

screeplot

Logical indicating whether to generate the screeplot. 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

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

  • branch_motif_exp (if on = "branch_motif_exp"): The branch 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 (always generated)

  • pca_loadings: A PCA loading plot (if loadings = TRUE)

  • pca_screeplot: A PCA screeplot (if screeplot = TRUE)

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