compute overall score based on the given marker list

gs_score(data, features = NULL, slot = "score", suffix = "score")

# S4 method for class 'AnyMatrix,ANY'
gs_score(data, features = NULL)

# S4 method for class 'AnyMatrix,list'
gs_score(data, features = NULL, suffix = "score")

# S4 method for class 'SummarizedExperiment,ANY'
gs_score(data, features = NULL, slot = "score", suffix = "score")

Arguments

data

an expression object, can be matrix or SummarizedExperiment

features

vector or named list, feature names to compute score

slot

a character, specify which slot to use when data is se object, optional, default 'score'

suffix

a character, specify the name suffix to save score when features is a named list

Value

A vector of overall score for each sample

Examples

data <- matrix(rnorm(100), 10, dimnames = list(seq_len(10)))
gs_score(data, features = seq_len(3))
#>  [1]  1.12053643 -0.49410478  0.26652991  0.15092967 -0.10426837  0.04295752
#>  [7]  0.28816014  1.10951096  0.47465798 -0.18937360