Plots how often each protein was re-selected across the cross-validation folds of a sPLS-DA.

plot.sPLSDA.stability(
  DEprot.sPLSDA.object,
  component = 1,
  n.proteins = 25,
  bar.color = "steelblue",
  other.color = "gray70",
  frequency.threshold = 0.8,
  protein.names.pattern = NULL,
  axes.text.size = 9,
  title = NULL
)

Arguments

DEprot.sPLSDA.object

An object of class DEprot.sPLSDA.

component

Numeric value indicating the component to display. Default: 1.

n.proteins

Numeric value indicating the maximum number of proteins to display. Default: 25.

bar.color

String indicating the color of the bars of the proteins retained in the final model. Default: "steelblue".

other.color

String indicating the color of the bars of the proteins that were not retained in the final model. Default: "gray70".

frequency.threshold

Numeric value (0-1) drawn as a dashed line, used as a visual reference for a stable selection. Default: 0.8.

protein.names.pattern

String indicating a pattern to be passed to gsub and removed from the protein names. Default: NULL (no changes).

axes.text.size

Numeric value indicating the font size of the axis text. Default: 9.

title

String indicating the title of the plot (markdown annotation supported). Default: NULL (automatic title).

Value

A ggplot object.

Details

The list of proteins returned by a sparse model is much less stable than it looks: on a small design, resampling the samples is often enough to swap half of it. A protein re-selected in nearly every fold is a marker worth following up; one appearing in a third of them is a property of the particular split, and the number written next to the bars is the only way to tell the two apart.

Proteins that were not retained in the final model but were frequently selected during the resampling are shown as well, since they are exactly the candidates that a slightly different dataset would have picked.

Author

Sebastian Gregoricchio

Examples

# \donttest{
# the performances are estimated by resampling the samples: with 12 samples in 3 groups
# the leave-one-out scheme is the only one leaving enough samples in each fold
splsda <- perform.sPLSDA(DEprot.object = DEprot::test.toolbox$dpo.imp,
                         group.column = "condition",
                         keepX = 5,
                         validate = TRUE,
                         validation = "loo")
#> Estimating the classification performances by cross-validation...

plot.sPLSDA.stability(DEprot.sPLSDA.object = splsda, component = 1)

# }