sig_score | R Documentation |
Compute gene signature scores for a matrix, returning one score per column. The scoring procedure is that used in Tirosh et al. 2016 (https://www.nature.com/articles/nature20123). This function is a simplified version of the sigScores
function from the scalop package (https://github.com/jlaffy/scalop).
sig_score(
mat,
sig,
nbin = nrow(mat)%/%110,
n = 100,
replace = FALSE,
return_control_sets = FALSE,
cap = c(-Inf, Inf)
)
mat |
A matrix with genes for rows and samples for columns. |
sig |
A character vector of signature genes. |
nbin |
The number of expression bins into which to divide the genes. |
n |
The number of control genes to sample for each gene. Should be less than or equal to |
replace |
Logical indicating whether to sample with replacement. Default: |
return_control_sets |
Logical indicating whether to return the control genes. Default: |
cap |
Numeric vector of length 2 specifying limits for relative expression levels of signature genes. Values outside this interval will be shrunk to the maximum/minimum. Default: |
If return_control_sets
is FALSE
, a vector of scores with length equal to ncol(mat)
. If return_control_sets
is TRUE
, a list with three elements: scores
, a vector of scores with length equal to ncol(mat)
; controls
, a list of the control gene sets used for each gene in sig
; and comparable_gene_sets
, a list of length n
and a rearrangement of controls
, each element being a vector of genes with comparable expression levels to those in sig
(this is redundant but possibly helpful).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.