
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).
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_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", "dynamic_motif_exp", "sig_dynamic_motif_exp", "branch_motif_exp", "sig_branch_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 ondynamic_motif_exp(ifon = "dynamic_motif_exp"): The dynamic motif experiment to run OPLS-DA onbranch_motif_exp(ifon = "branch_motif_exp"): The branch 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.