Function to calculate gene signature enrichment scores per spatial position using PAGE.
Giotto object
Matrix of signature genes for each cell type / process
expression values to use
reverse expression values from log scale
log base to use if reverse_log_scale = TRUE
how to return enrichment output
calculate p-values (boolean, default = FALSE)
number of permutations to calculate for p_value
to give to spatial enrichment results, default = PAGE
return giotto object
data.table with enrichment results
sign_matrix: a binary matrix with genes as row names and cell-types as
column names.
Alternatively a list of signature genes can be provided to
makeSignMatrixPAGE, which will create the matrix for you.
The enrichment Z score is calculated by using method (PAGE) from Kim SY et al., BMC bioinformatics, 2005 as \(Z = ((Sm – mu)*m^(1/2)) / delta\). For each gene in each spot, mu is the fold change values versus the mean expression and delta is the standard deviation. Sm is the mean fold change value of a specific marker gene set and m is the size of a given marker gene set.