Simplifies the access to the loadings of a sPLS-DA. When the original object carries a protein annotation table (protein.info slot, see load.counts2 and add.protein.info), the annotation columns can be appended.

get.sPLSDA.results(
  DEprot.sPLSDA.object,
  component = NULL,
  selected.only = TRUE,
  DEprot.object = NULL,
  protein.info.columns = "none",
  protein.info.prefix = NULL
)

Arguments

DEprot.sPLSDA.object

An object of class DEprot.sPLSDA.

component

Numeric value (or vector) indicating the component(s) to return. Default: NULL (all the components).

selected.only

Logical value indicating whether only the proteins retained by the sparse model should be returned. When FALSE, the complete loadings of the companion non-sparse model are returned instead. Default: TRUE.

DEprot.object

An object of class DEprot or DEprot.analyses from which the protein annotation is taken. Default: NULL (no annotation appended).

protein.info.columns

String vector indicating which columns of the protein.info slot should be appended. Two keywords are available: "none" and "all". Default: "none".

protein.info.prefix

String to prepend to the names of the appended annotation columns. Default: NULL.

Value

A data.frame.

Author

Sebastian Gregoricchio

Examples

splsda <- perform.sPLSDA(DEprot.object = DEprot::test.toolbox$dpo.imp,
                         group.column = "condition",
                         keepX = 5,
                         validate = FALSE)
#> Warning: The number of 'folds' (5) is larger than the smallest class (4 samples): 'folds' has been set to 4.

# Proteins selected on the first component
get.sPLSDA.results(DEprot.sPLSDA.object = splsda, component = 1)
#>      prot.id component     loading abs.loading selected contrib.group
#> 1  protein.2         1  0.59743438  0.59743438     TRUE    6h.10nM.E2
#> 2 protein.48         1 -0.58898736  0.58898736     TRUE           FBS
#> 3 protein.17         1 -0.53300125  0.53300125     TRUE           FBS
#> 4 protein.27         1 -0.09850860  0.09850860     TRUE           FBS
#> 5 protein.30         1  0.04870093  0.04870093     TRUE    6h.10nM.E2