Computes gene set enrichment based on the results of runDeAnalysis(). See details for more.

runGSEA(
  object,
  across,
  methods_de = "wilcox",
  max_adj_pval = 0.05,
  min_lfc = 0,
  n_highest_lfc = NULL,
  n_lowest_pval = NULL,
  gene_set_list = NULL,
  gene_set_names = NULL,
  test = c("hypergeometric", "kstest"),
  background = nGenes(object),
  absolute = FALSE,
  power = 1,
  pval = 1,
  fdr = 1,
  reduce = TRUE,
  quiet = TRUE,
  chr_to_fct = TRUE,
  verbose = NULL
)

Arguments

object

A valid spata-object.

across

Character vector. All grouping variables of interest.

methods_de

Character vector. All differential expression methods of interest.

max_adj_pval

Numeric value. Sets the threshold for adjusted p-values. All genes with adjusted p-values above that threshold are ignored.

min_lfc

Numeric value. Sets the threshold for average log fold change. All genes with an average log fold change below that threshold are ignored.

n_highest_lfc

Numeric value. Affects the total number of genes that are kept. See details.

n_lowest_pval

Numeric value. Affects the total number of genes that are kept. See details.

gene_set_list

A named list of character vectors. Names of slots correspond to the gene set names. The slot contains the genes of the gene sets.Holds priority over gene_set_names.

gene_set_names

Character vector of gene set names that are taken from the object's gene set data.frame.

test

Character value. One of any. all, identical, not_identical and none. Specifies how input for tags is used to select image annotations. See section Selection of image annotation with tags for more information.

background

Size or character vector of background population genes

absolute

Takes max-min score rather than the max deviation from null (kstest only)

power

Exponent for weights (kstest only)

pval

Filter results to be less than pval cutoff

fdr

Filter results to be less than fdr cutoff

reduce

Logical value. If set to TRUE (the default) the return value of hypeR::hypeR() is reduced to what is necessary for SPATA2s function to work. If FALSE, the complete objects are stored. This will grow the spata-objects size quickly!

quiet

Use true to suppress logs and warnings

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

An updated spata-object.

Details

Computes gene set enrichment analysis using hypeR::hypeR(). It does so by iterating about all possible combinations of across and methods_de. Combinations for which no DE-results are found are silently skipped.

If gene sets are provided via gene_set_list argument gene_set_names is ignored. Else the latter determines the gene sets used which are then taken from the spata-objects gene set data.frame.