Builds the protein ranking used as input of a GSEA. By default the ranking comes from the companion non-sparse model stored in the plsda slot, and therefore covers every protein of the matrix.

get.sPLSDA.ranking(DEprot.sPLSDA.object, component = 1, metric = "loading")

Arguments

DEprot.sPLSDA.object

An object of class DEprot.sPLSDA.

component

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

metric

String indicating the score used for the ranking. One among: 'loading' (signed coefficient of the non-sparse model), 'vip' (unsigned VIP score of the non-sparse model), 'sparse' (signed coefficient of the sparse model). Default: "loading".

Value

A named numeric vector, sorted in decreasing order.

Details

The sparse loadings are a poor ranking for a GSEA and metric = "sparse" exists only for the cases in which one really wants them. Three reasons: every protein that was not selected has a coefficient of exactly zero, which leaves a handful of ranked entries and thousands of ties whose order the running-sum statistic depends on; the sparsity penalty keeps one member of a pair of correlated proteins and drops the other, which is exactly what happens inside a pathway; and a set-level aggregation over a vector that is mostly zeros is not testing what it looks like it is testing.

A positive score means a protein higher in the reference.group chosen at the perform.sPLSDA call. With more than two classes, a component separates a mixture of classes rather than a single contrast, and the sign should be read as "towards the reference group" rather than as a fold change.

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.

ranking <- get.sPLSDA.ranking(DEprot.sPLSDA.object = splsda, component = 1)