
Step: Orthogonal Partial Least Squares Discriminant Analysis (OPLS-DA)
step_oplsda.RdPerform OPLS-DA using glystats::gly_oplsda() and plot it with glyvis::plot_oplsda().
OPLS-DA separates variation into predictive (related to group) and orthogonal (unrelated) components.
This step only works with binary classification (exactly 2 groups).
Usage
step_oplsda(
on = "exp",
pred_i = 1,
ortho_i = NA,
scale = TRUE,
plot_width = 5,
plot_height = 5,
...
)Arguments
- on
Name of the experiment to run OPLS-DA on. Can be "exp", "sig_exp", "trait_exp", "sig_trait_exp", "motif_exp", "sig_motif_exp".
- pred_i
Number of predictive components to include. Default is 1.
- ortho_i
Number of orthogonal components to include. Default is NA (automatic).
- scale
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
glystats::gly_oplsda().
Details
Data required:
exp(ifon = "exp"): The experiment to run OPLS-DA ontrait_exp(ifon = "trait_exp"): The trait experiment to run OPLS-DA onmotif_exp(ifon = "motif_exp"): The motif experiment to run OPLS-DA on
Tables generated (with suffixes):
oplsda_samples: A table containing the OPLS-DA scores for each sampleoplsda_variables: A table containing the OPLS-DA loadings for each variableoplsda_variance: A table containing the explained variance for each componentoplsda_vip: A table containing the Variable Importance in Projection (VIP) scoresoplsda_perm_test: A table containing permutation test results
Plots generated (with suffixes):
oplsda_scores: An OPLS-DA score plot colored by groupoplsda_loadings: An OPLS-DA loading plotoplsda_variance: An OPLS-DA variance (scree) plotoplsda_vip: An OPLS-DA VIP score plot
AI Prompt
This section is for AI in inquire_blueprint() only.
Include this step when users explicitly asks for OPLS-DA.
This step only works with binary classification (exactly 2 groups). If multiple groups are found, ask if
step_subset_groups()should be run first.