R/multiScoreGeneric.R
multiScore.Rd
This function computes 'singscores' using a ranked gene
expression matrix obtained from the rankGenes()
function and a
GeneSetCollection object or a list of GeneSet objects. It returns a list of
two matrices containing the scores and dispersions. This function should be
used when scoring needs to be performed for multiple signatures. It is
faster than applying simpleScore()
across the different signatures
independently.
multiScore(
rankData,
upSetColc,
downSetColc,
subSamples = NULL,
centerScore = TRUE,
dispersionFun = mad,
knownDirection = TRUE
)
# S4 method for matrix,GeneSetCollection,missing
multiScore(
rankData,
upSetColc,
downSetColc,
subSamples = NULL,
centerScore = TRUE,
dispersionFun = mad,
knownDirection = TRUE
)
# S4 method for matrix,GeneSetCollection,GeneSetCollection
multiScore(
rankData,
upSetColc,
downSetColc,
subSamples = NULL,
centerScore = TRUE,
dispersionFun = mad,
knownDirection = TRUE
)
# S4 method for matrix,list,missing
multiScore(
rankData,
upSetColc,
downSetColc,
subSamples = NULL,
centerScore = TRUE,
dispersionFun = mad,
knownDirection = TRUE
)
# S4 method for matrix,list,list
multiScore(
rankData,
upSetColc,
downSetColc,
subSamples = NULL,
centerScore = TRUE,
dispersionFun = mad,
knownDirection = TRUE
)
A matrix object, ranked gene expression matrix data generated
using the rankGenes()
function (make sure this matrix is not modified, see
details)
A GeneSetCollection object, a list of GeneSet objects, or a
list of character vectors of up-regulated (or mixed, see
simpleScore
) gene sets.
A GeneSetCollection object, a list of GeneSet objects, or a list of character vectors of down-regulated gene sets. NULL otherwise. Names of gene sets within this collection/list should be the same as those of the upSetColc
A vector of sample labels/indices that will be used to subset the rankData matrix. All samples will be scored if not provided
A Boolean, specifying whether scores should be centered
around 0, default as TRUE. Note: scores never centered if knownDirection = FALSE
A function, dispersion function with default being mad
A boolean, determining whether the gene set should be considered to be directional or not. A gene set is directional if the type of genes in it are known i.e. up- or down-regulated. This should be set to TRUE if the gene set is composed of both up- AND down-regulated genes. Defaults to TRUE. This parameter becomes irrelevant when both upSet(Colc) and downSet(Colc) are provided.
A list of two matrices containing the scores and dispersions
rank
"GeneSet"
ranked <- rankGenes(toy_expr_se)
GSEABase::setName(toy_gs_up) = "toy_gs_up"
GSEABase::setName(toy_gs_dn) = "toy_gs_dn"
gslist <- list(toy_gs_up, toy_gs_dn)
gscolc <- GSEABase::GeneSetCollection(gslist)
scoredf <- multiScore(ranked, upSetColc = gscolc)