compute overall score based on the given marker list

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

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

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

# S4 method for 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]  0.2891425  0.1210851 -0.2292520  0.2388900  0.1199340 -0.5192093
#>  [7] -0.2377637  1.4677993  0.5493997 -0.5554001