
Step: Principal Component Analysis (PCA)
step_pca.RdRun 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).
When
on = "exp", requiresexp(usually afterstep_preprocess()).When
on = "sig_exp", requiressig_expfrom one ofstep_dea_limma(),step_dea_ttest(),step_dea_wilcox(),step_dea_anova(), orstep_dea_kruskal().When
on = "trait_exp", requirestrait_expfromstep_derive_traits().When
on = "sig_trait_exp", requiressig_trait_expfrom DEA on traits.When
on = "dynamic_motif_exp", requiresdynamic_motif_expfromstep_quantify_dynamic_motifs().When
on = "sig_dynamic_motif_exp", requiressig_dynamic_motif_expfrom DEA on motifs.When
on = "branch_motif_exp", requiresbranch_motif_expfromstep_quantify_branch_motifs().When
on = "sig_branch_motif_exp", requiressig_branch_motif_expfrom DEA on motifs.
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
FALSEsince 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().
Details
Data required:
exp(ifon = "exp"): The experiment to run PCA ontrait_exp(ifon = "trait_exp"): The trait experiment to run PCA ondynamic_motif_exp(ifon = "dynamic_motif_exp"): The dynamic motif experiment to run PCA onbranch_motif_exp(ifon = "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 samplepca_variables: A table containing the PCA loadings for each variablepca_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 (ifloadings = TRUE)pca_screeplot: A PCA screeplot (ifscreeplot = TRUE)